blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
201
content_id
stringlengths
40
40
detected_licenses
listlengths
0
85
license_type
stringclasses
2 values
repo_name
stringlengths
7
100
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
260 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
11.4k
681M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
80 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
8
9.86M
extension
stringclasses
52 values
content
stringlengths
8
9.86M
authors
listlengths
1
1
author
stringlengths
0
119
8e84c3e77d2250ec6a66bdcfd013fe2176de52ca
4984f7a38f655fe9aa6231175315651039f57a55
/src/Copyable.cpp
81aecfa62a373cb4402b5259f13831b186ad53ae
[]
no_license
quanshuituantuan/netlib
8373d0acf1332a1b60f1446b7777a1da9654a6ef
216d19e581b1c17e1a4d7670444bfbf8fe387417
refs/heads/master
2022-12-04T11:16:52.250550
2020-08-15T05:34:44
2020-08-15T05:34:44
264,667,122
0
0
null
null
null
null
UTF-8
C++
false
false
127
cpp
#include "Copyable.h" namespace EventLoop { Copyable::Copyable() { } Copyable::~Copyable() { } } /* namespace EventLoop */
[ "jixuquan@gmail.com" ]
jixuquan@gmail.com
5078f88853503ff282e09e72ccf9ca6f5acc4005
152d5f8b3840aa3c90ec2d1e7725bb541042d9c9
/modules/app.cc
695a9660d959ee210ea7b4d9525a6d1e3180bd66
[]
no_license
namgk/omnet-simul
5064a036a9f36cacd2a540df40591deb6479c65d
5724df84e3c84bb10a7eb0b6bdada8d19292d241
refs/heads/master
2018-09-28T20:17:58.495029
2018-01-02T05:56:39
2018-01-02T05:56:39
103,978,096
0
0
null
null
null
null
UTF-8
C++
false
false
1,521
cc
// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program 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 Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see http://www.gnu.org/licenses/. // #include <string.h> #include <omnetpp.h> using namespace omnetpp; class App : public cModule { const char *name; const char *device; private: cMessage *sendMessageEvent; public: App(); virtual ~App(); protected: // The following redefined virtual function holds the algorithm. virtual void initialize() override; }; //Define_Module(App); App::App() { sendMessageEvent = nullptr; } App::~App() { } void App::initialize() { name = getName(); EV_INFO << " ____ " << name << " ____ "; cModule *parent = getParentModule(); if (!parent){ return; } cModule *grandParent = parent->getParentModule(); if (!grandParent){ return; } device = parent->getFullName(); sendMessageEvent = new cMessage("sendMessageEvent"); }
[ "kyng@ece.ubc.ca" ]
kyng@ece.ubc.ca
a738e3c74eba6ffca897c71105b7ea6f43ef25c2
e087f4b843cdf5b79cabb3e1f25d8e8dd8bdfe56
/mainwindow.cpp
46f927995a939a7f35eeeea80be66b2d9063dcb5
[]
no_license
antofik/QtXmppTest
6c89afdc9354f82c842feac32f7962abcbfbe3d4
180dbfd2bc2acc507cc150ca089cc07b8c64ee97
refs/heads/master
2021-01-16T17:47:14.611840
2014-01-21T11:01:17
2014-01-21T11:01:17
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,313
cpp
#include "mainwindow.h" #include "ui_mainwindow.h" #include "mainmenu.h" #include "visitorlistview.h" #include "stdio.h" #include <QtGui> #include <QtCore> #include "core.h" #include "visitorchat.h" #include "QWebSettings" MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { ui->setupUi(this); MainMenu* m = new MainMenu(); ui->containerMainMenu->layout()->addWidget(m); connect(m, SIGNAL(CreateNewTab()), this, SLOT(CreateNewTab())); VisitorListView *visitorListView = new VisitorListView(); connect(visitorListView, SIGNAL(OpenChat(QString)), this, SLOT(OpenChat(QString))); ui->tabVisitorList->layout()->addWidget(visitorListView); ui->tabWidget->setTabsClosable(true); ui->tabWidget->tabBar()->tabButton(0, QTabBar::RightSide)->hide(); connect(ui->tabWidget, SIGNAL(tabCloseRequested(int)), this, SLOT(tabCloseRequested(int))); connect(Core::Connection(), SIGNAL(Connected()), SLOT(Connected())); connect(Core::Connection(), SIGNAL(Disconnected()), SLOT(Disconnected())); if (Core::Connection()->isConnected()){ ui->txtStatus->setText("Already connected"); } Core::Connection()->Connect(); QWebSettings::enablePersistentStorage("x:\\"); //QWebSettings::globalSettings()->setAttribute(QWebSettings::LocalStorageEnabled, true); QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true); } void MainWindow::CreateNewTab(){ this->ui->tabWidget->addTab(new QWidget(), QUuid::createUuid().toString()); } void MainWindow::tabCloseRequested(int tabIndex){ this->ui->tabWidget->removeTab(tabIndex); } void MainWindow::Connected(){ ui->txtStatus->setText("Connected"); } void MainWindow::Disconnected(){ ui->txtStatus->setText("Disconnected"); } void MainWindow::OpenChat(QString visitorId){ int index = -1; for(int i=0;i<ui->tabWidget->count();i++){ if (ui->tabWidget->tabText(i) == visitorId){ index = i; break; } } if (index == -1){ VisitorChat* chat = new VisitorChat(visitorId); index = this->ui->tabWidget->addTab(chat, visitorId); } this->ui->tabWidget->setCurrentIndex(index); } MainWindow::~MainWindow() { delete ui; }
[ "antofik@gmail.com" ]
antofik@gmail.com
d6237c5e176f6d5082158e9ef3e50b3bbea46e00
81e10eb0b1ce1330d341453e39bfe7d73c5c28ae
/xls/noc/simulation/global_routing_table.h
fc024d28cb4630c87ae2ee1b247a393519e6ed43
[ "Apache-2.0" ]
permissive
Stonesjtu/xls
d3b655b1f161de2ff01465b1d4c189fcc014fdff
7d0c0f5309b6ef1d96fbf0e04d67f49b8cae6b4d
refs/heads/main
2023-08-20T21:29:09.749519
2021-10-21T18:26:06
2021-10-21T18:26:59
null
0
0
null
null
null
null
UTF-8
C++
false
false
7,107
h
// Copyright 2021 The XLS Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // This file provides objects that track and manage the routing tables // of all components within a network. This enables more efficient simulation // and opportunities for global optimization of routing. #ifndef XLS_NOC_SIMULATION_GLOBAL_ROUTING_TABLE_H_ #define XLS_NOC_SIMULATION_GLOBAL_ROUTING_TABLE_H_ #include "absl/container/flat_hash_set.h" #include "xls/noc/simulation/common.h" #include "xls/noc/simulation/indexer.h" #include "xls/noc/simulation/parameters.h" namespace xls { namespace noc { class NetworkManager; // Used to denote a specific vc attached to a given port id.. struct PortAndVCIndex { PortId port_id_; int64_t vc_index_; }; // Used to denote a specific vc attached to a given port index. struct PortIndexAndVCIndex { int64_t port_index_; int64_t vc_index_; }; // Generic class to store routing tables for an entire network. class DistributedRoutingTable { public: // Stores a routing table for a single network component (ex. Router). // // For each port/vc pair, it stores the routing table as a list of // tuples <destination, output_port, vc_output_index> // // RouterRoutingTable::routes[port_index][vc_input_index] // is a PortRoutingList corresponding to the given input port and vc. // // PortRoutingList // is a list of tuples of <destination, PortAndVCIndex> // // To find the output port for a flit arriving at index and vc that has // a specific destination // 1. Retrieve the associated PortRoutingList // 2. Find the tuple that matched the given destination within the list. using PortRoutingList = std::vector<std::pair<int64_t, PortAndVCIndex>>; // See comment above. struct RouterRoutingTable { std::vector<std::vector<PortRoutingList>> routes; }; // Returns route to destination from a particular source network interface // to a sink network interface. // // - Route includes the starting component. // - initial_vc_index is the starting vc_index used to exit source, if no vc // is used the index is 0. // // - Error conditions include: // - From/to are not network interfaces. // - No route is found, then // - The route exceeds max_hops (likely loop detected). absl::StatusOr<std::vector<NetworkComponentId>> ComputeRoute( NetworkComponentId source, NetworkComponentId sink, int64_t initial_vc_index = 0, int64_t max_hops = 999); // Given a port, a local virtual channel, and // final destination (sink), return the next port and vc the data // should traverse. absl::StatusOr<PortAndVCIndex> GetNextHopPort(PortAndVCIndex from, NetworkComponentId sink); // Given an input port (of a router), a local virtual channel, and // final destination (sink), return the output port and vc the data // should go out on. absl::StatusOr<PortAndVCIndex> GetRouterOutputPort(PortAndVCIndex from, NetworkComponentId sink); // Given an input port (of a router), a local virtual channel, and // final destination index (sink), return the output port and vc the data // should go out on. absl::StatusOr<PortAndVCIndex> GetRouterOutputPortByIndex( PortAndVCIndex from, int64_t destination_index); // TODO(tedhong): 2020-01-25 Add indexer for input/output ports of a router // and support routing directly via indices. // Returns mapping of vc params to local indicies. const VirtualChannelIndexMap& GetVirtualChannelIndices() { return vc_indices_; } // Returns mapping of ports to local indicies. const PortIndexMap& GetPortIndices() { return port_indices_; } // Returns mapping of source network interfaces to indicies. const NetworkComponentIndexMap& GetSourceIndices() { return source_indices_; } // Returns mapping of sink network interfaces to indicies. const NetworkComponentIndexMap& GetSinkIndices() { return sink_indices_; } private: friend class DistributedRoutingTableBuilderForTrees; // Resize routing_tables to accomondate the number of networks and // number of components in a network. void AllocateTableForNetwork(NetworkId network_id, int64_t component_count); // Get (and create if necessary) routing table associated for a component. RouterRoutingTable& GetRoutingTable(NetworkComponentId nc_id) { return routing_tables_[nc_id.network()][nc_id.id()]; } // Get possible routes associated with given port and vc. PortRoutingList& GetRoutingList(PortAndVCIndex port_and_vc) { NetworkComponentId nc_id = port_and_vc.port_id_.GetNetworkComponentId(); return GetRoutingTable(nc_id) .routes.at(port_and_vc.port_id_.id()) .at(port_and_vc.vc_index_); } PortIndexMap port_indices_; VirtualChannelIndexMap vc_indices_; NetworkComponentIndexMap source_indices_; NetworkComponentIndexMap sink_indices_; NetworkId network_; NetworkManager* network_manager_; NocParameters* network_parameters_; // Routing tables for all components. // This vector of vectors is indexed via network and component local id's. // ie. routing table for ComponentId id is // routing_tables_[id.network()][id.id()] std::vector<std::vector<RouterRoutingTable>> routing_tables_; }; // Build a routing table given a network with a tree topology. class DistributedRoutingTableBuilderForTrees { public: absl::StatusOr<DistributedRoutingTable> BuildNetworkRoutingTables( NetworkId network_id, NetworkManager& network_manager, NocParameters& network_parameters); private: // Setup source_indicies_ and sink_indices_ for network. absl::Status BuildNetworkInterfaceIndices( NetworkId network_id, DistributedRoutingTable* routing_table); // Setup port_indices_ and vc_indices_ for network. absl::Status BuildPortAndVirtualChannelIndices( NetworkId network_id, DistributedRoutingTable* routing_table); // Trace and setup routing table for tree-based topologies. absl::Status BuildRoutingTable(NetworkId network_id, DistributedRoutingTable* routing_table); // Updates routing table of nc for routes that travel to destination via_port. absl::Status AddRoutes( int64_t destination_index, NetworkComponentId nc, PortId via_port, DistributedRoutingTable* routing_table, absl::flat_hash_set<NetworkComponentId>& visited_components); }; } // namespace noc } // namespace xls #endif // XLS_NOC_SIMULATION_GLOBAL_ROUTING_TABLE_H_
[ "copybara-worker@google.com" ]
copybara-worker@google.com
7b13157b1d4be6bc64d4578c8de4e9844742cd86
61a62af6e831f3003892abf4f73bb1aa4d74d1c7
/Implementations/HopcroftKarp.hpp
dbe8ed15695381e0961922bf9611988e94f45f85
[]
no_license
amsraman/Competitive_Programming
7e420e5d029e8adfbe7edf845db77f96bd1ae80d
6f869a1e1716f56b081769d7f36ffa23ae82e356
refs/heads/master
2023-03-17T00:20:19.866063
2023-03-11T00:24:29
2023-03-11T00:24:29
173,763,104
16
2
null
null
null
null
UTF-8
C++
false
false
1,673
hpp
struct HopcroftKarp { int n; vector<int> dist, pair_u, pair_v; vector<vector<int>> graph; HopcroftKarp(int n): n(n), dist(n), pair_u(n), pair_v(n), graph(n) {}; void add_edge(int u, int v) { // u \in U, v \in V graph[u].push_back(v); } bool bfs() { bool found = false; queue<int> q; for(int i = 0; i < n; i++) { if(pair_u[i] == -1) { dist[i] = 0, q.push(i); } else { dist[i] = n + 1; } } while(!q.empty()) { int u = q.front(); q.pop(); for(int v: graph[u]) { if(pair_v[v] != -1 && dist[pair_v[v]] == n + 1) { dist[pair_v[v]] = dist[u] + 1, q.push(pair_v[v]); } else if(pair_v[v] == -1) { found = true; } } } return found; } bool dfs(int u) { for(int v: graph[u]) { if(pair_v[v] == -1) { pair_u[u] = v, pair_v[v] = u; return true; } } for(int v: graph[u]) { if(dist[pair_v[v]] == dist[u] + 1 && dfs(pair_v[v])) { pair_u[u] = v, pair_v[v] = u; return true; } } return false; } int max_matching() { int res = 0; fill(pair_u.begin(), pair_u.end(), -1); fill(pair_v.begin(), pair_v.end(), -1); while(bfs()) { for(int i = 0; i < n; i++) { if(pair_u[i] == -1) { res += dfs(i); } } } return res; } };
[ "adisundar02@gmail.com" ]
adisundar02@gmail.com
b3b1f5559bfe30f9df930869dfbbc72c18c66223
c75e97c578e63a7a0ee2974a7e51abc6cce3925a
/Motor_TinyCircuits.cpp
c29f819d496a7597007335f61c22de508511bdd4
[]
no_license
duinobots/battleBot
ddaf5d8861651c2ca8769c4be999cc9932349680
ec0645ba670fe734a31219a24bc4430c06ca01cc
refs/heads/master
2022-01-20T14:59:34.125590
2019-04-04T01:23:38
2019-04-04T01:23:38
179,396,338
0
0
null
null
null
null
UTF-8
C++
false
false
1,015
cpp
#include "Motor_TinyCircuits.h" Motor_TinyCircuits::Motor_TinyCircuits(uint8_t addr, motor_positions pos) : motor_(NO_R_REMOVED) { // todo: weapon motor for TinyCircuits build not supported yet pos_ = pos; } void Motor_TinyCircuits::init(uint16_t freq) { //The value passed to begin() is the maximum PWM value, which is 16 bit(up to 65535) //This value also determines the output frequency- by default, 8MHz divided by the maxPWM value motor_.begin(freq); // setFailsafe(); return; } void Motor_TinyCircuits::setSpeed(int speed) { // todo: figure out scaling // Serial.print("Motor_TinyCircuits::setSpeed() speed -> "); // Serial.print(speed); // Serial.print(", pos_ -> "); // Serial.println(pos_); int k = 4; motor_.setMotor(pos_, (int16_t)speed * k); // Serial.print("Motor_TinyCircuits::setSpeed() scaled speed ->"); // Serial.println((int16_t)speed * k); return; } void Motor_TinyCircuits::setFailSafe(uint16_t ms) { // todo // motor_.setFailsafe(ms); return; };
[ "benjaminkent78@gmail.com" ]
benjaminkent78@gmail.com
c44163e132a1390d737a9505c4ea35f2531b8906
9be8292d384969ccc29c4e1a58f0ee4e2878fa58
/Pertemuan 6/cnth3.cpp
234b1bb5a05922c77c77539d1c4b9040834e60a9
[ "Apache-2.0" ]
permissive
riqulaziz/Computer-Programming-Biomedical-Engineering-UNAIR
aee32c88f8a562d63f36e51d41df114e5e1e1312
90d96c177fe1d3019ec371d1be3e4a9857557e69
refs/heads/main
2023-03-21T04:22:12.444771
2021-03-18T03:36:04
2021-03-18T03:36:04
347,902,812
1
0
null
null
null
null
UTF-8
C++
false
false
769
cpp
//This program demonstrates the use of an array of structs #include <cstdlib> #include <iostream> using namespace std; struct PersonRec { string lastName; string firstName; int age; }; typedef PersonRec PeopleArrayType[10];//an array of 10 structs void LoadArray(PeopleArrayType peop); int main(void) { PeopleArrayType people;//a variable of the array type LoadArray(people);//output the array for(int i=0;i<10;i++) { cout<<people[i].firstName<<" "<<people[i].lastName<<" "<<people[i].age<<endl; } system("PAUSE"); return EXIT_SUCCESS; } void LoadArray(PeopleArrayType peop) { for (int i=0;i<10;i++) { cout<<"Enter first name: ";cin>>peop[i].firstName; cout<<"Enter last name: ";cin>>peop[i].lastName; cout<<"Enter age: ";cin>>peop[i].age; } }
[ "thoriqulaziz64@gmail.com" ]
thoriqulaziz64@gmail.com
93608ceb462ee3c09a82be4eb2d892b14430d6fe
0c2bfe0b5aed91089dd723f13d261e84cf46d1b3
/implementation of stack using linked ilst.cpp
f46512b30904faf074b0a490083e677d0c735329
[]
no_license
alimalim77/Data-Structures-and-Algorithm-using-CPP-C-
a65389b9fea36533a12851aee6bb72818163487c
570027b311fe1d1c7394c8df9f77284f07952f7a
refs/heads/main
2023-08-29T02:47:12.425464
2021-10-20T11:40:52
2021-10-20T11:40:52
419,305,013
1
0
null
null
null
null
UTF-8
C++
false
false
2,437
cpp
#include <stdio.h> #include <stdlib.h> void push(); void pop(); void display(); struct node { int val; struct node *next; }; struct node *head; main () { int choice=0; printf("\n*********Stack operations using linked list*********\n"); printf("\n----------------------------------------------\n"); while(choice != 4) { printf("\n\nChose one from the below options...\n"); printf("\n1.Push\n2.Pop\n3.Show\n4.Exit"); printf("\n Enter your choice \n"); scanf("%d",&choice); switch(choice) { case 1: { push(); break; } case 2: { pop(); break; } case 3: { display(); break; } case 4: { printf("Exiting...."); break; } default: { printf("Please Enter valid choice "); } }; } } void push () { int val; struct node *ptr = (struct node*)malloc(sizeof(struct node)); if(ptr == NULL) { printf("not able to push the element"); } else { printf("Enter the value"); scanf("%d",&val); if(head==NULL) { ptr->val = val; ptr -> next = NULL; head=ptr; } else { ptr->val = val; ptr->next = head; //head=ptr; } printf("Item pushed"); } } void pop() { int item; struct node *ptr; if (head == NULL) { printf("Underflow"); } else { item = head->val; ptr = head; head = head->next; free(ptr); printf("Item popped"); } } void display() { int i; if(head == NULL) { printf("Stack is empty\n"); } else { printf("Printing Stack elements \n"); while(head!=NULL) { printf("%d\n",head->val); head = head->next; } } }
[ "52186295+alimalim77@users.noreply.github.com" ]
52186295+alimalim77@users.noreply.github.com
19fbdc66d24a4faadc7eb0c323ab2f8fb5134617
03814d6cca019b2b78d202c5379d7986a822a6da
/catkin_ws/src/pid_lidar/src/setpoint_node_lidar.cpp
1fe8066e2bdc27da33c86e5a5f8900964cfc4445
[ "BSD-3-Clause" ]
permissive
aleplaice/Octanis1-ROS
5fafef04729e1efe59d4e040d903ca5dc5721810
5d0e4d3defb9444a8eb731303657f36053cac454
refs/heads/master
2021-01-19T07:31:41.537233
2016-07-13T15:05:14
2016-07-13T15:05:14
null
0
0
null
null
null
null
UTF-8
C++
false
false
2,648
cpp
/***************************************************************************//** * \file setpoint_node.cpp * * \brief Node that publishes time-varying setpoint values * \author Paul Bouchier * \date January 9, 2016 * * \section license License (BSD-3) * Copyright (c) 2016, Paul Bouchier * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * - 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. * - Neither the name of Willow Garage, Inc. nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. ******************************************************************************/ #include "ros/ros.h" #include "std_msgs/UInt16.h" int main(int argc, char **argv) { ros::init(argc, argv, "setpoint_node"); ROS_INFO("Starting setpoint publisher"); ros::NodeHandle setpoint_node; while (ros::Time(0) == ros::Time::now()) { ROS_INFO("Setpoint_node spinning waiting for time to become non-zero"); sleep(1); } std_msgs::UInt16 setpoint; setpoint.data = 1.0; ros::Publisher setpoint_pub = setpoint_node.advertise<std_msgs::UInt16>("setpoint", 1); ros::Rate loop_rate(0.2); // change setpoint every 5 seconds while (ros::ok()) { ros::spinOnce(); setpoint_pub.publish(setpoint); // publish twice so graph gets it as a step setpoint.data = 0 - setpoint.data; setpoint_pub.publish(setpoint); loop_rate.sleep(); } }
[ "ekixs@ymail.com" ]
ekixs@ymail.com
634ce67901f8e0a9d444b090fe7f81a242125cde
ebd15933688fd258506983a311e1bac3e47aa357
/factorial.cpp
03f2ea44a04c5729b12d0dc8719b145b327d7515
[]
no_license
NaveenrajFox/raj
669d441eeb6b8bffa8dc1abf38dc8caba2f6fd2f
9f73e9bc337e66e254814a1307be159ce2787338
refs/heads/master
2020-04-10T04:58:06.978146
2018-04-06T13:55:41
2018-04-06T13:55:41
124,264,202
1
0
null
null
null
null
UTF-8
C++
false
false
254
cpp
#include <iostream> using namespace std; int main() { int num , i, fact=1; cout << "enter the number" ; cin >> num ; for (i=num ; i>0 ; i--) { fact=fact*i; } cout << "\n" << fact ; return 0; }
[ "noreply@github.com" ]
noreply@github.com
2e7ded1ab49e240f42912fea12fc8cca1338b413
463712717f091504234a578b0ba85a56c42e41f5
/Day17/Day17/Source1.cpp
df59c4c0e6c649231ddecd60d3c5057ca1a5db20
[]
no_license
derisan/stl
2a2d72c7a8810af33c2968111516e00f6bb36006
7e5ee4b6fbb16063847ef6b4f14e17bbcd69d886
refs/heads/master
2023-05-17T05:56:44.434071
2021-06-09T03:41:57
2021-06-09T03:41:57
343,645,496
0
0
null
null
null
null
UHC
C++
false
false
906
cpp
//#include <iostream> //#include <algorithm> // //#include "../../String.h" // //using namespace std; // // //template<typename Iter, typename T> //Iter my_find(Iter first, Iter last, const T& value) //{ // while(first != last) // { // if(value == *first) // { // return first; // } // ++first; // } // return last; //} // // //int main() //{ // String s{"the quick brown fox jumps over the lazy dog"}; // // // [문제] s에 찾는 문자가 있는지 알려주자. // // 있다면 몇 번째인지 출력. // // char tgt{0}; // while(true) // { // cout << "\nEnter the target: "; // if((cin >> tgt).eof()) // { // break; // } // // auto iter = my_find(s.begin(), s.end(), tgt); // // if(iter != s.end()) // { // cout << tgt << "는 " << distance(s.begin(), iter) + 1 << "번 째 있습니다." << endl; // } // else // { // cout << "CANNOT FIND " << tgt << endl; // } // } // //}
[ "derisan@naver.com" ]
derisan@naver.com
db94a13894c20485685d921621e7afba0c38bdec
1866b5282f3ee1ef3a3269f9023e40acc4ded65a
/UIShop/ContactWnd.cpp
38ea2672d08b20e07e08d480db6d082f9dd722aa
[ "MIT" ]
permissive
dushulife/LibUIDK
ddf0ee7ec88b19326081f6737947f70f89fff248
04e79e64eaadfaa29641c24e9cddd9abde544aac
refs/heads/master
2020-07-22T15:06:48.435696
2019-09-08T12:48:46
2019-09-08T12:48:46
207,241,534
1
0
MIT
2019-09-09T06:40:15
2019-09-09T06:40:15
null
UTF-8
C++
false
false
1,322
cpp
// ContactWnd.cpp : implementation file // #include "stdafx.h" #include "UIShop.h" #include "ContactWnd.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif // CContactWnd IMPLEMENT_DYNAMIC(CContactWnd, CDockablePane) CContactWnd::CContactWnd() { } CContactWnd::~CContactWnd() { } BEGIN_MESSAGE_MAP(CContactWnd, CDockablePane) ON_WM_SETFOCUS() ON_WM_SIZE() ON_WM_CREATE() END_MESSAGE_MAP() // CContactWnd message handlers int CContactWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add your specialized creation code here #ifndef _DEBUG m_ctrlHtml.Create(NULL, _T("ContactView"), WS_CHILD|WS_VISIBLE, CRect(0, 0, 0, 0), this, 1234); m_ctrlHtml.Navigate2(_T("http://www.iuishop.com/chat/chat.html"), NULL, NULL); #endif return 0; } void CContactWnd::OnSetFocus(CWnd* pOldWnd) { CDockablePane::OnSetFocus(pOldWnd); // TODO: Add your message handler code here } void CContactWnd::OnSize(UINT nType, int cx, int cy) { CDockablePane::OnSize(nType, cx, cy); // TODO: Add your message handler code here if (m_ctrlHtml.GetSafeHwnd() != NULL) { m_ctrlHtml.SetWindowPos(NULL, 0, 0, cx, cy, SWP_NOMOVE); } }
[ "1584793892@qq.com" ]
1584793892@qq.com
9382bf075dad83fea09419b086f7e9b7ee803c53
e98d5d2257bdae76b319fa4ab19007ba484d4050
/main.cpp
a29fe501d9bb2de7f68d5a53504bb76c1dbee4cf
[]
no_license
literalnon/first_server
df791b82f76945ecbf7053f26d9bd8a46387abb0
283dca0842bb2dc931d85e5773d10aa97cc22184
refs/heads/master
2021-01-19T11:22:03.599293
2017-04-11T16:28:12
2017-04-11T16:28:12
87,957,789
0
0
null
null
null
null
UTF-8
C++
false
false
4,920
cpp
#include <stdio.h> #include <stdlib.h> #include <errno.h> #include <strings.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <cstring> #include <unistd.h> #include <thread> #include <iostream> #include <vector> #include <string> #include <mutex> #include <set> #include <stack> #include <iterator> #include <poll.h> //server #define BUF_SIZE 256 std::mutex sockets_mutex; std::mutex client_count_mutex; std::set<int> sockets; static const int num_threads = 10; static int client_count = 0; bool sock_flag = true; bool authorization(int sock, std::string & client_name){ if (sock < 0){ printf("accept() failed: %d\n", errno); return false; } char buf[BUF_SIZE]; memset(buf, 0, BUF_SIZE); write(sock, "enter name\n", 12); read(sock, buf, BUF_SIZE - 1); client_name = std::string(buf); printf("client %s\n", buf); memset(buf, 0, BUF_SIZE); write(sock, "enter password\n", 16); read(sock, buf, BUF_SIZE - 1); if(*buf == 'w'){ printf("client success connect\n"); client_count_mutex.lock(); client_count++; client_count_mutex.unlock(); write(sock, "success connect\n", 16); return true; }else{ write(sock, "unsuccess connect\n", 18); printf("client unsuccess connect\n"); } return false; } void client_func(int newsock){ std::string client_name; if(authorization(newsock, client_name)){ sockets_mutex.lock(); sockets.insert(newsock); sockets_mutex.unlock(); }else{ close(newsock); return; } char buf[BUF_SIZE]; if (newsock < 0){ printf("accept() failed: %d\n", errno); } printf("new client %s\n", client_name.c_str()); while(1){ memset(buf, 0, BUF_SIZE); read(newsock, buf, BUF_SIZE-1); buf[BUF_SIZE] = 0; printf("MSG: %s\n", buf); if(*buf == '0'){ printf("close socket \n"); sockets_mutex.lock(); auto it = sockets.find(newsock); if(it != sockets.end()) sockets.erase(it); sockets_mutex.unlock(); client_count_mutex.lock(); client_count--; client_count_mutex.unlock(); close(newsock); break; }else{ write(newsock, "OK\n", 4); sockets_mutex.lock(); for(auto sock : sockets) if(sock > 0 && sock != newsock){ write(sock, client_name.c_str(), strlen(client_name.c_str())); write(sock, buf, BUF_SIZE - 1); } sockets_mutex.unlock(); } } } void add_sock(int sock){ std::vector<std::thread> client_threads; struct sockaddr_in cli_addr; int clen = sizeof(cli_addr); listen(sock, 1); struct timeval tv; int newsock; fd_set active_fd_set; while(1) { printf("while"); tv.tv_sec = 5; tv.tv_usec = 0; FD_ZERO (&active_fd_set); FD_SET (sock, &active_fd_set); if(select(FD_SETSIZE, &active_fd_set, &active_fd_set, NULL, &tv) > 0){ newsock = accept(sock, (struct sockaddr * ) &cli_addr, (socklen_t *) &clen); }else if(sock_flag){ continue; }else break; printf("\n"); if(newsock > 0) printf("new client try connect\n"); else break; client_threads.push_back(std::thread(client_func, newsock)); } for(auto & i : client_threads) i.join(); close(sock); } int main(int argc, char ** argv) { int sock, port; struct sockaddr_in serv_addr; if (argc < 2){ fprintf(stderr,"usage: %s <port_number>\n", argv[0]); return EXIT_FAILURE; } sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0){ printf("socket() failed: %d\n", errno); return EXIT_FAILURE; } memset((char *) &serv_addr, 0, sizeof(serv_addr)); port = atoi(argv[1]); serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = INADDR_ANY; serv_addr.sin_port = htons(port); if (bind(sock, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0){ printf("bind() failed: %d\n", errno); close(sock); return EXIT_FAILURE; } printf("server lestening %d \n", port); std::thread add_sock_thread(add_sock, sock); char s[BUF_SIZE]; while(1){ memset(s, 0, BUF_SIZE - 1); scanf("%c", s); if(*s == 'q'){ sock_flag = false; add_sock_thread.join(); sockets_mutex.lock(); for(auto sock : sockets) close(sock); sockets_mutex.unlock(); //close(sock); break; }else printf("no\n"); } }
[ "donaldjrduck@gmail.com" ]
donaldjrduck@gmail.com
8a8d642a5a08530bb18a1c45737851ec06ac12b1
9ea624a093561c87e47b822008e35d40a136a953
/src/OpcUaStackServer/ServiceSet/SessionIf.h
924141dbefc5e12012247f8e44f67ce2c65336f3
[ "Apache-2.0" ]
permissive
ASNeG/OpcUaStack
399828371ed4c128360c710dcd831b41f192f27d
e7c365f006be878dcb588a83af9a0dde49bf2b5a
refs/heads/master
2023-08-30T16:12:24.823685
2022-06-27T21:35:44
2022-06-27T21:35:44
149,216,768
141
41
Apache-2.0
2023-08-22T09:10:17
2018-09-18T02:25:58
C++
UTF-8
C++
false
false
1,349
h
/* Copyright 2015-2018 Kai Huebl (kai@huebl-sgh.de) Lizenziert gemäß Apache Licence Version 2.0 (die „Lizenz“); Nutzung dieser Datei nur in Übereinstimmung mit der Lizenz erlaubt. Eine Kopie der Lizenz erhalten Sie auf http://www.apache.org/licenses/LICENSE-2.0. Sofern nicht gemäß geltendem Recht vorgeschrieben oder schriftlich vereinbart, erfolgt die Bereitstellung der im Rahmen der Lizenz verbreiteten Software OHNE GEWÄHR ODER VORBEHALTE – ganz gleich, ob ausdrücklich oder stillschweigend. Informationen über die jeweiligen Bedingungen für Genehmigungen und Einschränkungen im Rahmen der Lizenz finden Sie in der Lizenz. Autor: Kai Huebl (kai@huebl-sgh.de) */ #ifndef __OpcUaStackServer_SessionIf_h__ #define __OpcUaStackServer_SessionIf_h__ #include "OpcUaStackCore/Base/os.h" #include "OpcUaStackCore/SecureChannel/ResponseHeader.h" #include "OpcUaStackCore/SecureChannel/SecureChannelTransaction.h" using namespace OpcUaStackCore; namespace OpcUaStackServer { class DLLEXPORT SessionIf { public: SessionIf(void) {} virtual ~SessionIf(void) {} virtual void responseMessage( ResponseHeader::SPtr& responseHeader, SecureChannelTransaction::SPtr& secureChannelTransaction ) = 0; virtual void deleteSession( uint32_t authenticationToken ) = 0; }; } #endif
[ "kai@huebl-sgh.de" ]
kai@huebl-sgh.de
cae62aa5a4affa45c78552174b7fbb929d2aceb7
3f0e505d7cd0a19b4b3065e6e4dd5bc72dec26f3
/GAME3001-W2021-Lab2/src/Game.cpp
45eb0ffc34196d63d888327a265353f2aab72b8e
[]
no_license
havadora/GAME3001-W2021-lab2-LeNguyenTruongHai
a0b2634b7f75bb3751e430e4cad4d5788ea5e858
60f495f14472b0aebc3578d37466c58f90013941
refs/heads/main
2023-02-25T22:55:04.156660
2021-02-01T22:17:06
2021-02-01T22:17:06
334,241,656
0
0
null
null
null
null
UTF-8
C++
false
false
4,998
cpp
#include "Game.h" #include <algorithm> #include <ctime> #include <iomanip> #include "glm/gtx/string_cast.hpp" #include "Renderer.h" #include "EventManager.h" // IMGUI Includes #include "imgui.h" #include "imgui_sdl.h" Game* Game::s_pInstance = nullptr; // Game functions - DO NOT REMOVE *********************************************** Game::Game() : m_pWindow(nullptr), m_bRunning(true), m_frames(0), m_currentScene(nullptr), m_currentSceneState(NO_SCENE) { srand(unsigned(time(nullptr))); // random seed } Game::~Game() = default; void Game::init() { m_bRunning = true; } bool Game::init(const char* title, const int x, const int y, const int width, const int height, const bool fullscreen) { auto flags = 0; if (fullscreen) { flags = SDL_WINDOW_FULLSCREEN; } // initialize SDL if (SDL_Init(SDL_INIT_EVERYTHING) >= 0) { std::cout << "SDL Init success" << std::endl; // if succeeded create our window m_pWindow = (Config::make_resource(SDL_CreateWindow(title, x, y, width, height, flags))); // if window creation successful create our renderer if (m_pWindow != nullptr) { std::cout << "window creation success" << std::endl; // create a new SDL Renderer and store it in the Singleton const auto renderer = (Config::make_resource(SDL_CreateRenderer(m_pWindow.get(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC))); Renderer::Instance()->setRenderer(renderer); if (Renderer::Instance()->getRenderer() != nullptr) // render init success { std::cout << "renderer creation success" << std::endl; SDL_SetRenderDrawColor(Renderer::Instance()->getRenderer(), 255, 255, 255, 255); } else { std::cout << "renderer init failure" << std::endl; return false; // render int fail } // IMGUI ImGui::CreateContext(); ImGuiSDL::Initialize(Renderer::Instance()->getRenderer(), width, height); // Initialize Font Support if (TTF_Init() == -1) { printf("SDL_ttf could not initialize! SDL_ttf Error: %s\n", TTF_GetError()); return false; } start(); } else { std::cout << "window init failure" << std::endl; return false; // window init fail } } else { std::cout << "SDL init failure" << std::endl; return false; //SDL could not intialize } std::cout << "init success" << std::endl; m_bRunning = true; // everything initialized successfully - start the main loop return true; } void Game::start() { m_currentSceneState = NO_SCENE; //TODO: temporarily commented out changeSceneState(START_SCENE); //changeSceneState(PLAY_SCENE); } bool Game::isRunning() const { return m_bRunning; } glm::vec2 Game::getMousePosition() const { return m_mousePosition; } void Game::setFrames(const Uint32 frames) { m_frames = frames; } Uint32 Game::getFrames() const { return m_frames; } float Game::getDeltaTime() const { return m_deltaTime; } void Game::setDeltaTime(const float time) { m_deltaTime = time; } void Game::changeSceneState(const SceneState new_state) { if (new_state != m_currentSceneState) { // scene clean up if (m_currentSceneState != NO_SCENE) { m_currentScene->clean(); std::cout << "cleaning previous scene" << std::endl; FontManager::Instance()->clean(); std::cout << "cleaning FontManager" << std::endl; TextureManager::Instance()->clean(); std::cout << "cleaning TextureManager" << std::endl; } m_currentScene = nullptr; m_currentSceneState = new_state; EventManager::Instance().reset(); switch (m_currentSceneState) { case START_SCENE: m_currentScene = new StartScene(); std::cout << "start scene activated" << std::endl; break; case ARRIVAL: m_currentScene = new Arrival(); std::cout << "Arrival scene activated" << std::endl; break; case SEEkING: m_currentScene = new Seeking(); std::cout << "Seeking scene activated" << std::endl; break; case FLEEING: m_currentScene = new Fleeing(); std::cout << "Fleeing scene activated" << std::endl; break; case BLANKING: m_currentScene = new Blanking(); std::cout << "Blanking scene activated" << std::endl; break; case PLAY_SCENE: m_currentScene = new PlayScene(); std::cout << "play scene activated" << std::endl; break; case END_SCENE: m_currentScene = new EndScene(); std::cout << "end scene activated" << std::endl; break; default: std::cout << "default case activated" << std::endl; break; } } } void Game::quit() { m_bRunning = false; } void Game::render() const { SDL_RenderClear(Renderer::Instance()->getRenderer()); // clear the renderer to the draw colour m_currentScene->draw(); SDL_RenderPresent(Renderer::Instance()->getRenderer()); // draw to the screen } void Game::update() const { m_currentScene->update(); } void Game::clean() const { std::cout << "cleaning game" << std::endl; // Clean Up for IMGUI ImGui::DestroyContext(); TTF_Quit(); SDL_Quit(); } void Game::handleEvents() { m_currentScene->handleEvents(); }
[ "71092442+havadora@users.noreply.github.com" ]
71092442+havadora@users.noreply.github.com
9afd55466d6669afb32a97aee9f335bd97d1dd3e
f0df030693cbba771b1614be2f6fea3859bae284
/Classes/1/GameOverScene.h
a0dc14f1be20c8f298854fba4000aea803a4ff72
[]
no_license
atom-chen/TowerDefense-2
0feeb8ea3145dd5e7078ef8a1ade95d7c193873e
2ec2a480195ddbb09458ff595b5b3ca29e53da8a
refs/heads/master
2020-07-03T23:57:45.257622
2015-05-24T11:00:05
2015-05-24T11:00:05
null
0
0
null
null
null
null
GB18030
C++
false
false
436
h
/* 文件名: GameOverScene.h 描 述: 游戏结束场景 创建人: 笨木头_钟迪龙 (博客:http://www.benmutou.com) */ #ifndef _GameOverScene_H_ #define _GameOverScene_H_ #include "cocos2d.h" USING_NS_CC; class GameOverScene : public Layer { public: static Scene* createScene(); CREATE_FUNC(GameOverScene); virtual bool init(); private: void backToTollgateSelectScene(float dt); }; #endif
[ "419955247@qq.com" ]
419955247@qq.com
d9e776bff81e2d3e4120493be88c378f6da6eb75
f35f2a76bf9fcd674e1cddd832984ee648313197
/src/dale/Form/TopLevel/Once/Once.h
37329652ee766851edae5be251247e811da2da9e
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
BitPuffin/dale
66009b9e0c2eb4a7fc4a1be27c85adc4f0a1f537
4e24aee5b0cd9a2e6ebbfffa551ca802a3a42a95
refs/heads/master
2021-01-23T21:34:26.782340
2015-04-10T23:36:01
2015-04-10T23:36:01
33,826,064
1
0
null
2015-04-12T17:20:48
2015-04-12T17:20:48
null
UTF-8
C++
false
false
305
h
#ifndef DALE_FORM_TOPLEVEL_ONCE #define DALE_FORM_TOPLEVEL_ONCE #include "../../../Units/Units.h" namespace dale { /*! Parse a top-level once form. * @param units The units context. * @param node The node containing the once form. */ bool FormTopLevelOnceParse(Units *units, Node *node); } #endif
[ "tomh5908@gmail.com" ]
tomh5908@gmail.com
a0c67e618b636cee0cd453d29e8fb0258d1b84e9
1adab2d2cc6fe69dbec7c3353b98ea77e06644bb
/Aggregation/Aggregation/driver.cpp
5a88433ba0830e23035a27dfa5ed650df9fb46f5
[]
no_license
BilalAli181999/OOP-IN-C_Plus_Plus
681bb28774bfe8c998456cb28f154a313f8292ae
09274e930a33b05fb6acedb9de57b8ac2f6a8e1d
refs/heads/master
2020-07-16T04:50:23.605385
2019-09-01T20:37:23
2019-09-01T20:37:23
205,723,018
0
0
null
null
null
null
UTF-8
C++
false
false
118
cpp
#include<iostream> #include"task.h" using namespace std; int main() { task t;//(1, 2, 3, 4, 5, 6, 7); t.display(); }
[ "m.bilalali181999@gmail.com" ]
m.bilalali181999@gmail.com
dec06f1da4a7245f98e743cd82c61277e8c1f155
335964a54bafab484ca3809880cf9009436faee9
/include/Object.h
528c375488f71724a78c0fa6625ba4ff3c256a4b
[]
no_license
kdar/cwc3
78144c11f0b7d8b5c6608a014820ad00a895d1e3
7e694419fb89e4804414c0a6e22fbb75c4ed4548
refs/heads/master
2020-04-05T22:37:34.687974
2017-04-27T22:23:18
2017-04-27T22:23:18
445,419
7
1
null
null
null
null
UTF-8
C++
false
false
608
h
#ifndef _OBJECT_H #define _OBJECT_H #include "Lib.h" //Note on shared_from_this, you can only obtain it if you have //created a shared_ptr to this object first. So for example, if you have //a class named Caca that inherits Object<Caca>, then somewhere you must do: //shared_ptr<Caca> caca(new Caca()); before SharedPtr() will work. //------------------------------- template <class T> class Object : public enable_shared_from_this<T> { public: Object() {} virtual ~Object() {} virtual shared_ptr<T> SharedPtr() { return enable_shared_from_this<T>::shared_from_this(); } }; #endif
[ "kdarlington@rxmanagement.net" ]
kdarlington@rxmanagement.net
08b7223f7f8ec355b04af7c3c9d10f788028c6ec
d929a123e5a6a6f77bd7147249156f29e6ff7bce
/shader.h
0d1947b9ee18e47400a2c3ae565cabc94a9ec3cd
[]
no_license
MayankMohan/DemonHacks-2017
000ed722ff1657994ca25f4b05babc6da7a8991c
38b6c4d6ae7911d7c74b948920774f84e5fe2f46
refs/heads/master
2021-07-20T12:31:28.763287
2017-10-29T10:40:38
2017-10-29T10:40:38
108,605,017
1
0
null
null
null
null
UTF-8
C++
false
false
666
h
#pragma once #include <string> #include <GL/glew.h> #include "transform.h" #include "cam.h" class Shader{ public: Shader(const std::string& fileName); ~Shader(); void Update(const Transform *trans, const Camera &cam); void Bind(); GLuint GenShader(const std::string& source, GLenum shaderType); std::string LoadShader(const std::string& fileName); void CheckShaderError(GLuint shader, GLuint flag, bool isProgram, const std::string& errorMessage); private: static const size_t _NUM_SHADERS = 2; GLuint _prog; GLuint _shaders[_NUM_SHADERS]; enum{ _UNI_TRANSFORM, _UNI_COLOR, _NUM_UNI }; GLuint _unis[_NUM_UNI]; };
[ "myepicuncle@gmail.com" ]
myepicuncle@gmail.com
9f076edcf1015143e4e2bb9ff2cfb82c60af01e5
42b68e18d6bf4aef0962da5ce58f9d97028eecaf
/upredictor/charm/planning/libpfcomm/include/smcgetpartevent.h
8e270ae58d0b84c69386b573188c62c7530fb827
[]
no_license
ssheikho/uPredictor
0f0b4cdea1a30193fce5d6b44307fd1e2cfe76d6
c95a7923cb5714590496fab571d318674cb2861f
refs/heads/master
2021-07-11T03:00:39.556540
2017-10-06T02:57:48
2017-10-06T02:57:48
105,960,135
1
0
null
null
null
null
UTF-8
C++
false
false
500
h
#ifndef SMC_GET_PART_EVENT_H #define SMC_GET_PART_EVENT_H #include "smceventmodel.h" class SMCGetPartEvent : public SMCEventModel { public: SMCGetPartEvent(ParamList *pl, WorldModel *wm, SMCConnection &smcc, bool liveFire); ~SMCGetPartEvent(); void process(const CProtocol::tSMCPayload *payload); bool isDone(); void start(); protected: string getRobotControlMessage(); enum { STATE_NULL, STATE_START, STATE_INTERMEDIATE, STATE_END }; int _state; }; #endif
[ "sara.sheikholeslami@ubc.ca" ]
sara.sheikholeslami@ubc.ca
695f83320c6d45fb29e82ba6b156c23118e4b0d4
a80d1e50f6cc2decedd74fd31c1c874607b8e36a
/src/math/Rational.h
ecd017c01d63f444e8d561676675a1abc53dab48
[]
no_license
nbduke/custom-tools-native
9fd9a86a819482396e19e1eab92fe0ddb2023fb6
cf62bc94dfab10138a9a6f4597cf9761ab3c7221
refs/heads/master
2020-03-14T00:43:39.924784
2018-10-11T07:13:09
2018-10-11T07:13:09
131,362,690
0
0
null
2018-10-11T07:13:10
2018-04-28T02:08:18
C++
UTF-8
C++
false
false
2,204
h
#pragma once namespace Tools { namespace Math { /* * Represents a rational number by storing the numerator * and denominator. */ class Rational { public: #pragma region Constructors Rational(); Rational(int p); Rational(int p, int q); #pragma endregion #pragma region Member methods int p() const; int q() const; virtual Rational getInverted() const; virtual Rational getReduced() const; virtual double getValue() const; #pragma endregion #pragma region Operators virtual Rational& operator=(int x); virtual double operator+(double x) const; virtual Rational operator+(int x) const; virtual Rational operator+(const Rational& other) const; virtual Rational operator-() const; virtual double operator-(double x) const; virtual Rational operator-(int x) const; virtual Rational operator-(const Rational& other) const; virtual double operator*(double x) const; virtual Rational operator*(int x) const; virtual Rational operator*(const Rational& other) const; virtual double operator/(double x) const; virtual Rational operator/(int x) const; virtual Rational operator/(const Rational& other) const; virtual bool operator==(double x) const; virtual bool operator==(int x) const; virtual bool operator==(const Rational& other) const; virtual bool operator!=(double x) const; virtual bool operator!=(int x) const; virtual bool operator!=(const Rational& other) const; virtual bool operator<(double x) const; virtual bool operator<(int x) const; virtual bool operator<(const Rational& other) const; virtual bool operator<=(double x) const; virtual bool operator<=(int x) const; virtual bool operator<=(const Rational& other) const; virtual bool operator>(double x) const; virtual bool operator>(int x) const; virtual bool operator>(const Rational& other) const; virtual bool operator>=(double x) const; virtual bool operator>=(int x) const; virtual bool operator>=(const Rational& other) const; virtual operator double() const; #pragma endregion private: int compare(int x) const; int compare(const Rational& other) const; static int compare(int lhs, int rhs); int m_p; int m_q; }; }}
[ "nbduke@outlook.com" ]
nbduke@outlook.com
99a5ee81d83363488face831e380316eff300ff7
e0f08f8cc9f0547a55b2263bd8b9ee17dcb6ed8c
/SPOJ/QN01.cpp
882beb567607e1b09c45c2c27837dde5db3a7f23
[ "MIT" ]
permissive
aqfaridi/Competitve-Programming-Codes
437756101f45d431e4b4a14f4d461e407a7df1e9
d055de2f42d3d6bc36e03e67804a1dd6b212241f
refs/heads/master
2021-01-10T13:56:04.424041
2016-02-15T08:03:51
2016-02-15T08:03:51
51,711,974
0
0
null
null
null
null
UTF-8
C++
false
false
1,775
cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <sstream> #include <vector> #include <iomanip> #include <cmath> #include <set> #include <map> #include <queue> using namespace std; typedef long long LL; typedef pair<int,int> pii; #define pb push_back #define mp make_pair #define sz size() #define ln length() #define forr(i,a,b) for(int i=a;i<b;i++) #define rep(i,n) forr(i,0,n) #define all(v) v.begin(),v.end() #define uniq(v) sort(all(v));v.erase(unique(all(v)),v.end()) #define clr(a) memset(a,0,sizeof a) #define debug if(1) #define debugoff if(0) #define print(x) cerr << x << " "; #define pn() cerr << endl; #define trace1(x) cerr << #x << ": " << x << endl; #define trace2(x, y) cerr << #x << ": " << x << " | " << #y << ": " << y << endl; #define trace3(x, y, z) cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl; #define MAX 1010 #define MOD 1000000007 int arr[MAX],xr[MAX]; int main() { int t,n,maxx,pos_i,pos_j,xr_ij; scanf("%d",&n); forr(i,1,n+1) scanf("%d",&arr[i]); xr[0] = 0; xr[1] = arr[1]; forr(i,2,n+1) xr[i] = xr[i-1]^arr[i]; maxx = 0; for(int i=1;i<=n;i++) { for(int j=i;j<=n;j++) { //i and j xr_ij = (xr[j]^xr[i-1]); if(xr_ij > maxx) { maxx = xr_ij; pos_i = i; pos_j = j; } } } printf("%d\n",maxx); printf("%d %d\n",pos_i,pos_j); return 0; }
[ "aqfaridi@gmail.com" ]
aqfaridi@gmail.com
60aa12efccef096e3efe3abeed2e1c435d6de90e
3b41cce3457d0720387244343d07c6d8f8ff6e20
/src/uvjs_loop.h
f5091abe1cdcd6331b823d6c4cf1d5a87f2d3780
[]
no_license
bsparks/libuv.js
c2c63a4370c147501c5510263e9314ed7b99e37f
5087804fed7f7c152880c30d849ba9def9c3e229
refs/heads/master
2021-01-21T03:08:30.788851
2013-12-01T23:04:45
2013-12-01T23:04:45
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,730
h
#pragma once #include <assert.h> #include <uv.h> namespace uvjs { namespace detail { // helper to unwrap a v8::Value into a uv_loop_t* // the value is expected to be Object type // and have an internal field for the uv_loop_t* static inline uv_loop_t* UnwrapLoop(v8::Handle<v8::Value> val) { assert(val->IsObject()); v8::Handle<v8::Object> handle = val->ToObject(); assert(!handle.IsEmpty()); assert(handle->InternalFieldCount() > 0); return static_cast<uv_loop_t*>(handle->GetAlignedPointerFromInternalField(0)); } // cleanup a uv_loop_t* created in loop_new // we don't use object_wrap to be leaner static void WeakUvLoop(v8::Isolate* isolate, v8::Persistent<v8::Object>* persistent, uv_loop_t* loop) { v8::HandleScope scope(isolate); assert(loop); if (persistent->IsEmpty()) { return; } assert(persistent->IsNearDeath()); persistent->ClearWeak(); persistent->Dispose(); uv_loop_delete(loop); } void loop_new(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); uv_loop_t* new_loop = uv_loop_new(); v8::Handle<v8::ObjectTemplate> obj = v8::ObjectTemplate::New(); obj->SetInternalFieldCount(1); v8::Local<v8::Object> instance = obj->NewInstance(); instance->SetAlignedPointerInInternalField(0, new_loop); v8::Persistent<v8::Object> persistent; persistent.Reset(v8::Isolate::GetCurrent(), instance); persistent.MakeWeak(new_loop, WeakUvLoop); persistent.MarkIndependent(); args.GetReturnValue().Set(instance); } void default_loop(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); v8::Handle<v8::ObjectTemplate> obj = v8::ObjectTemplate::New(); obj->SetInternalFieldCount(1); v8::Local<v8::Object> obj_inst = obj->NewInstance(); obj_inst->SetAlignedPointerInInternalField(0, uv_default_loop()); args.GetReturnValue().Set(obj_inst); } void run(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); assert(args.Length() == 2); assert(args[1]->IsInt32()); const int run_mode = args[1]->ToInteger()->Value(); const int result = uv_run(UnwrapLoop(args[0]), static_cast<uv_run_mode>(run_mode)); args.GetReturnValue().Set(v8::Integer::New(result)); } void stop(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); assert(args.Length() == 1); uv_stop(UnwrapLoop(args[0])); } void update_time(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); assert(args.Length() == 1); uv_update_time(UnwrapLoop(args[0])); } void backend_fd(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); assert(args.Length() == 1); const int fd = uv_backend_fd(UnwrapLoop(args[0])); args.GetReturnValue().Set(v8::Integer::New(fd)); } void backend_timeout(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); assert(args.Length() == 1); const int timeout = uv_backend_timeout(UnwrapLoop(args[0])); args.GetReturnValue().Set(v8::Integer::New(timeout)); } void now(const v8::FunctionCallbackInfo<v8::Value>& args) { v8::HandleScope handle_scope(args.GetIsolate()); assert(args.Length() == 1); // we don't have a good way to create 64bit numbers in js // so for now we will just cast this to double const uint64_t now = uv_now(UnwrapLoop(args[0])); args.GetReturnValue().Set(v8::Number::New(static_cast<double>(now))); } } // namespace detail } // namespace uvjs
[ "shtylman@gmail.com" ]
shtylman@gmail.com
e2c8edda1e0a9c60eaf3d01f72696e1c61037eec
be6061392ebd7ab08dfaa8219eb3515b3de47e93
/tests/aecho/generated/l_class_OC_Fifo1.h
c9cbe14fb8321ca45a9635ff3882e848692235f8
[ "MIT" ]
permissive
chenm001/connectal
7848385216ae34b727591ef9055d48ac30855934
66d30ffcca8e0260041fb6b48b3200411ff73282
refs/heads/master
2023-04-17T15:21:05.308406
2023-04-16T21:32:10
2023-04-16T21:32:10
50,326,674
1
0
MIT
2023-04-17T02:18:45
2016-01-25T04:45:13
Bluespec
UTF-8
C++
false
false
343
h
#ifndef __l_class_OC_Fifo1_H__ #define __l_class_OC_Fifo1_H__ class l_class_OC_Fifo1 { unsigned int element; bool full; public: void in_enq(unsigned int in_enq_v); bool in_enq__RDY(void); void out_deq(void); bool out_deq__RDY(void); unsigned int out_first(void); bool out_first__RDY(void); }; #endif // __l_class_OC_Fifo1_H__
[ "jca@alum.mit.edu" ]
jca@alum.mit.edu
227088701c9017cb94d77390c8dc79309baec56f
9aeb33851850e59e33d68ef094cb169383e7ef4c
/WS05/in-lab/w5_lab.cpp
83006ecb033ed0e47461687df9c7bce48e1e0dba
[]
no_license
janahvitalicio/Cpp-Object-Oriented-Software-Development
504ca2dd5731b1a295a50b9f9fc0f623109ad57a
10f1ff90d45105d669b0ff05097542011984b34e
refs/heads/main
2022-12-28T00:20:26.864664
2020-10-13T04:21:45
2020-10-13T04:21:45
303,584,641
0
0
null
null
null
null
UTF-8
C++
false
false
2,941
cpp
// Name: Janah Vitalicio // Date of completion: October 10, 2019 // Workshop 5 - Functions and Error Handling // 2019/10 - Cornel #include <iostream> #include <iomanip> #include <fstream> #include <string> #include "Book.h" #include "Book.h" using namespace sdds; // ws books.txt int main(int argc, char** argv) { std::cout << "Command Line:\n"; std::cout << "--------------------------\n"; for (int i = 0; i < argc; i++) std::cout << std::setw(3) << i + 1 << ": " << argv[i] << '\n'; std::cout << "--------------------------\n\n"; // get the books sdds::Book library[7]; { // load the collection of books from the file "argv[1]". // read one line at a time, and pass it to the Book constructor // store each book read into the array "library" // lines that start with "#" are considered comments and should be ignored std::ifstream file(argv[1]); if (!file) { std::cerr << "ERROR: Cannot open file [" << argv[1] << "].\n"; return 1; } std::string strBook; size_t cnt = 0; // read from the file; load and store data file.clear(); file.seekg(std::ios::beg); do { std::getline(file, strBook); // if the previous operation failed, the "file" object is // in error mode if (file) { // Check if this is a commented line. // In the input file, commented lines start with '#' if (strBook[0] != '#') { library[cnt] = sdds::Book(strBook); cnt++; } } } while (file); file.close(); } double usdToCadRate = 1.3; double gbpToCadRate = 1.5; // create a lambda expression that fixes the price of a book accoding to the rules // the expression should receive a single parameter of type "Book&" // if the book was published in US, multiply the price with "usdToCadRate" // and save the new price in the book object // if the book was published in UK between 1990 and 1999 (inclussive), // multiply the price with "gbpToCadRate" and save the new price in the book object auto fixPrice = [&](Book& b) { if (b.country() == "US") { b.price() *= usdToCadRate; } else if (b.country() == "UK" && (b.year() >= 1990 && b.year() <= 1999)) { b.price() *= gbpToCadRate; } }; std::cout << "-----------------------------------------\n"; std::cout << "The library content\n"; std::cout << "-----------------------------------------\n"; for (auto& book : library) std::cout << book; std::cout << "-----------------------------------------\n\n"; // iterate over the library and update the price of each book // using the lambda defined above. for (int i = 0; i < 7; i++) { fixPrice(library[i]); } std::cout << "-----------------------------------------\n"; std::cout << "The library content (updated prices)\n"; std::cout << "-----------------------------------------\n"; for (auto& book : library) std::cout << book; std::cout << "-----------------------------------------\n"; return 0; }
[ "noreply@github.com" ]
noreply@github.com
07ac363a71c8d4d6db653a2fc2cb91162c57febe
e85ff69b3e8d71a94c6ea5da0678331ee5d69374
/Hazel/src/Platform/OpenGL/OpenGLContext.cpp
5a6c5b375ba601d81bf06a2ebebcf920f08659cc
[ "Apache-2.0" ]
permissive
MengxuanHUANG/Hazel
8127757d1aac4862b65aa503f4ae8ed523888e48
5413a368429c52f3c6b2b86820b6bc174d672c1f
refs/heads/master
2022-10-11T22:11:29.120723
2020-06-13T16:07:14
2020-06-13T16:07:14
264,868,963
0
0
null
null
null
null
UTF-8
C++
false
false
761
cpp
#include "HZpch.h" #include "OpenGLContext.h" #include <GLFW/glfw3.h> #include <glad/glad.h> namespace Hazel { OpenGLContext::OpenGLContext(GLFWwindow* windowHandle) :m_WindowHandle(windowHandle) { HZ_CORE_ASSERT(windowHandle,"Handle is null!"); } void OpenGLContext::Init() { HZ_PROFILE_FUNCTION(); glfwMakeContextCurrent(m_WindowHandle); int status = gladLoadGLLoader((GLADloadproc)glfwGetProcAddress); HZ_CORE_ASSERT(status, "Failed to iniitalize Glad!"); HZ_CORE_INFO(" Vendor: {0}", glGetString(GL_VENDOR)); HZ_CORE_INFO(" Renderer: {0}", glGetString(GL_RENDERER)); HZ_CORE_INFO(" Version: {0}", glGetString(GL_VERSION)); } void OpenGLContext::SwapBuffers() { HZ_PROFILE_FUNCTION(); glfwSwapBuffers(m_WindowHandle); } }
[ "邮箱" ]
邮箱
185270b45c916d8c402105d04512b90fc9cd2a22
c9b0dcab4bcffe4315be0df4cd9055819dc469a8
/document/program/C or C++/base/C++/C++_pro/hrient/src/hrient.h
34cf0bbf46ea4ae2b02e7f01d9fa33f98c9f5032
[]
no_license
exuuwen/study
83250f1cde1afff937963912fdd026df2cf48bd0
c92b937351c2084759cf0a11cc535f5fb97488a3
refs/heads/master
2023-04-09T21:34:31.042551
2023-03-27T09:28:00
2023-03-27T09:28:00
61,179,598
6
6
null
null
null
null
UTF-8
C++
false
false
2,929
h
/* * hrient.h * * Created on: Nov 12, 2010 * Author: dragon */ #ifndef HRIENT_H_ #define HRIENT_H_ #include <iostream> using namespace std; class Item_base { public: Item_base(const string & book = "", double pri = 0.0):isdn(book), price(pri){} /*Item_base(const Item_base& orgin) { }*/ string book_isdn() const {return isdn;} virtual Item_base* clone() const {return new Item_base(*this);} virtual double net_price(size_t num) const //virtual 参数为基类引用动态绑定 { //cout << "in the item_base net_price" << endl; return price * num; } const string print_class_name() const //都有 但是调用时看参数是那个类 就是哪个 { return "Item_base" ; } double book_price() const {return price;} virtual ~Item_base(){} protected: double price; private: string isdn; }; class Disc_item : public Item_base { public: Disc_item(const string & book = "", double pri = 0.0, size_t qty = 0, double disc = 0.0):Item_base(book, pri), quantity(qty), discount(disc){} const string print_class_name() const //都有 但是调用时看参数是那个类 就是哪个 { return "Disc_item" ; } virtual Disc_item* clone() const = 0; virtual double net_price(size_t num) const = 0; protected: size_t quantity; double discount; }; class Bulk_item : public Disc_item { public: Bulk_item(const string & book = "", double pri = 0.0, size_t qty = 0, double disc = 0.0):Disc_item(book, pri, qty, disc){} double net_price(size_t num) const { //cout << "in the bulk_item net_price" << endl; if(num >= quantity) return price * num * (1 - discount); else return price * num; } Bulk_item* clone() const {return new Bulk_item(*this);} const string print_class_name() const //都有 但是调用时看参数是那个类 就是哪个 { return "Bulk_item" ; } }; class Sales_item { public: Sales_item():p(0), use(new size_t(1)){} Sales_item(const Item_base& item):p(item.clone()), use(new size_t(1)){} Sales_item(const Sales_item& item):p(item.p),use(item.use){++*use;} ~Sales_item(){decr_use();} Sales_item& operator=(const Sales_item& item) { decr_use(); p = item.p; use = item.use; ++*use; return *this; } const Item_base& operator*() const { if(p) return *p; //else } const Item_base* operator->() const { if(p) return p; //else } private: Item_base *p; size_t *use; void decr_use() { if(--*use == 0) { delete p; delete use; } } }; void print_total(ostream &os, const Item_base &item, size_t n) { os << "isdb:" << item.book_isdn() << endl; os << "price:" << item.book_price() << endl; os << "total num:" << n << endl; os << "total price:" << item.net_price(n) << endl; os << "class name is:" << item.print_class_name() <<endl; } class A { public: virtual void f(){ cout<<"in the A"<<endl;} }; class B:public A { public: void f(int a){ cout<<"in the B"<<endl;} }; #endif /* HRIENT_H_ */
[ "wenx05124561@163.com" ]
wenx05124561@163.com
f705760272cbc6bbb19c86ff4e8f686be4a2e2a4
25c752aedf3ebbb5f580b4d829892314fc5a55dc
/bcl/bcl/core/comm.hpp
6fbdb6740415a971d1cdaedd60383101651d3aae
[ "BSD-3-Clause" ]
permissive
iamnotalone1993/dds
e8ff35d045cc8bd5fd89b9d0bae1301ca3f996ec
e8f2167c48f73d4ba739479eb59fc6d43b8c0070
refs/heads/master
2023-04-05T22:15:13.653446
2023-03-30T16:56:04
2023-03-30T16:56:04
253,201,624
0
0
null
null
null
null
UTF-8
C++
false
false
2,427
hpp
#pragma once namespace BCL { template <typename T> inline void rput(const T &src, const GlobalPtr <T> &dst) { BCL::write(&src, dst, 1); } template <typename T> inline void rput(const T *src, const GlobalPtr <T> &dst, const size_t size) { BCL::write(src, dst, size); } template <typename T> inline void rget(const GlobalPtr <T> &src, T *dst, const size_t size) { BCL::read(src, dst, size); } template <typename T> inline void rget_atomic(const GlobalPtr <T> &src, T *dst, const size_t size) { BCL::atomic_read(src, dst, size); } template <typename T> inline T rget_atomic(const GlobalPtr <T> &src) { T rv; BCL::atomic_read(src, &rv, 1); return rv; } template <typename T> inline T rget(const GlobalPtr <T> &src) { T rv; BCL::read(src, &rv, 1); return rv; } template <typename T, typename Allocator = BCL::bcl_allocator<T>> inline future<std::vector<T, Allocator>> arget(const GlobalPtr<T>& src, size_t size) { std::vector<T, Allocator> dst(size); BCL::request request = async_read(src, dst.data(), size); return BCL::future<std::vector<T, Allocator>>(std::move(dst), std::move(request)); } // TODO: should this also accept an allocator? template <typename T> inline BCL::future<T> arget(const GlobalPtr<T>& src) { future<T> fut; BCL::request request = async_read(src, fut.value_.get(), 1); fut.update(request); return std::move(fut); } template <typename T> inline BCL::request arget(const GlobalPtr<T>& src, T* dst, size_t size) { return async_read(src, dst, size); } template <typename T, typename Allocator> inline future<std::vector<T, Allocator>> arput(const GlobalPtr<T>& dst, std::vector<T, Allocator>&& src) { BCL::request request = async_write(src.data(), dst, src.size()); return BCL::future<std::vector<T, Allocator>>(std::move(src), std::move(request)); } template <typename T> inline BCL::request arput(const GlobalPtr<T>& dst, const T* src, size_t n_elem) { return async_write(src, dst, n_elem); } inline void memcpy(const GlobalPtr<void>& dst, const void* src, size_t n) { BCL::write(static_cast<const char*>(src), BCL::reinterpret_pointer_cast<char>(dst), n); } inline void memcpy(void* dst, const GlobalPtr<void>& src, size_t n) { BCL::read(BCL::reinterpret_pointer_cast<char>(src), static_cast<char*>(dst), n); } } // end BCL
[ "diepda@lapnm10.in.nm.ifi.lmu.de" ]
diepda@lapnm10.in.nm.ifi.lmu.de
210f03e77521db5f956a57fe494b924c77404ab3
5bb9ada8897fcd028a0afd57e04bb5c8d3b922ed
/sourceCode/fairport/branch/nikkul/pstsdk/pst/pst.h
a795994757ddc45a878f9a3ea225680eee0588b2
[ "Apache-2.0" ]
permissive
enrondata/microsoft-pst-sdk
9122e78b3b227f9477cdbd8854e912ea7b386b13
70701d755f52412f0f21ed216968e314433a324e
refs/heads/master
2022-07-27T01:48:15.472987
2018-07-22T15:27:50
2018-07-22T15:27:50
141,904,666
4
0
null
null
null
null
UTF-8
C++
false
false
8,251
h
//! \file //! \brief PST implementation //! //! This file contains the implementation of the "pst" object, the object that //! most users of the library will be most familiar with. It's the entry point //! to the pst file, allowing you to search for, enumerate over, and directly //! open the sub objects which contain the actual data. //! //! Named property resolution was also exposed on this object. //! \author Terry Mahaffey //! \ingroup pst #ifndef PSTSDK_PST_PST_H #define PSTSDK_PST_PST_H #include <boost/noncopyable.hpp> #include <boost/iterator/filter_iterator.hpp> #include <boost/iterator/transform_iterator.hpp> #include "pstsdk/ndb/database.h" #include "pstsdk/ndb/database_iface.h" #include "pstsdk/ndb/node.h" #include "pstsdk/ltp/propbag.h" #include "pstsdk/ltp/nameid.h" #include "pstsdk/pst/folder.h" #include "pstsdk/pst/message.h" namespace pstsdk { //! \defgroup pst_pstrelated PST //! \ingroup pst //! \brief A PST file //! //! pst represents a pst file on disk. Both OST and PST files are supported, //! both ANSI and Unicode. Once a client creates a PST file, this object //! supports: //! - iterating over all messages in the store //! - iterating over all folders in the store //! - opening the root folder //! - opening a specific folder by name //! - performing named property lookups //! \ingroup pst_pstrelated class pst : private boost::noncopyable { typedef boost::filter_iterator<is_nid_type<nid_type_folder>, const_nodeinfo_iterator> folder_filter_iterator; typedef boost::filter_iterator<is_nid_type<nid_type_message>, const_nodeinfo_iterator> message_filter_iterator; public: //! \brief Message iterator type; a transform iterator over a filter iterator over a nodeinfo iterator typedef boost::transform_iterator<message_transform_info, message_filter_iterator> message_iterator; //! \brief Folder iterator type; a transform iterator over a filter iterator over a nodeinfo iterator typedef boost::transform_iterator<folder_transform_info, folder_filter_iterator> folder_iterator; //! \brief Construct a pst object from the specified file //! \param[in] filename The pst file to open on disk pst(const std::wstring& filename) : m_db(open_database(filename)) { } #ifndef BOOST_NO_RVALUE_REFERENCES //! \brief Move constructor //! \param[in] other The other pst file pst(pst&& other) : m_db(std::move(other.m_db)), m_bag(std::move(other.m_bag)), m_map(std::move(other.m_map)) { } #endif // subobject discovery/enumeration //! \brief Get an iterator to the first folder in the PST file //! \returns an iterator positioned on the first folder in this PST file folder_iterator folder_begin() const { return boost::make_transform_iterator(boost::make_filter_iterator<is_nid_type<nid_type_folder> >(m_db->read_nbt_root()->begin(), m_db->read_nbt_root()->end()), folder_transform_info(m_db) ); } //! \brief Get the end folder iterator //! \returns an iterator at the end position folder_iterator folder_end() const { return boost::make_transform_iterator(boost::make_filter_iterator<is_nid_type<nid_type_folder> >(m_db->read_nbt_root()->end(), m_db->read_nbt_root()->end()), folder_transform_info(m_db) ); } //! \brief Get an iterator to the first message in the PST file //! \returns an iterator positioned on the first message in this PST file message_iterator message_begin() const { return boost::make_transform_iterator(boost::make_filter_iterator<is_nid_type<nid_type_message> >(m_db->read_nbt_root()->begin(), m_db->read_nbt_root()->end()), message_transform_info(m_db) ); } //! \brief Get the end message iterator //! \returns an iterator at the end position message_iterator message_end() const { return boost::make_transform_iterator(boost::make_filter_iterator<is_nid_type<nid_type_message> >(m_db->read_nbt_root()->end(), m_db->read_nbt_root()->end()), message_transform_info(m_db) ); } //! \brief Opens the root folder of this file //! \note This is specific to PST files, as an OST file has a different root folder //! \returns The root of the folder hierarchy in this file folder open_root_folder() const { return folder(m_db, m_db->lookup_node(nid_root_folder)); } //! \brief Open a specific folder in this file //! \param[in] name The name of the folder to open //! \throws key_not_found<std::wstring> If a folder of the specified name was not found in this file //! \returns The first folder by that name found in the file folder open_folder(const std::wstring& name) const; // property access //! \brief Get the display name of the PST //! \returns The display name std::wstring get_name() const { return get_property_bag().read_prop<std::wstring>(0x3001); } //! \brief Lookup a prop_id of a named prop //! \param[in] g The namespace guid of the named prop to lookup //! \param[in] name The name of the property to lookup //! \returns The prop_id of the property looked up prop_id lookup_prop_id(const guid& g, const std::wstring& name) const { return get_name_id_map().lookup(g, name); } //! \brief Lookup a prop_id of a named prop //! \param[in] g The namespace guid of the named prop to lookup //! \param[in] id The id of the property to lookup //! \returns The prop_id of the property looked up prop_id lookup_prop_id(const guid& g, long id) const { return get_name_id_map().lookup(g, id); } //! \brief Lookup a prop_id of a named prop //! \param[in] n The named prop to lookup //! \returns The prop_id of the property looked up prop_id lookup_prop_id(const named_prop& n) { return get_name_id_map().lookup(n); } //! \brief Lookup a named prop of a prop_id //! \param[in] id The prop_id to lookup //! \returns The mapped named property named_prop lookup_name_prop(prop_id id) const { return get_name_id_map().lookup(id); } // lower layer access //! \brief Get the property bag of the store object //! \returns The property bag property_bag& get_property_bag(); //! \brief Get the named prop map for this store //! \returns The named property map name_id_map& get_name_id_map(); //! \brief Get the property bag of the store object //! \returns The property bag const property_bag& get_property_bag() const; //! \brief Get the named prop map for this store //! \returns The named property map const name_id_map& get_name_id_map() const; //! \brief Get the shared database pointer used by this object //! \returns the shared_db_ptr shared_db_ptr get_db() const { return m_db; } private: shared_db_ptr m_db; //!< The official shared_db_ptr used by this store mutable std::tr1::shared_ptr<property_bag> m_bag; //!< The official property bag of this store object mutable std::tr1::shared_ptr<name_id_map> m_map; //!< The official named property map of this store object }; } // end pstsdk namespace inline const pstsdk::property_bag& pstsdk::pst::get_property_bag() const { if(!m_bag) m_bag.reset(new property_bag(m_db->lookup_node(nid_message_store))); return *m_bag; } inline pstsdk::property_bag& pstsdk::pst::get_property_bag() { return const_cast<property_bag&>(const_cast<const pst*>(this)->get_property_bag()); } inline const pstsdk::name_id_map& pstsdk::pst::get_name_id_map() const { if(!m_map) m_map.reset(new name_id_map(m_db)); return *m_map; } inline pstsdk::name_id_map& pstsdk::pst::get_name_id_map() { return const_cast<name_id_map&>(const_cast<const pst*>(this)->get_name_id_map()); } inline pstsdk::folder pstsdk::pst::open_folder(const std::wstring& name) const { folder_iterator iter = std::find_if(folder_begin(), folder_end(), compiler_workarounds::folder_name_equal(name)); if(iter != folder_end()) return *iter; throw key_not_found<std::wstring>(name); } #endif
[ "johncwang@gmail.com" ]
johncwang@gmail.com
28cd49457be60c5af77c231e24762f68eae7375e
2fe686eec46376171f5a20e440db349fb13a3b90
/130FinalProject/130FinalProject/BTreeLeafNode.hpp
9a6d7cfd906c968341af6c7fe60d47026350647b
[]
no_license
arthurpan24/CS130A_Final_Project
0b640068f5e5e1484cf541190e2fe3bd1d1c8b3f
1124710b95f8d2f66b671619553778ca8740c1fa
refs/heads/master
2016-08-12T03:50:26.423866
2016-03-14T07:27:14
2016-03-14T07:27:14
52,401,728
0
0
null
null
null
null
UTF-8
C++
false
false
656
hpp
// // BTreeLeafNode.hpp // 130FinalProject // // Created by John Lanier on 3/12/16. // Copyright © 2016 JB Lanier. All rights reserved. // #ifndef BTreeLeafNode_hpp #define BTreeLeafNode_hpp #include <stdio.h> #include "BTreeItem.hpp" class BTreeLeafNode: public BTreeItem { public: BTreeLeafNode(); BTreeLeafNode(vector<BTreeItem*> children); virtual int getMaxChildren() override; virtual int getMinChildren() override; virtual void insert(BTreeItem* item) override; virtual BTreeItem* copyWithChildren(vector<BTreeItem*> children) override; virtual void printNode() override; }; #endif /* BTreeLeafNode_hpp */
[ "johnblanier@gmail.com" ]
johnblanier@gmail.com
a8b5fb55e72b80e11cf399790d979dffdbc45dcd
f545b849fa162f7e437eb9fd9e3958f6b81d3ddb
/BOJ/q15654.cpp
1ede4cbbbabff42043ee5fe3ba8c85025f8dc07e
[]
no_license
lkw1120/problem-solving
216fb135f1b314a10faf5e5c06d1ca03d638e935
9887ed81ce0958a9a9b7d80d754d14217e4df25a
refs/heads/master
2023-08-20T15:32:35.739832
2023-08-19T17:04:23
2023-08-19T17:04:23
172,870,054
0
0
null
null
null
null
UTF-8
C++
false
false
603
cpp
#include<bits/stdc++.h> using namespace std; int arr[9] = {0}; int input[9] = {0}; bool isUsed[9] = {false}; int N,M; void solve(int m) { if(m > M) { for(int i=1;i<=M;i++) { cout<<arr[i]<<" "; } cout<<"\n"; return ; } for(int i=1;i<=N;i++) { if(!isUsed[i]) { arr[m] = input[i]; isUsed[i] = true; solve(m+1); isUsed[i] = false; } } } bool compare(int a, int b) { return a < b; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin>>N>>M; for(int i=1;i<=N;i++) { cin>>input[i]; } sort(input,input+N+1,compare); solve(1); return 0; }
[ "lkwkang@gmail.com" ]
lkwkang@gmail.com
ae80c103e5a6b5dd8e30b92e8d76f10259059592
739c8c79108ca3e18e05edf97ceb874dd6aff60f
/include/mediamaker.h
9fb369e34804b95c4273c874f0c7e8422637232f
[ "BSD-3-Clause", "MIT" ]
permissive
JRKalyan/affign
229bfa93f8003abe6684d2bf0495314e61f25861
ef5816ecc683d4720595414a4e8355057dbbff78
refs/heads/master
2022-02-23T08:57:56.298675
2019-10-01T03:13:47
2019-10-01T03:13:47
104,672,675
26
0
null
null
null
null
UTF-8
C++
false
false
795
h
#pragma once #include "alignerconfiguration.h" #include "logger.h" #include "imagedata.h" #include "processdata.h" #include "dataextractor.h" #include "processor.h" #include <list> #include <exception> #include <memory> #include <filesystem> /// Responsible for producing Affign output class MediaMaker { public: MediaMaker(const AlignerConfiguration& config, std::shared_ptr<Logger>); void Make(); private: std::shared_ptr<Logger> m_logger; ProcessData m_data; ImageData m_referenceData; // store reference to the config for make-time configuration const AlignerConfiguration& m_config; std::vector<std::filesystem::path> m_files; std::vector<std::unique_ptr<DataExtractor>> m_extractors; std::vector<std::unique_ptr<Processor>> m_processors; void SetReference(); };
[ "john.r.kalyan@gmail.com" ]
john.r.kalyan@gmail.com
78c6d256effffedb3e0cd770f06a964c6fbb4674
f6a66a69c17ae084e0e8fe4f93fae142f6572f5c
/libs/ram/UI/ramPresetTab.cpp
42354a8f019cf3b7791316f506d70bf75a6457ce
[]
no_license
sanyaade-research-hub/RAMDanceToolkit
260793a356dbaacf9a15852163c510e0775aea3a
90509479181b6a58d870d36e8995f0b214a1662b
refs/heads/master
2020-04-08T08:05:57.085678
2013-03-05T06:52:23
2013-03-05T06:52:23
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,306
cpp
#include "ramPresetTab.h" #include "ramCameraManager.h" ramPresetTab::ramPresetTab() :ofxUITab("Presets", false) ,cameraPreset(1) { // should probably be a list of named presets instead of a grid matrix = addToggleMatrix("Presets", 4, 4); matrix->setAllowMultiple(false); addSpacer(); vector<string> cameraPresetNames; cameraPresetNames.push_back("Low"); cameraPresetNames.push_back("High"); cameraPresetNames.push_back("Overhead"); cameraPresetRadio = addRadio("Camera position", cameraPresetNames); cameraPresetRadio->getToggles()[cameraPreset]->setValue(true); autoSizeToFitWidgets(); ofAddListener(ofEvents().update, this, &ramPresetTab::setupCamera); ofAddListener(newGUIEvent, this, &ramPresetTab::guiEvent); } void ramPresetTab::setupCamera(ofEventArgs& e) { if(ofGetFrameNum() < 10) { cameraPresetRadio->getToggles()[cameraPreset]->setValue(true); cameraPresetRadio->getToggles()[cameraPreset]->triggerSelf(); } else { ofRemoveListener(ofEvents().update, this, &ramPresetTab::setupCamera); } } void ramPresetTab::guiEvent(ofxUIEventArgs &e) { int choice = getChoice(e, cameraPresetRadio); if(choice != -1) { int indices[] = {0, 1, 5}; int choice = getChoice(cameraPresetRadio); ramCameraManager::instance().rollbackDefaultCameraSetting(indices[choice]); } }
[ "kyle@kylemcdonald.net" ]
kyle@kylemcdonald.net
54eb0b9cfb97cecf703b4a11551a8e70c16ae06d
8dc84558f0058d90dfc4955e905dab1b22d12c08
/third_party/webrtc/sdk/android/src/jni/androidmediacodeccommon.h
8865b875e2e4c13a38b705e1fe3b2f584f747055
[ "LGPL-2.0-or-later", "GPL-1.0-or-later", "MIT", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause", "LicenseRef-scancode-google-patent-license-webm", "LicenseRef-scancode-google-patent-license-webrtc", "LicenseRef-scancode-takuya-ooura", "LicenseRef-scancode-public-domai...
permissive
meniossin/src
42a95cc6c4a9c71d43d62bc4311224ca1fd61e03
44f73f7e76119e5ab415d4593ac66485e65d700a
refs/heads/master
2022-12-16T20:17:03.747113
2020-09-03T10:43:12
2020-09-03T10:43:12
263,710,168
1
0
BSD-3-Clause
2020-05-13T18:20:09
2020-05-13T18:20:08
null
UTF-8
C++
false
false
3,314
h
/* * Copyright 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ #define SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_ #include <android/log.h> #include <string> #include "rtc_base/logging.h" #include "rtc_base/thread.h" #include "sdk/android/src/jni/jni_helpers.h" namespace webrtc { namespace jni { // Uncomment this define to enable verbose logging for every encoded/decoded // video frame. //#define TRACK_BUFFER_TIMING #define TAG_COMMON "MediaCodecVideo" // Color formats supported by encoder or decoder - should include all // colors from supportedColorList in MediaCodecVideoEncoder.java and // MediaCodecVideoDecoder.java. Supported color format set in encoder // and decoder could be different. enum COLOR_FORMATTYPE { COLOR_FormatYUV420Planar = 0x13, COLOR_FormatYUV420SemiPlanar = 0x15, COLOR_QCOM_FormatYUV420SemiPlanar = 0x7FA30C00, // NV12 color format supported by QCOM codec, but not declared in MediaCodec - // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h // This format is presumably similar to COLOR_FormatYUV420SemiPlanar, // but requires some (16, 32?) byte alignment. COLOR_QCOM_FORMATYVU420PackedSemiPlanar32m4ka = 0x7FA30C01, COLOR_QCOM_FORMATYVU420PackedSemiPlanar16m4ka = 0x7FA30C02, COLOR_QCOM_FORMATYVU420PackedSemiPlanar64x32Tile2m8ka = 0x7FA30C03, COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04 }; // Arbitrary interval to poll the codec for new outputs. enum { kMediaCodecPollMs = 10 }; // Arbitrary interval to poll at when there should be no more frames. enum { kMediaCodecPollNoFramesMs = 100 }; // Media codec maximum output buffer ready timeout. enum { kMediaCodecTimeoutMs = 1000 }; // Interval to print codec statistics (bitrate, fps, encoding/decoding time). enum { kMediaCodecStatisticsIntervalMs = 3000 }; // Maximum amount of pending frames for VP8 decoder. enum { kMaxPendingFramesVp8 = 1 }; // Maximum amount of pending frames for VP9 decoder. enum { kMaxPendingFramesVp9 = 1 }; // Maximum amount of pending frames for H.264 decoder. enum { kMaxPendingFramesH264 = 4 }; // Maximum amount of decoded frames for which per-frame logging is enabled. enum { kMaxDecodedLogFrames = 10 }; // Maximum amount of encoded frames for which per-frame logging is enabled. enum { kMaxEncodedLogFrames = 10 }; static inline void AllowBlockingCalls() { rtc::Thread* current_thread = rtc::Thread::Current(); if (current_thread != NULL) current_thread->SetAllowBlockingCalls(true); } // Checks for any Java exception, prints stack backtrace and clears // currently thrown exception. static inline bool CheckException(JNIEnv* jni) { if (jni->ExceptionCheck()) { RTC_LOG_TAG(rtc::LS_ERROR, TAG_COMMON) << "Java JNI exception."; jni->ExceptionDescribe(); jni->ExceptionClear(); return true; } return false; } } // namespace jni } // namespace webrtc #endif // SDK_ANDROID_SRC_JNI_ANDROIDMEDIACODECCOMMON_H_
[ "arnaud@geometry.ee" ]
arnaud@geometry.ee
d091a78d904c2c85b11fd5b872c682a92d758469
3025ede4dde77f0d17b784eba2ce44bdcd5287fb
/source/parsers/alt.hpp
481e057c1d4eaf381a1f96d97208da4f69735a01
[ "MIT" ]
permissive
ExternalRepositories/CppCmb
70bfe5b3875e8429770eb0ac260178ab8ef9711c
86b11f397bac768e7a034a34b198d08fb35456cf
refs/heads/master
2023-03-12T21:20:05.484576
2021-03-02T06:51:28
2021-03-02T06:51:28
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,708
hpp
/** * alt.hpp * * Copyright (c) 2018-2019 Peter Lenkefi * Distributed under the MIT License. * * A combinator that tries to apply the first alternative. If it fails, it tries * the second. */ #ifndef CPPCMB_PARSERS_ALT_HPP #define CPPCMB_PARSERS_ALT_HPP #include "combinator.hpp" #include "../result.hpp" #include "../sum.hpp" namespace cppcmb { /** * A tag-type for a more uniform alternative syntax. * This can be put as the first element of an alternative chain so every new * line can start with the alternative operator. It's completely ignored. * Example: * auto parser = pass * | first * | second * ; */ struct pass_t {}; inline constexpr auto pass = pass_t(); template <typename P1, typename P2> class alt_t : public combinator<alt_t<P1, P2>> { private: template <typename Src> using value_t = sum_values_t< parser_value_t<P1, Src>, parser_value_t<P2, Src> >; P1 m_First; P2 m_Second; public: template <typename P1Fwd, typename P2Fwd> constexpr alt_t(P1Fwd&& p1, P2Fwd&& p2) noexcept( std::is_nothrow_constructible_v<P1, P1Fwd&&> && std::is_nothrow_constructible_v<P2, P2Fwd&&> ) : m_First(cppcmb_fwd(p1)), m_Second(cppcmb_fwd(p2)) { } // XXX(LPeter1997): Noexcept specifier template <typename Src> [[nodiscard]] constexpr auto apply(reader<Src> const& r) const -> result<value_t<Src>> { cppcmb_assert_parser(P1, Src); cppcmb_assert_parser(P2, Src); using result_t = result<value_t<Src>>; // Try to apply the first alternative auto p1_inv = m_First.apply(r); if (p1_inv.is_success()) { auto p1_succ = std::move(p1_inv).success(); return result_t( success( sum_values<value_t<Src>>(std::move(p1_succ).value()), p1_succ.matched() ), p1_inv.furthest() ); } // Try to apply the second alternative auto p2_inv = m_Second.apply(r); if (p2_inv.is_success()) { auto p2_succ = std::move(p2_inv).success(); return result_t( success( sum_values<value_t<Src>>(std::move(p2_succ).value()), p2_succ.matched() ), std::max(p1_inv.furthest(), p2_inv.furthest()) ); } // Both failed, return the error which got further auto p1_err = std::move(p1_inv).failure(); auto p2_err = std::move(p2_inv).failure(); if (p1_inv.furthest() > p2_inv.furthest()) { return result_t(std::move(p1_err), p1_inv.furthest()); } if (p1_inv.furthest() < p2_inv.furthest()) { return result_t(std::move(p2_err), p2_inv.furthest()); } // They got to the same distance, need to merge errors // XXX(LPeter1997): Implement, for now we just return the first return result_t(std::move(p1_err), p1_inv.furthest()); } }; template <typename P1Fwd, typename P2Fwd> alt_t(P1Fwd, P2Fwd) -> alt_t<P1Fwd, P2Fwd>; /** * Operator for making alternatives. */ template <typename P1, typename P2, cppcmb_requires_t(detail::all_combinators_cvref_v<P1, P2>)> [[nodiscard]] constexpr auto operator|(P1&& p1, P2&& p2) cppcmb_return(alt_t(cppcmb_fwd(p1), cppcmb_fwd(p2))) /** * Ignore pass. */ template <typename P2, cppcmb_requires_t(detail::is_combinator_cvref_v<P2>)> [[nodiscard]] constexpr auto operator|(pass_t, P2&& p2) cppcmb_return(cppcmb_fwd(p2)) } /* namespace cppcmb */ #endif /* CPPCMB_PARSERS_ALT_HPP */
[ "lenkefi.peti@gmail.com" ]
lenkefi.peti@gmail.com
8a33a839971439ab41eb50750cd37453661c271f
5cf8a85ccf464ff54d50abcb3c59a94c605af372
/FAL/Ejercicio 3/main.cpp
7e38e08eb5c97308ca229a558cfd6bdaa70a02e9
[]
no_license
Osurac/EDA-FAL
81fc284f1529d3a0abd6a25484e2f8cbd9e97bd9
842ee290544031d47157677283bf82b52a109ebc
refs/heads/master
2021-07-11T23:33:20.326857
2020-10-29T01:06:12
2020-10-29T01:06:12
215,533,770
0
0
null
null
null
null
UTF-8
C++
false
false
2,143
cpp
// Nombre y apellidos del alumno //Álvaro Miguel Rodríguez Mateos // Usuario del juez de clase //A64 #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <algorithm> #include <string> #include <utility> // Explicación del algoritmo utilizado // Coste del algoritmo utilizado struct solucion { int suma; int valor; }; // Función que resuelve el problema // Recibe un vector con los datos // Devuelve suma de los valores y número de sumandos de la suma solucion resolver(std::vector<int> const& v) { // Inicialización de variables // Codigo del alumno int cnt=1, min=v[0], sum = v[0], res=0; solucion sol; for (int i = 1; i < v.size(); ++i) { if (v[i] < min) { min = v[i]; cnt = 1; } else if (v[i] == min) { cnt++; } sum = sum + v[i]; } res = min * cnt; sum = (sum - res) ; if (cnt == v.size()) { sol.suma = 0; sol.valor = 0; } else { sol.suma = sum; sol.valor = v.size() - cnt; } return sol; } // Resuelve un caso de prueba, leyendo de la entrada la // configuración, y escribiendo la respuesta void resuelveCaso() { // Lectura de los datos int numElem; std::cin >> numElem; std::vector<int> v(numElem); for (int& i : v) std::cin >> i; // LLamar a la función resolver solucion s = resolver(v); // Escribir los resultados std::cout << s.suma << ' ' << s.valor << '\n'; } int main() { // Para la entrada por fichero. Comentar para mandar a acepta el reto //#ifndef DOMJUDGE // std::ifstream in("sample03.in"); // auto cinbuf = std::cin.rdbuf(in.rdbuf()); //save old buf and redirect std::cin to casos.txt //#endif int numCasos; std::cin >> numCasos; for (int i = 0; i < numCasos; ++i) resuelveCaso(); // Para restablecer entrada. Comentar para mandar a acepta el reto //#ifndef DOMJUDGE // para dejar todo como estaba al principio // std::cin.rdbuf(cinbuf); // system("PAUSE"); //#endif return 0; }
[ "oravla.rodriguez@gmail.com" ]
oravla.rodriguez@gmail.com
77930e0be1d8f5f2dfe1e3320bbf04774926f4f8
47557d9677badb5f50608571f151cc5ef5596e4d
/src/flexgrid.h
134c77b1a316f025fadd13cf9fad6943dbdbe287
[]
no_license
mehdi123/StudentRy
fb53266178e4a1061d62795b33cee284816da712
33b7ad72724e17517d8032a1299a6de9ea7ee7ab
refs/heads/main
2023-03-05T07:52:11.460932
2021-02-16T07:55:02
2021-02-16T07:55:02
339,322,572
0
0
null
null
null
null
UTF-8
C++
false
false
7,757
h
#if !defined(AFX_FLEXGRID_H__40F18E67_FE54_451C_AF21_DD9D09DC7F6F__INCLUDED_) #define AFX_FLEXGRID_H__40F18E67_FE54_451C_AF21_DD9D09DC7F6F__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++ // NOTE: Do not modify the contents of this file. If this class is regenerated by // Microsoft Visual C++, your modifications will be overwritten. // Dispatch interfaces referenced by this interface class COleFont; class CPicture; class CRowCursor; ///////////////////////////////////////////////////////////////////////////// // CFlexGrid wrapper class class CFlexGrid : public CWnd { protected: DECLARE_DYNCREATE(CFlexGrid) public: CLSID const& GetClsid() { static CLSID const clsid = { 0x6262d3a0, 0x531b, 0x11cf, { 0x91, 0xf6, 0xc2, 0x86, 0x3c, 0x38, 0x5e, 0x30 } }; return clsid; } virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); } BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE, BSTR bstrLicKey = NULL) { return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID, pPersist, bStorage, bstrLicKey); } // Attributes public: // Operations public: void SortFarsi(long col, BOOL ascending = TRUE); void QuickSort(long first, long last); void Split(long first, long last, long &splitPoint); long GetRows(); void SetRows(long nNewValue); long GetCols(); void SetCols(long nNewValue); long GetFixedRows(); void SetFixedRows(long nNewValue); long GetFixedCols(); void SetFixedCols(long nNewValue); short GetVersion(); CString GetFormatString(); void SetFormatString(LPCTSTR lpszNewValue); long GetTopRow(); void SetTopRow(long nNewValue); long GetLeftCol(); void SetLeftCol(long nNewValue); long GetRow(); void SetRow(long nNewValue); long GetCol(); void SetCol(long nNewValue); long GetRowSel(); void SetRowSel(long nNewValue); long GetColSel(); void SetColSel(long nNewValue); CString GetText(); void SetText(LPCTSTR lpszNewValue); unsigned long GetBackColor(); void SetBackColor(unsigned long newValue); unsigned long GetForeColor(); void SetForeColor(unsigned long newValue); unsigned long GetBackColorFixed(); void SetBackColorFixed(unsigned long newValue); unsigned long GetForeColorFixed(); void SetForeColorFixed(unsigned long newValue); unsigned long GetBackColorSel(); void SetBackColorSel(unsigned long newValue); unsigned long GetForeColorSel(); void SetForeColorSel(unsigned long newValue); unsigned long GetBackColorBkg(); void SetBackColorBkg(unsigned long newValue); BOOL GetWordWrap(); void SetWordWrap(BOOL bNewValue); COleFont GetFont(); void SetRefFont(LPDISPATCH newValue); float GetFontWidth(); void SetFontWidth(float newValue); CString GetCellFontName(); void SetCellFontName(LPCTSTR lpszNewValue); float GetCellFontSize(); void SetCellFontSize(float newValue); BOOL GetCellFontBold(); void SetCellFontBold(BOOL bNewValue); BOOL GetCellFontItalic(); void SetCellFontItalic(BOOL bNewValue); BOOL GetCellFontUnderline(); void SetCellFontUnderline(BOOL bNewValue); BOOL GetCellFontStrikeThrough(); void SetCellFontStrikeThrough(BOOL bNewValue); float GetCellFontWidth(); void SetCellFontWidth(float newValue); long GetTextStyle(); void SetTextStyle(long nNewValue); long GetTextStyleFixed(); void SetTextStyleFixed(long nNewValue); BOOL GetScrollTrack(); void SetScrollTrack(BOOL bNewValue); long GetFocusRect(); void SetFocusRect(long nNewValue); long GetHighLight(); void SetHighLight(long nNewValue); BOOL GetRedraw(); void SetRedraw(BOOL bNewValue); long GetScrollBars(); void SetScrollBars(long nNewValue); long GetMouseRow(); long GetMouseCol(); long GetCellLeft(); long GetCellTop(); long GetCellWidth(); long GetCellHeight(); long GetRowHeightMin(); void SetRowHeightMin(long nNewValue); long GetFillStyle(); void SetFillStyle(long nNewValue); long GetGridLines(); void SetGridLines(long nNewValue); long GetGridLinesFixed(); void SetGridLinesFixed(long nNewValue); unsigned long GetGridColor(); void SetGridColor(unsigned long newValue); unsigned long GetGridColorFixed(); void SetGridColorFixed(unsigned long newValue); unsigned long GetCellBackColor(); void SetCellBackColor(unsigned long newValue); unsigned long GetCellForeColor(); void SetCellForeColor(unsigned long newValue); short GetCellAlignment(); void SetCellAlignment(short nNewValue); long GetCellTextStyle(); void SetCellTextStyle(long nNewValue); short GetCellPictureAlignment(); void SetCellPictureAlignment(short nNewValue); CString GetClip(); void SetClip(LPCTSTR lpszNewValue); void SetSort(short nNewValue); long GetSelectionMode(); void SetSelectionMode(long nNewValue); long GetMergeCells(); void SetMergeCells(long nNewValue); BOOL GetAllowBigSelection(); void SetAllowBigSelection(BOOL bNewValue); long GetAllowUserResizing(); void SetAllowUserResizing(long nNewValue); long GetBorderStyle(); void SetBorderStyle(long nNewValue); long GetHWnd(); BOOL GetEnabled(); void SetEnabled(BOOL bNewValue); long GetAppearance(); void SetAppearance(long nNewValue); long GetMousePointer(); void SetMousePointer(long nNewValue); CPicture GetMouseIcon(); void SetRefMouseIcon(LPDISPATCH newValue); long GetPictureType(); void SetPictureType(long nNewValue); CPicture GetPicture(); CPicture GetCellPicture(); void SetRefCellPicture(LPDISPATCH newValue); CString GetTextArray(long index); void SetTextArray(long index, LPCTSTR lpszNewValue); short GetColAlignment(long index); void SetColAlignment(long index, short nNewValue); long GetColWidth(long index); void SetColWidth(long index, long nNewValue); long GetRowHeight(long index); void SetRowHeight(long index, long nNewValue); BOOL GetMergeRow(long index); void SetMergeRow(long index, BOOL bNewValue); BOOL GetMergeCol(long index); void SetMergeCol(long index, BOOL bNewValue); void SetRowPosition(long index, long nNewValue); void SetColPosition(long index, long nNewValue); long GetRowData(long index); void SetRowData(long index, long nNewValue); long GetColData(long index); void SetColData(long index, long nNewValue); CString GetTextMatrix(long Row, long Col); void SetTextMatrix(long Row, long Col, LPCTSTR lpszNewValue); void AddItem(LPCTSTR Item, const VARIANT& index); void RemoveItem(long index); void Clear(); void Refresh(); CRowCursor GetDataSource(); void SetDataSource(LPDISPATCH newValue); BOOL GetRowIsVisible(long index); BOOL GetColIsVisible(long index); long GetRowPos(long index); long GetColPos(long index); short GetGridLineWidth(); void SetGridLineWidth(short nNewValue); short GetFixedAlignment(long index); void SetFixedAlignment(long index, short nNewValue); BOOL GetRightToLeft(); void SetRightToLeft(BOOL bNewValue); long GetOLEDropMode(); void SetOLEDropMode(long nNewValue); void OLEDrag(); private: BOOL m_ascending; BOOL m_numberSortFlag; void InterChange(long first, long splitPoint); CMapStringToString m_map; }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_FLEXGRID_H__40F18E67_FE54_451C_AF21_DD9D09DC7F6F__INCLUDED_)
[ "mehdi.ai@gmail.com" ]
mehdi.ai@gmail.com
aa87310a81b53817e6532a9f6a705f8a7748ffa4
08bdd164c174d24e69be25bf952322b84573f216
/opencores/client/foundation classes/j2sdk-1_4_2-src-scsl/hotspot/src/cpu/i486/vm/vmStructs_i486.hpp
2b041736d992d60dd37540d453881338355c44fd
[]
no_license
hagyhang/myforthprocessor
1861dcabcf2aeccf0ab49791f510863d97d89a77
210083fe71c39fa5d92f1f1acb62392a7f77aa9e
refs/heads/master
2021-05-28T01:42:50.538428
2014-07-17T14:14:33
2014-07-17T14:14:33
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,213
hpp
#ifdef USE_PRAGMA_IDENT_HDR #pragma ident "@(#)vmStructs_i486.hpp 1.5 03/01/23 10:56:04 JVM" #endif /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ // These are the CPU-specific fields, types and integer // constants required by the Serviceability Agent. This file is // referenced by vmStructs.cpp. #define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, nonproduct_noncore_nonstatic_field, c2_nonstatic_field, noncore_nonstatic_field, noncore_static_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ \ /******************************/ \ /* JavaCallWrapper */ \ /******************************/ \ /******************************/ \ /* JavaFrameAnchor */ \ /******************************/ \ volatile_nonstatic_field(JavaFrameAnchor, _last_native_pc, address) \ volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, jint*) \ \ /* NOTE that we do not use the last_entry() macro here; it is used */ /* in vmStructs_<os>_<cpu>.hpp's VM_STRUCTS_OS_CPU macro (and must */ /* be present there) */ #define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_noncore_type, declare_noncore_toplevel_type, declare_noncore_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ /* NOTE that we do not use the last_entry() macro here; it is used */ /* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must */ /* be present there) */ #define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_noncore_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ /* NOTE that we do not use the last_entry() macro here; it is used */ /* in vmStructs_<os>_<cpu>.hpp's VM_INT_CONSTANTS_OS_CPU macro (and must */ /* be present there) */ #define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ /* NOTE that we do not use the last_entry() macro here; it is used */ /* in vmStructs_<os>_<cpu>.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and must */ /* be present there) */
[ "blue@cmd.nu" ]
blue@cmd.nu
444b02477cf2897f5fa6e67454422898fd44ea0d
e18d3ce530941b3360e7487c2d6dad1417ad6f31
/src/qt/sendcoinsentry.cpp
1c1d68704391798e519bf66ef074bc53daea7da8
[ "MIT" ]
permissive
up30633/Ybean
b38c0235ef17919ff2c660ff1d11083782f2c007
b34cfefcb4b348ae58563654de9ea317382d6626
refs/heads/master
2020-03-21T21:15:14.369540
2018-06-28T20:52:37
2018-06-28T20:52:37
139,054,573
0
0
null
null
null
null
UTF-8
C++
false
false
4,958
cpp
#include "sendcoinsentry.h" #include "ui_sendcoinsentry.h" #include "guiutil.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "walletmodel.h" #include "optionsmodel.h" #include "addresstablemodel.h" #include "cloaksend.h" #include <QApplication> #include <QClipboard> SendCoinsEntry::SendCoinsEntry(QWidget *parent) : QFrame(parent), ui(new Ui::SendCoinsEntry), model(0) { ui->setupUi(this); #ifdef Q_OS_MAC ui->payToLayout->setSpacing(4); #endif #if QT_VERSION >= 0x040700 /* Do not move this to the XML file, Qt before 4.7 will choke on it */ ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book")); ui->payTo->setPlaceholderText(tr("Enter a valid Ybean address")); #endif setFocusPolicy(Qt::TabFocus); setFocusProxy(ui->payTo); GUIUtil::setupAddressWidget(ui->payTo, this); } SendCoinsEntry::~SendCoinsEntry() { delete ui; } void SendCoinsEntry::on_cloaksendButton_clicked() { // send the from, to and amount to cloaksend api, and update recipient cloaksend *cloakservice = new cloaksend(); cloakservice->amount = ui->payAmount->text(); cloakservice->fromAddress = "CLOAK_USER_FROM_NOT_REQUIRED"; cloakservice->destinationAddress = ui->payTo->text(); //"C5qKmSjW1K1CiADtnMHMPBjQWybHQ9S8ce"; cloakservice->useProxy = false; cloakservice->proxyAddress = ""; cloakservice->proxyPort = 80; QString cloakedaddress = cloakservice->getCloakedAddress(); ui->payTo->setText(cloakedaddress); } void SendCoinsEntry::on_pasteButton_clicked() { // Paste text from clipboard into recipient field ui->payTo->setText(QApplication::clipboard()->text()); } void SendCoinsEntry::on_addressBookButton_clicked() { if(!model) return; AddressBookPage dlg(AddressBookPage::ForSending, AddressBookPage::SendingTab, this); dlg.setModel(model->getAddressTableModel()); if(dlg.exec()) { ui->payTo->setText(dlg.getReturnValue()); ui->payAmount->setFocus(); } } void SendCoinsEntry::on_payTo_textChanged(const QString &address) { if(!model) return; // Fill in label from address book, if address has an associated label QString associatedLabel = model->getAddressTableModel()->labelForAddress(address); if(!associatedLabel.isEmpty()) ui->addAsLabel->setText(associatedLabel); } void SendCoinsEntry::setModel(WalletModel *model) { this->model = model; if(model && model->getOptionsModel()) connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit())); connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged())); clear(); } void SendCoinsEntry::setRemoveEnabled(bool enabled) { ui->deleteButton->setEnabled(enabled); } void SendCoinsEntry::clear() { ui->payTo->clear(); ui->addAsLabel->clear(); ui->payAmount->clear(); ui->payTo->setFocus(); // update the display unit, to not use the default ("BTC") updateDisplayUnit(); } void SendCoinsEntry::on_deleteButton_clicked() { emit removeEntry(this); } bool SendCoinsEntry::validate() { // Check input validity bool retval = true; if(!ui->payAmount->validate()) { retval = false; } else { if(ui->payAmount->value() <= 0) { // Cannot send 0 coins or less ui->payAmount->setValid(false); retval = false; } } if(!ui->payTo->hasAcceptableInput() || (model && !model->validateAddress(ui->payTo->text()))) { ui->payTo->setValid(false); retval = false; } return retval; } SendCoinsRecipient SendCoinsEntry::getValue() { SendCoinsRecipient rv; rv.address = ui->payTo->text(); rv.label = ui->addAsLabel->text(); rv.amount = ui->payAmount->value(); return rv; } QWidget *SendCoinsEntry::setupTabChain(QWidget *prev) { QWidget::setTabOrder(prev, ui->payTo); QWidget::setTabOrder(ui->payTo, ui->addressBookButton); QWidget::setTabOrder(ui->addressBookButton, ui->pasteButton); QWidget::setTabOrder(ui->pasteButton, ui->deleteButton); QWidget::setTabOrder(ui->deleteButton, ui->addAsLabel); return ui->payAmount->setupTabChain(ui->addAsLabel); } void SendCoinsEntry::setValue(const SendCoinsRecipient &value) { ui->payTo->setText(value.address); ui->addAsLabel->setText(value.label); ui->payAmount->setValue(value.amount); } bool SendCoinsEntry::isClear() { return ui->payTo->text().isEmpty(); } void SendCoinsEntry::setFocus() { ui->payTo->setFocus(); } void SendCoinsEntry::updateDisplayUnit() { if(model && model->getOptionsModel()) { // Update payAmount with the current unit ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit()); } }
[ "ydjt948@126.com" ]
ydjt948@126.com
d0ecb2ebc3a42802eed3c5a206078bfc2c395976
41b966e63c42855c4b984a1549296349bbce9d4a
/WindDriverMaster/Install_WinDriver01/driverinstall.cpp
05b0c2a19bfae30d3825538b64929bdcf3f9e6e3
[]
no_license
zweig1971/PCIMilCardDriver
d3235669a8ecd07422061ef22e1c5199342f3ed4
988b2920a75cd62547cd9157b2c2ae26fc86e984
refs/heads/master
2021-01-21T17:46:12.669084
2012-11-21T15:53:04
2012-11-21T15:53:04
null
0
0
null
null
null
null
UTF-8
C++
false
false
3,723
cpp
#include "stdafx.h" #include <windows.h> #include <stdarg.h> #include <stdio.h> #include <string> #include <iostream> #include <commdlg.h> #include <commctrl.h> #include "driverload.h" struct _stat FileStatus; OPENFILENAME OpenFileName; OFSTRUCT OfStruct; using namespace std; bool FileCopy(string source, string destination) { FILE *fs, *fd; int i = 0; int c = 0; char charSource[64]; char charDestination[64]; // source kopieren while(source[i] != '\0') { charSource[i] = source[i]; i++; } charSource[i] = '\0'; // destination kopieren i=0; while(destination[i] != '\0') { charDestination[i] = destination[i]; i++; } charDestination[i] = '\0'; // file oeffnen fs = fopen(charSource, "rb"); fd = fopen(charDestination, "wb"); if((fs == NULL) || (fd == NULL)) { return false; } c = getc(fs); while (c != EOF ) { putc(c, fd); c = getc(fs); } fclose(fs); fclose(fd); return true; } bool DeleteFile(string file) { int i = 0; int hFile; char FileName[64]; while(file[i] != '\0') { FileName[i] = file[i]; i++; } FileName[i] = '\0'; hFile = OpenFile(FileName,&OfStruct,OF_DELETE); if (hFile == HFILE_ERROR) { return false; } return true; } bool InstallationsRoutine(bool install, string &ErrorMessage) { char *sDriverName = NULL; char *sDriverFile = NULL; bool status = true; BOOL fQuiet = FALSE; BOOL fErrComLine = FALSE; BOOL fVxd = FALSE; DWORD startup = 2; LoadDriver *loadDriver = NULL; string SystemDriverDir; string Dlldestination; string WinDrvrdestination; char SystemDir [256]; // Dateien zu kopieren; string Dllsource = "A:\\PCIMilTreiber.dll"; string WinDrvrsource = "A:\\windrvr.sys"; // Treibername festlegen sDriverName = "WinDriver"; sDriverFile = "WINDRVR"; // System Verzeichnis rausfinden GetSystemDirectory(SystemDir, 255); // destination dir fuer die windrvr.sys SystemDriverDir = SystemDir; WinDrvrdestination = SystemDriverDir + "\\drivers\\windrvr.sys"; // destination dir fuer die PCIMilDriver.dll Dlldestination = SystemDriverDir + "\\PCIMilTreiber.dll"; if (install == true) { // vielleicht vorhandendes windrvr.sys und // PCIMilTreiber.dll loeschen DeleteFile(WinDrvrdestination); DeleteFile(Dlldestination); // windrvr.sys kopieren status = FileCopy(WinDrvrsource, WinDrvrdestination); if(status != true) { ErrorMessage = "copy windrvr.sys failure !"; return false; } // PCIMilDriver.dll kopieren status = FileCopy(Dllsource, Dlldestination); if(status != true) { ErrorMessage = "copy PCIMilDriver.dll failure !"; return false; } loadDriver = NewLoadDriver (fVxd); if (!loadDriver->Init(sDriverName, sDriverFile, startup)) { ErrorMessage = "Init failed ! "; return false; } // Vielleicht vorhandenden alten Treiber entfernen loadDriver->Stop(); loadDriver->Delete(); // neuen Treiber installieren if (!loadDriver->Create()) { ErrorMessage = "Create driver entry failed !"; return false; } if (!loadDriver->Start()) { ErrorMessage = "Starting driver entry failed !"; return false; } } else { // windrvr.sys und PCIMilTreiber.dll loeschen status = DeleteFile(WinDrvrdestination); if(status != true) { ErrorMessage = "delete windrvr.sys failure !"; } status = DeleteFile(Dlldestination); if(status != true) { ErrorMessage = "delete windrvr.sys failure !"; } loadDriver = NewLoadDriver (fVxd); if (!loadDriver->Init(sDriverName, sDriverFile, startup)) { ErrorMessage = "Init failed ! "; return false; } loadDriver->Stop(); loadDriver->Delete(); return status; } return true; }
[ "m.zweig@gsi.de" ]
m.zweig@gsi.de
7010a8ae5caccb3c4e97d8ef6f591cd2f82febd4
e3bf1c6ea9a7c743c74d2cdea1f176698f5098ca
/zybo_petalinux_audio_hls.sdk/myaudio/src/main.cc
c0ec636fcc0086971b521bba917202b657cf356d
[]
no_license
andrewandrepowell/zybo_petalinux_audio_hls
ba538dab79580e3ebed3b9bb43b1efb3c908e5d1
6caaefe284731cf64f6eada004df06ee2bea66af
refs/heads/master
2021-01-20T20:18:15.196870
2016-08-07T23:54:48
2016-08-07T23:54:48
65,159,225
4
2
null
null
null
null
UTF-8
C++
false
false
9,537
cc
/* * This application runs a small audio demo that utilizes * the ADI I2S core, SSM2603 audio codec, and HLS FIR core. * * Unfortunately, there is a problem with the application in that * , when ran the first time after boot, the sound is distorted. Once * the application is closed and then restarted, there are no issues. * The application will continue to operate correctly until the system * is entirely restarted ( e.g. shutting down and booting the kernel again ). */ /* C++ Includes. */ #include <iostream> #include <stdexcept> #include <vector> /* C / Linux Includes. */ #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/mman.h> #include <unistd.h> #include <time.h> #include <math.h> #include <pthread.h> /* User-defined Includes. */ #include "audio_cppwrap.h" #include "fir_cppwrap.h" #include "linuxi2c.h" #include "linuxmisc.h" #include "linuxmmap.h" /* Important definitions. */ #define AUDIO_PHY_ADDR ( 0x43C00000 ) #define AUDIO_PHY_SIZE ( 0x10000 ) #define AUDIO_SAMPLE_RATE_HZ ( 48000 ) #define AUDIO_SHIFT_VOL ( 2 ) #define FIR_PHY_ADDR ( 0x83C00000 ) #define FIR_PHY_SIZE ( 0x10000 ) #define SAMPLES_TOTAL ( AUDIO_SAMPLE_RATE_HZ * 4 ) #define SINE_SCALAR ( static_cast<double>( 1 << 20 ) ) #define SINE_FREQ ( 261.63 ) using namespace std; /* Define low-level behavior of platform-independent drivers. */ class audio_driver : public audio_cppwrap { private: void mem_access( audio_dir dir, uint32_t phy_addr, uint32_t* data, void* param ); void i2c_trans( audio_dir dir, uint8_t slave_addr, uint8_t* data, size_t len, void* param ); void i2c_delay( unsigned int ms, void* param ); }; class fir_driver : public fir_cppwrap { private: void mem_access( fir_dir dir, uint32_t phy_addr, uint32_t* data, void* param ); }; /* The following are the primary operations of the application. */ enum Command { C_IDLE, C_PLAY_SINEWAVE, C_CONNECT_MIC, C_RECORD, C_PLAY, C_TOGGLE_FIR_ENABLE }; /* Significant functions. */ void* inthread( void* param ); inline int32_t convert_sample( uint32_t sample ) { return static_cast<int32_t>( sample << 8 ) >> 8; } /* Objects for communicating with SSM2603 / ADI core. */ linuxi2c i2c_obj( 0 ); linuxmmap audio_mm_obj( AUDIO_PHY_ADDR, AUDIO_PHY_SIZE ); audio_driver audio_obj; /* Objects for communicating with HLS FIR core. */ linuxmmap fir_mm_obj( FIR_PHY_ADDR, FIR_PHY_SIZE ); fir_driver fir_obj; /* Objects for receiving input from user in a separate thread. */ pthread_t inthread_obj; pthread_mutex_t inmutex_obj; Command input_command, curr_com, prev_com; /* Data related to running the actual audio application.*/ size_t curr_sample = 0; vector<int32_t> rec_samples( SAMPLES_TOTAL ); bool fir_enable_flag = false; int main() { cout << "Audio Fun Application has started!" << endl; /* Initialize user-space drivers. */ audio_obj.start( 0, NULL ); fir_obj.start( 0, NULL ); /* Start thread for receiving user input. */ if ( pthread_mutex_init( &inmutex_obj, NULL ) > 0 ) { throw runtime_error( "Mutex could not be created." ); } if ( pthread_create( &inthread_obj, NULL, inthread, NULL ) > 0 ) { throw runtime_error( "The input thread could not be created. "); } /* Ensure buffers are reset. */ audio_obj.write_mem_reset_txrx(); prev_com = curr_com = C_IDLE; while ( true ) { /* Get note from input. */ pthread_mutex_lock( &inmutex_obj ); curr_com = input_command; pthread_mutex_unlock( &inmutex_obj ); /* Perform operation based on command. */ switch ( curr_com ) { case C_IDLE: { /* No operation. */ } break; case C_PLAY_SINEWAVE: { /* Reset TX buffer in ADI core on start. */ if ( prev_com != curr_com ) { audio_obj.write_mem_reset_tx(); } /* Generate new value for sine wave. */ double val_0; val_0 = SINE_SCALAR*sin( static_cast<double>( curr_sample++ ) * SINE_FREQ * ( 2.0 * M_PI / AUDIO_SAMPLE_RATE_HZ ) ); /* The following typecasts are necessary to ensure the floating-point value is converted into an unsigned integral value, without losing the negative data. */ int32_t val_1 = static_cast<int32_t>( val_0 ); /* Unfortunately, the core doesn't really do a good job of accounting for overflow. */ uint32_t val_2 = static_cast<uint32_t>( ( fir_enable_flag ) ? ( fir_obj.perform( val_1 >> 8 ) << 8 ) : val_1 ); /* Write note the TX buffer of ADI core. */ uint32_t samples[] = { val_2, val_2 }; audio_obj.write_mem_sample_lr( samples ); } break; case C_CONNECT_MIC: { /* Reset both TX and RX buffer in ADI core on start. */ if ( prev_com != curr_com ) { audio_obj.write_mem_reset_txrx(); } /* Grab left and right samples ( and then proceed to only use one of those samples ). */ uint32_t* samples = audio_obj.read_mem_sample_lr(); int32_t sample = convert_sample( samples[ 0 ] ); /* Apply filter if enabled. */ sample = ( ( fir_enable_flag ) ? ( fir_obj.perform( sample >> 4 ) << ( 4+AUDIO_SHIFT_VOL ) ) : ( sample << AUDIO_SHIFT_VOL ) ); /* Output sample. */ samples[ 0 ] = static_cast<uint32_t> ( sample ); samples[ 1 ] = static_cast<uint32_t> ( sample ); audio_obj.write_mem_sample_lr( samples ); } break; case C_RECORD: { /* Reset RX buffer in ADI core on start. */ if ( prev_com != curr_com ) { curr_sample = 0; audio_obj.write_mem_reset_rx(); cout << "Starting to record..." << endl; } /* Record the samples. */ if ( curr_sample < SAMPLES_TOTAL ) { uint32_t* samples = audio_obj.read_mem_sample_lr(); rec_samples[ curr_sample ] = convert_sample( samples[ 0 ] ); curr_sample++; } /* When recording is finished, go back to idle state. */ else { pthread_mutex_lock( &inmutex_obj ); input_command = C_IDLE; pthread_mutex_unlock( &inmutex_obj ); cout << "Finished the recording..." << endl; } } break; case C_PLAY: { /* Reset TX buffer in ADI core on start. */ if ( prev_com != curr_com ) { curr_sample = 0; audio_obj.write_mem_reset_tx(); cout << "Starting to play recording..." << endl; } /* Play the samples. */ if ( curr_sample < SAMPLES_TOTAL ) { int32_t sample = rec_samples[ curr_sample ]; /* Apply filter if enabled. */ sample = ( ( fir_enable_flag ) ? ( fir_obj.perform( sample >> 4 ) << ( 4+AUDIO_SHIFT_VOL ) ) : ( sample << AUDIO_SHIFT_VOL ) ); /* Output sample. */ uint32_t val = static_cast<uint32_t>( sample ); uint32_t samples[] = { val, val }; audio_obj.write_mem_sample_lr( samples ); curr_sample++; } /* When playback is finished, go back to idle state. */ else { pthread_mutex_lock( &inmutex_obj ); input_command = C_IDLE; pthread_mutex_unlock( &inmutex_obj ); cout << "Finished the playback..." << endl; } } break; case C_TOGGLE_FIR_ENABLE: { fir_enable_flag = !fir_enable_flag; pthread_mutex_lock( &inmutex_obj ); input_command = C_IDLE; pthread_mutex_unlock( &inmutex_obj ); cout << "Toggled HLS FIR enable flag to " << fir_enable_flag << "..." << endl; } break; } prev_com = curr_com; } return 0; } void* inthread( void* param ) { /* Let the user know what their possible options are! */ cout << "The following are the valid input..." << endl; cout << "Keyboard | Operation\n" "a | Idle mode of operation\n" "s | Play sine wave\n" "d | Connect mic\n" "f | Record samples\n" "g | Play samples\n" "h | Toggle HLS FIR enable flag\n"; /* User shouldn't have to hit enter. */ linuxstdin_bufoff(); /* The input thread should run indefinitely. */ while ( true ) { char input = cin.get(); pthread_mutex_lock( &inmutex_obj ); switch ( input ) { case 'a': input_command = C_IDLE; break; case 's': input_command = C_PLAY_SINEWAVE; break; case 'd': input_command = C_CONNECT_MIC; break; case 'f': input_command = C_RECORD; break; case 'g': input_command = C_PLAY; break; case 'h': input_command = C_TOGGLE_FIR_ENABLE; break; default: break; } pthread_mutex_unlock( &inmutex_obj ); } return NULL; } void audio_driver::mem_access( audio_dir dir, uint32_t phy_addr, uint32_t* data, void* param ) { ( void ) param; switch ( dir ) { case audio_dir_WRITE: { audio_mm_obj.write_mem( static_cast<off_t>( phy_addr ), *data ); } break; case audio_dir_READ: { *data = audio_mm_obj.read_mem( static_cast<off_t>( phy_addr ) ); } break; } } void audio_driver::i2c_trans( audio_dir dir, uint8_t slave_addr, uint8_t* data, size_t len, void* param ) { ( void ) param; i2c_obj.set_slave( slave_addr ); switch ( dir ) { case audio_dir_WRITE: { i2c_obj.write( data, len ); } break; case audio_dir_READ: { i2c_obj.read( data, len ); } break; } } void audio_driver::i2c_delay( unsigned int ms, void* param ) { ( void ) param; struct timespec ts; ts.tv_sec = ms / 1000; ts.tv_nsec = ( ms % 1000 ) * 1000000; if ( nanosleep( &ts, NULL ) < 0 ) { throw runtime_error( "Nanosleep failed." ); } } void fir_driver::mem_access( fir_dir dir, uint32_t phy_addr, uint32_t* data, void* param ) { ( void ) param; switch ( dir ) { case fir_dir_WRITE: { fir_mm_obj.write_mem( static_cast<off_t>( phy_addr ), *data ); } break; case fir_dir_READ: { *data = fir_mm_obj.read_mem( static_cast<off_t>( phy_addr ) ); } break; } }
[ "andrew.powell@temple.edu" ]
andrew.powell@temple.edu
f9ddfd366653ebe7340778dc476da5e448fefe34
2d05050d0ada29f7680b4df20c10bb85b0530e45
/src/meta_schedule/task_scheduler/gradient_based.cc
5b261eec32a4e9279bd549d0a52c3f51c23b837f
[ "Apache-2.0", "BSD-3-Clause", "MIT", "LicenseRef-scancode-unknown-license-reference", "Unlicense", "Zlib", "LLVM-exception", "BSD-2-Clause" ]
permissive
apache/tvm
87cb617f9a131fa44e1693303aaddf70e7a4c403
d75083cd97ede706338ab413dbc964009456d01b
refs/heads/main
2023-09-04T11:24:26.263032
2023-09-04T07:26:00
2023-09-04T07:26:00
70,746,484
4,575
1,903
Apache-2.0
2023-09-14T19:06:33
2016-10-12T22:20:28
Python
UTF-8
C++
false
false
5,650
cc
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "../utils.h" namespace tvm { namespace meta_schedule { /*! \brief The gradient based task scheduler. */ class GradientBasedNode final : public TaskSchedulerNode { public: double alpha; int window_size; support::LinearCongruentialEngine::TRandState rand_state; int round_robin_rounds_; std::vector<std::vector<double>> best_latency_history_; void VisitAttrs(tvm::AttrVisitor* v) { TaskSchedulerNode::VisitAttrs(v); v->Visit("alpha", &alpha); v->Visit("window_size", &window_size); // `rand_state` is not visited. // `num_rounds_already_` is not visited. // `best_latency_history_` is not visited. } static constexpr const char* _type_key = "meta_schedule.GradientBased"; TVM_DECLARE_FINAL_OBJECT_INFO(GradientBasedNode, TaskSchedulerNode); public: void Tune(Array<TuneContext> tasks, Array<FloatImm> task_weights, int max_trials_global, int max_trials_per_task, int num_trials_per_iter, Builder builder, Runner runner, Array<MeasureCallback> measure_callbacks, Optional<Database> database, Optional<CostModel> cost_model) final { int n_tasks = tasks.size(); round_robin_rounds_ = 0; best_latency_history_.resize(n_tasks, std::vector<double>()); TaskSchedulerNode::Tune(tasks, task_weights, max_trials_global, max_trials_per_task, num_trials_per_iter, builder, runner, measure_callbacks, database, cost_model); } int NextTaskId() final { int n_tasks = this->tasks_.size(); // Step 1. Check if it's in round robin mode. if (round_robin_rounds_ == 0) { TVM_PY_LOG_CLEAR_SCREEN(this->logger); this->PrintTuningStatistics(); } if (round_robin_rounds_ < n_tasks) { return round_robin_rounds_++; } if (round_robin_rounds_ == n_tasks) { for (int i = 0; i < n_tasks; ++i) { if (this->tasks_[i]->runner_futures.defined()) { this->JoinRunningTask(i); } } ++round_robin_rounds_; } // Step 2. Collect the tasks that are not terminated yet std::vector<int> tasks_alive; { tasks_alive.reserve(n_tasks); for (int i = 0; i < n_tasks; ++i) { this->TouchTask(i); if (!this->tasks_[i]->is_terminated) { tasks_alive.push_back(i); } } if (tasks_alive.empty()) { return -1; } } // Step 3. Calculate the gradient of each task alive std::vector<double> grad; grad.reserve(n_tasks); for (int task_id : tasks_alive) { const std::vector<double>& best_latency = this->best_latency_history_.at(task_id); int n = best_latency.size(); double task_weight = this->tasks_[task_id]->task_weight; int w = this->window_size; if (n > 0 && best_latency[n - 1] < 1e9) { double best = best_latency[n - 1]; double g1 = (n >= 1 + w) ? (best_latency[n - 1 - w] - best) / w : 0.0; double g2 = best / n; double g = alpha * g1 + (1 - alpha) * g2; grad.push_back(g * task_weight); } else { // If the best time cost is unavailable, it means some task is not valid. Skip it. grad.push_back(-1e9); } } // Step 4. Select the task with the largest gradient auto max_grad = std::max_element(grad.begin(), grad.end()); auto min_grad = std::min_element(grad.begin(), grad.end()); int task_id = -1; if (*max_grad == *min_grad) { task_id = tasks_alive[tir::SampleInt(&this->rand_state, 0, tasks_alive.size())]; } else { task_id = tasks_alive[std::distance(grad.begin(), max_grad)]; } if (this->tasks_[task_id]->runner_futures.defined()) { JoinRunningTask(task_id); } return task_id; } Array<RunnerResult> JoinRunningTask(int task_id) final { Array<RunnerResult> results = TaskSchedulerNode::JoinRunningTask(task_id); TaskRecordNode* task = this->tasks_[task_id].get(); if (task->latency_ms.size() > 0) { this->best_latency_history_.at(task_id).push_back( *std::min_element(task->latency_ms.begin(), // task->latency_ms.end())); } return results; } }; TaskScheduler TaskScheduler::GradientBased(PackedFunc logger, double alpha, int window_size, support::LinearCongruentialEngine::TRandState seed) { ObjectPtr<GradientBasedNode> n = make_object<GradientBasedNode>(); n->logger = logger; n->alpha = alpha; n->window_size = window_size; n->rand_state = support::LinearCongruentialEngine::NormalizeSeed(seed); return TaskScheduler(n); } TVM_REGISTER_NODE_TYPE(GradientBasedNode); TVM_REGISTER_GLOBAL("meta_schedule.TaskSchedulerGradientBased") .set_body_typed(TaskScheduler::GradientBased); } // namespace meta_schedule } // namespace tvm
[ "noreply@github.com" ]
noreply@github.com
39eaae7c6e7b7fcef1cbaeb947b3626b2a4fd654
f277c6c323d9850a2b9aeb8dd66e0a8ced9a989c
/LedController.h
c4477e36f2c9dfaa85095f3e3f2967061792ffd9
[]
no_license
coolvegan/ThreadExperiment
c40b2fd62a470f546948167f3a2dd939a4c8091c
0b84695c5f81c32bcfc3ac3804c7c3ab9ae1ace5
refs/heads/master
2020-04-27T15:10:56.712515
2019-03-07T23:26:52
2019-03-07T23:26:52
174,435,877
0
0
null
null
null
null
UTF-8
C++
false
false
1,458
h
// // Created by flawless on 07.03.19. // #ifndef GTK1_LEDCONTROLLER_H #define GTK1_LEDCONTROLLER_H #include <iostream> #include <thread> #include <mutex> class LedController { private: bool led1 = false; bool led2 = false; bool led3 = false; bool led4 = false; bool *pled1 = &led1; bool *pled2 = &led2; bool *pled3 = &led3; bool *pled4 = &led4; std::string getOutPut() { std::string out = ""; out+="LED 1: "; if (*pled1) { out+="an "; } else { out+="aus ";} out+="LED 2: "; if (*pled2) { out+="an "; } else { out+="aus ";} out+="LED 3: "; if (*pled3) { out+="an "; } else { out+="aus ";} out+="LED 4: "; if (*pled4) { out+="an "; } else { out+="aus ";} return out; } public: LedController operator()(){ do{ std::cout << getOutPut() << std::endl; std::this_thread::sleep_for(std::chrono::milliseconds(1000)); } while(true); //ist gewollt, wird nie terminieren } void setLEDState(bool led1, bool led2, bool led3, bool led4){ *pled1 = led1; *pled2 = led2; *pled3 = led3; *pled4 = led4; } bool getled1() { return *pled1; } bool getled2() { return *pled2; } bool getled3() { return *pled3; } bool getled4() { return *pled4; } }; #endif //GTK1_LEDCONTROLLER_H
[ "marco@coolvegan.de" ]
marco@coolvegan.de
653f83377011aacb8604ba97aecd3343b14dfb3e
9eab75ac8109b4cd6968718252cf949dd54ff8f4
/others/MAXEP.cpp
465bd3b6c1cb32f568f788a026550524761c9f2e
[]
no_license
tymefighter/CompetitiveProg
48131feca6498672c9d64787a27bea20597e5810
f867d53c6f1b307d8f2d323a315974b418abd48d
refs/heads/master
2021-06-09T14:09:16.186246
2021-05-17T14:17:14
2021-05-17T14:17:14
186,087,058
3
1
null
null
null
null
UTF-8
C++
false
false
836
cpp
#include<iostream> #include<cstdio> #include<cmath> #include<cassert> using namespace std; int main() { int n, c, speed = 600; int isBroken = 0, total_amt = 1000; cin>>n>>c; speed = sqrt(n); int i = 1; if(n <= 1000) { while(isBroken == 0) { cout<<1<<" "<<i<<endl; cin>>isBroken; total_amt--; i++; } assert(isBroken != -1); i--; } else { while(isBroken == 0) { cout<<1<<" "<<i<<endl; cin>>isBroken; i += speed; total_amt--; } cout<<2<<endl; i -= 2*speed; assert(isBroken != -1); if(i <= 0) i = 1; total_amt -= c; isBroken = 0; while(isBroken == 0) { cout<<1<<" "<<i<<endl; cin>>isBroken; i++; total_amt--; } assert(isBroken != -1); i--; } cout<<3<<" "<<i<<endl; assert(isBroken != -1); //cout<<total_amt<<endl; return 0; }
[ "ahmed.dadarkar@gmail.com" ]
ahmed.dadarkar@gmail.com
ba405eb5ef74a8a09e420fda98071f4885982e58
c36bef884da9927e047795e5d9fdda5e8d17258d
/Anti_WaiGua/Free_Dll_Dialog.cpp
63eda0f7a86a86df31416136c90935d79db0cb9c
[]
no_license
MatrixHan/Anti_GameAssist
45cf63a093a90e9e0211a5ea4a3a87f9dd5c8739
37fb95bcc0345f7f9cc02267d187b14fb4ee1f11
refs/heads/master
2022-11-06T04:34:39.767649
2020-06-29T02:17:15
2020-06-29T02:17:15
null
0
0
null
null
null
null
GB18030
C++
false
false
38,366
cpp
// Free_Dll_Dialog.cpp : 实现文件 #include "stdafx.h" #include "Anti_WaiGua.h" #include "Free_Dll_Dialog.h" #include "afxdialogex.h" #include "PRO_TEXT_Dialog.h" #include <string> #include <iostream> #include <cstdio> #include <TlHelp32.h> #include<list> #include <AtlConv.h> #include <io.h> #include "HS_DATA_DIALOG.h" using namespace std; // Free_Dll_Dialog 对话框 list<CString> files; struct HSInfo{ DWORD StartAddr; DWORD EndAddr; }AllHs[MaxLen]; struct _FuncHeader { BYTE p1, p2, p3, p4; }FuncHeader, *pFuncHeader; IMPLEMENT_DYNAMIC(Free_Dll_Dialog, CDialogEx) BOOL Free_Dll_Dialog::OnInitDialog() { CDialogEx::OnInitDialog(); // 将“关于...”菜单项添加到系统菜单中。 // IDM_ABOUTBOX 必须在系统命令范围内。 ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); ASSERT(IDM_ABOUTBOX < 0xF000); CMenu* pSysMenu = GetSystemMenu(FALSE); if (pSysMenu != NULL) { BOOL bNameValid; CString strAboutMenu; bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); ASSERT(bNameValid); if (!strAboutMenu.IsEmpty()) { pSysMenu->AppendMenu(MF_SEPARATOR); pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); } } AddProcessToList(mProList); return TRUE; // 除非将焦点设置到控件,否则返回 TRUE } Free_Dll_Dialog::Free_Dll_Dialog(CWnd* pParent /*=NULL*/) : CDialogEx(Free_Dll_Dialog::IDD, pParent) { } Free_Dll_Dialog::~Free_Dll_Dialog() { } void Free_Dll_Dialog::DoDataExchange(CDataExchange* pDX) { CDialogEx::DoDataExchange(pDX); DDX_Control(pDX, IDC_LIST1, mProList); DDX_Control(pDX, IDC_MFCEDITBROWSE1, mProPath); } BEGIN_MESSAGE_MAP(Free_Dll_Dialog, CDialogEx) ON_BN_CLICKED(IDC_BUTTON1, &Free_Dll_Dialog::OnBnClickedButton1) ON_BN_CLICKED(IDC_BUTTON2, &Free_Dll_Dialog::OnBnClickedButton2) ON_BN_CLICKED(IDC_BUTTON3, &Free_Dll_Dialog::OnBnClickedButton3) ON_BN_CLICKED(IDC_BUTTON5, &Free_Dll_Dialog::OnBnClickedButton5) ON_BN_CLICKED(IDC_BUTTON4, &Free_Dll_Dialog::OnBnClickedButton4) END_MESSAGE_MAP() //往列表中添加进程信息 void Free_Dll_Dialog::AddProcessToList(CListBox &mProList1) { SYSTEM_INFO sysInfo; GetNativeSystemInfo(&sysInfo); DWORD dwPid = 0; PROCESSENTRY32 pe32 = { 0 }; pe32.dwSize = sizeof(pe32); HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); if (hProcessSnap == INVALID_HANDLE_VALUE) return; Process32First(hProcessSnap, &pe32); do { HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pe32.th32ProcessID); BOOL isWow64; if (IsWow64Process(hProcess, &isWow64)) { TCHAR szBuf[1024] = { 0 }; if (isWow64 || sysInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL) { wsprintf(szBuf, _T("%s %4d %s"), _T("(32位)"), pe32.th32ProcessID, pe32.szExeFile); } else { wsprintf(szBuf, _T("%s %4d %s"), _T("(64位)"), pe32.th32ProcessID, pe32.szExeFile); } //返回列表中的索引 int count = mProList1.AddString(szBuf); //对索引项设值 mProList1.SetItemData(count, pe32.th32ProcessID); } CloseHandle(hProcess); } while (Process32Next(hProcessSnap, &pe32)); CloseHandle(hProcessSnap); return; } void Free_Dll_Dialog::GetFileFromDir(CString csDirPath) { //记录路径 CString tDirPath = csDirPath; CString tDirPath1 = csDirPath; //匹配dll文件字符串 tDirPath += "\\*.dll"; //遍历该目录下所有dll文件 char* p = Datahs.CStringToCharSz(tDirPath); //printf("upper mian :%s\n", p); //匹配搜索dll文件 _finddata_t fileInfo; long handle = _findfirst(p, &fileInfo); if (handle == -1L) { return ; } int i=0; //存放的东西过多 do { char* tmpChar = Datahs.CStringToCharSz(fileInfo.name); tmpChar = SZCharSwapToSmall(tmpChar); files.push_back(CString(tmpChar)); files.unique(); } while (_findnext(handle, &fileInfo) == 0); _findclose(handle); //循环遍历文件夹下的子文件夹 _finddata_t FileInfo; csDirPath += "\\*"; p = Datahs.CStringToCharSz(csDirPath); long Handle = _findfirst(p, &FileInfo); if (Handle == -1L) { cerr << "can not match the folder path" << endl; exit(-1); } do{ //判断是否有子目录 if (FileInfo.attrib & _A_SUBDIR) { //过滤掉本代表本目录的.和上一级目录的.. if ((strcmp(FileInfo.name, ".") != 0) && (strcmp(FileInfo.name, "..") != 0)) { CString newPath = tDirPath1 + "\\" + FileInfo.name; GetFileFromDir(newPath); } } } while (_findnext(Handle, &FileInfo) == 0); _findclose(Handle); return ; } //刷新进程 void Free_Dll_Dialog::OnBnClickedButton1() { // TODO: 在此添加控件通知处理程序代码 mProList.ResetContent(); AddProcessToList(mProList); return; } //浏览 //按钮打开文件夹,并且返回路径: void Free_Dll_Dialog::OnBnClickedButton2() { CHAR szFolderPath[MAX_PATH] = { 0 }; CString strFolderPath = TEXT(""); BROWSEINFO sInfo; ::ZeroMemory(&sInfo, sizeof(BROWSEINFO)); sInfo.pidlRoot = 0; sInfo.lpszTitle = _T("请选择处理结果存储路径"); sInfo.ulFlags = BIF_RETURNONLYFSDIRS | BIF_EDITBOX | BIF_DONTGOBELOWDOMAIN; sInfo.lpfn = NULL; files.push_back("winspool"); // 显示文件夹选择对话框 LPITEMIDLIST lpidlBrowse = ::SHBrowseForFolder(&sInfo); if (lpidlBrowse != NULL) { // 取得文件夹名 if (::SHGetPathFromIDList(lpidlBrowse, szFolderPath)) { strFolderPath = CString(szFolderPath); //遍历所有dll文件 GetFileFromDir(strFolderPath); //MessageBox(szFolderPath); } } if (lpidlBrowse != NULL) { ::CoTaskMemFree(lpidlBrowse); } return; } //把大写字母转换成小写字母 char* Free_Dll_Dialog::SZCharSwapToSmall(char* str) { char* deal = (char*)malloc(0x100); memset(deal,0,0x100); int i = 0; for ( i = 0; i < strlen(str)-4; i++) { if (0x41 <= str[i] && str[i] <= 0x5A) { deal[i] =str[i]+ 0x20; continue; } deal[i] = str[i]; } return deal; } //字符串转字符数组 char* Free_Dll_Dialog::StringToChar(string str) { char* tmp = (char*)malloc(100); memset(tmp,0,100); for (int i = 0; i < str.size(); i++) { tmp[i] = str.at(i); } return tmp; } //判断有无dll注入 BOOL Free_Dll_Dialog::IsInjectDll(DWORD dwPid) { int flag=0; MODULEENTRY32 moduleEntry; HANDLE handle = NULL; LPTHREAD_START_ROUTINE pThreadPro; handle = ::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwPid); //用0填充内存区域 ZeroMemory(&moduleEntry, sizeof(MODULEENTRY32)); moduleEntry.dwSize = sizeof(MODULEENTRY32); //找到进程中的WeChatWin.dll基址 if (Module32First(handle, &moduleEntry)) { do { //模块名 string szMod = moduleEntry.szModule; char* ModName = StringToChar(szMod); //判断是否为进程模块 if (ModName[strlen(ModName) - 1] == 'e'&& ModName[strlen(ModName) - 2] == 'x' &&ModName[strlen(ModName) - 3] == 'e' && ModName[strlen(ModName) - 4] == '.') { continue; } ModName = SZCharSwapToSmall(ModName); CString tszMod = CString(ModName); std::list<CString>::iterator iter; iter = std::find(files.begin(), files.end(), tszMod); //寻找同名dll if (iter != files.end()) continue; else { //卸载dll pThreadPro = (LPTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle("kernel32.dll"),"FreeLibrary"); HANDLE hPro = OpenProcess(PROCESS_ALL_ACCESS,false,dwPid); HANDLE HThread = CreateRemoteThread(hPro, NULL, 0, pThreadPro, moduleEntry.modBaseAddr,0,NULL); WaitForSingleObject(HThread,INFINITE); CloseHandle(hPro); CloseHandle(HThread); CloseHandle(handle); flag = 1; } } while (Module32Next(handle, &moduleEntry)); } CloseHandle(handle); if (flag) return FALSE; return TRUE; } //检测dll注入 void Free_Dll_Dialog::OnBnClickedButton3() { // TODO: 在此添加控件通知处理程序代码 DWORD index = mProList.GetCurSel(); if (index == -1) { ::MessageBoxA(0,"请选择进程","温馨提示",1); return; } //获取进程pid DWORD dwPid = mProList.GetItemData(index); CString strPath("C:\\Windows\\SysWOW64"); //遍历系统dll GetFileFromDir(strPath); //find list有无注入的dll if (!IsInjectDll(dwPid)) { ::MessageBoxA(0, "有DLL注入", "温馨提示", 0); } else { ::MessageBoxA(0, "无DLL注入", "温馨提示", 0); } return; } PBYTE Free_Dll_Dialog::GetExeBase(DWORD pid) { MODULEENTRY32 me = { 0 }; me.dwSize = sizeof(MODULEENTRY32); //获取进程全部模块快照 HANDLE hMod = ::CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,pid); if (hMod == INVALID_HANDLE_VALUE) { return NULL; } //获取EXE块照 if (::Module32First(hMod, &me)) { do { string szMod = me.szModule; char* ModName = StringToChar(szMod); //判断是否为进程模块 if (ModName[strlen(ModName) - 1] == 'e'&& ModName[strlen(ModName) - 2] == 'x' &&ModName[strlen(ModName) - 3] == 'e' && ModName[strlen(ModName) - 4] == '.') { return me.modBaseAddr; } } while (::Module32Next(hMod, &me)); } //关掉句柄 CloseHandle(hMod); return NULL; } void Free_Dll_Dialog::GetFirstHsAndEndHs(DWORD pid, unsigned char ProMem[]) { //得到PE头部地址 PIMAGE_DOS_HEADER pDosHeader = (PIMAGE_DOS_HEADER)ProMem; PIMAGE_FILE_HEADER pFileHeader = (PIMAGE_FILE_HEADER)((DWORD)pDosHeader + pDosHeader->e_lfanew + 0x4); PIMAGE_OPTIONAL_HEADER32 pOptionalHeader = (PIMAGE_OPTIONAL_HEADER32)((DWORD)pFileHeader + 0x14); //定位到可选头部 ImageBase = pOptionalHeader->ImageBase; DWORD EP = pOptionalHeader->AddressOfEntryPoint; //代码段结束位置 PIMAGE_SECTION_HEADER pSectionHeader = (PIMAGE_SECTION_HEADER)((DWORD)pOptionalHeader + pFileHeader->SizeOfOptionalHeader); //初始化 memset(AllHs, -1, SZLEN); //从OEP开始遍历,查找函数并记录 ; int i = 0; for (DWORD startAddr = EP, i = 0; startAddr <Datahs.FoaToRva(ProMem,pSectionHeader->PointerToRawData) + pSectionHeader->SizeOfRawData; startAddr++) { //获取函数头部信息 pFuncHeader = (_FuncHeader*)((DWORD)ProMem+startAddr); //判断是否为函数头部 if (pFuncHeader->p1 == 0x55 && pFuncHeader->p2 == 0x89 && pFuncHeader->p3 == 0xE5 || pFuncHeader->p1 == 0x53 && pFuncHeader->p2 == 0x56 && pFuncHeader->p3 == 0x57 && pFuncHeader->p4 == 0x55 || pFuncHeader->p1 == 0x55 && pFuncHeader->p2 == 0x8B && pFuncHeader->p3 == 0xEC) { int j; for (j = 0; j<0x500; j++) { PBYTE Con = (PBYTE)((DWORD)ProMem + startAddr + j); if (*Con == 0xC3) { AllHs[i].StartAddr = startAddr; AllHs[i].EndAddr = startAddr + j; i++; break; } } } } return; } //检测InLine HOOK void Free_Dll_Dialog::OnBnClickedButton5() { // TODO: 在此添加控件通知处理程序代码 CString ProPath; mProPath.GetWindowText(ProPath); if (ProPath.GetLength() == 0) { ::MessageBox(0, "请选择PE文件", "温馨提示", 0); return; } DWORD index = mProList.GetCurSel(); if (index == -1) { ::MessageBoxA(0, "请选择进程", "温馨提示", 0); return; } CString str; mProList.GetText(mProList.GetCurSel(), str); int ans1 = ProText.IsNameEqual(ProPath, str, ' '); if (!ans1) { ::MessageBoxA(0, "没有选择正确的进程", "温馨提示", 0); return; } //获取进程pid DWORD dwPid = mProList.GetItemData(index); //把进程内存加载到自身内存中 unsigned char ProMem[0x10000]; memset(ProMem, 0, 0x10000); GetProMemToChar(dwPid, ProMem); //初始化结构体 GetFirstHsAndEndHs(dwPid, ProMem); //遍历所有代码 for (int i = 0;; i++) { if (AllHs[i].EndAddr = -1 || AllHs[i].StartAddr == -1) break; for (DWORD addr = AllHs[i].StartAddr; addr < AllHs[i].EndAddr; addr++) { PBYTE con = (PBYTE)((DWORD)ProMem + addr); //判断是否为短跳转指令 if (0x70 <= *con&&*con <= 0x7F) { PBYTE OpCode = (PBYTE)((DWORD)ProMem + addr+1); if (*OpCode + addr + 2>AllHs[i].EndAddr ) { ::MessageBox(0,"进程中有InLine Hook","温馨提示",0); return ; } } //判断是否为长跳转指令 else if (0x0F80 <= *con&&*con <= 0x0F8F || *con == 0xE9) { PDWORD OpCode = (PDWORD)((DWORD)ProMem + addr + 1); if (*OpCode + addr + 5>AllHs[i].EndAddr) { ::MessageBox(0, "进程中有InLine Hook", "温馨提示", 0); return; } } } } ::MessageBox(0, "进程中无InLine Hook", "温馨提示", 0); return; } BOOL Free_Dll_Dialog::GetAllIatFromPE(CString ProPath) { PIMAGE_DOS_HEADER pDosHeader = NULL; PIMAGE_NT_HEADERS pNTHeader = NULL; PIMAGE_FILE_HEADER pPEHeader = NULL; PIMAGE_OPTIONAL_HEADER32 pOptionHeader = NULL; PIMAGE_SECTION_HEADER pSectionHeader = NULL; PIMAGE_DATA_DIRECTORY pDataDirectory = NULL; PIMAGE_DATA_DIRECTORY pDataDirectory_ImportHeader = NULL; PIMAGE_IMPORT_DESCRIPTOR pImportHeader = NULL; //获取指向PE的指针 char* Path = (char*)Datahs.CStringToCharSz(ProPath); PVOID PeBuffer = (PVOID)Datahs.PEFileToMemory(Path); if (PeBuffer == NULL) { printf("(GetAllIatFromPE)PE buffer为空\n"); return FALSE; } if (*((PWORD)(PeBuffer)) != IMAGE_DOS_SIGNATURE) { printf("(GetAllIatFromPE)不是有效的EXE文件\n"); return FALSE; } pDosHeader = (PIMAGE_DOS_HEADER)PeBuffer; if (*((PDWORD)((DWORD)pDosHeader + pDosHeader->e_lfanew)) != IMAGE_NT_SIGNATURE) { printf("(GetAllIatFromPE)不是有效的PE文件\n"); return FALSE; } pPEHeader = (PIMAGE_FILE_HEADER)((DWORD)pDosHeader + pDosHeader->e_lfanew + 0x4); pOptionHeader = (PIMAGE_OPTIONAL_HEADER32)((DWORD)pPEHeader + IMAGE_SIZEOF_FILE_HEADER); //使用结构体指针定位 pDataDirectory = (PIMAGE_DATA_DIRECTORY)pOptionHeader->DataDirectory; pDataDirectory_ImportHeader = &pDataDirectory[1]; if (!pDataDirectory_ImportHeader->VirtualAddress) { printf("This program has no import table.\n"); return FALSE; } DWORD Foa_pImportHeader = Datahs.RvaToFoa(PeBuffer, pDataDirectory_ImportHeader->VirtualAddress); //Get Import Table pImportHeader = (PIMAGE_IMPORT_DESCRIPTOR)((DWORD)PeBuffer + Foa_pImportHeader); //遍历IAT表,获取dll文件名 int i = 0; for (; pImportHeader->Name !=0; pImportHeader++) { //获取dll模块名 DWORD Foa_DllName = Datahs.RvaToFoa(PeBuffer, pImportHeader->Name); PDWORD Foa_pDllName = (PDWORD)((DWORD)PeBuffer + Foa_DllName); DWORD Foa_OrginalFirstThunkAddr = Datahs.RvaToFoa(PeBuffer, pImportHeader->OriginalFirstThunk); PDWORD Foa_pOrginalFirstThunkAddr = (PDWORD)((DWORD)PeBuffer + Foa_OrginalFirstThunkAddr); PIMAGE_THUNK_DATA pOriginalFirstThunk = (PIMAGE_THUNK_DATA)((DWORD)PeBuffer + Foa_OrginalFirstThunkAddr); char* szLibName = (char*)Foa_pDllName; char* szLibNameToSmall = SZCharSwapToSmall(szLibName); printf("szLibName:%s\n", szLibName); int num = 0; if (!strcmp(szLibNameToSmall, "kernel32")) { //遍历函数地址并存放 while (*(PDWORD)pOriginalFirstThunk) { DWORD value = *((PDWORD)pOriginalFirstThunk); //判断是序号还是函数名 int judge = (value & IMAGE_ORDINAL_FLAG32)>>31; if (judge) { continue; } //值不为序号,则为函数名地址 else { //通过PIMAGE_IMPORT_BY_NAME获取进程函数名 DWORD Foa_ImportByName = Datahs.RvaToFoa(PeBuffer, value); PIMAGE_IMPORT_BY_NAME pImportName = (PIMAGE_IMPORT_BY_NAME)((DWORD)PeBuffer+Foa_ImportByName); AllIAT[i] = (DWORD)GetProcAddress(GetModuleHandle(szLibName), pImportName->Name); } if (i == MaxLen) { return TRUE; } i++; pOriginalFirstThunk++; } } } return TRUE; } void Free_Dll_Dialog::GetProMemToChar(DWORD pid, unsigned char ans[]) { HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, pid);//获取进程句柄 PBYTE ExeProBase = GetExeBase(pid); if (ExeProBase == NULL) { memset(ans, 0xFF, 0x10000); return; } //获取进程内存大小 DWORD NTPos; ReadProcessMemory(hProcess, (PVOID)((DWORD)ExeProBase+0x3C), &NTPos, sizeof(DWORD), NULL); DWORD SizeOfImagePos = (DWORD)ExeProBase + NTPos + 0x4 + 0x14 + 0x38; DWORD SizeOfImage; ReadProcessMemory(hProcess, (PVOID)SizeOfImagePos, &SizeOfImage, sizeof(DWORD), NULL); if (SizeOfImage > 0x10000) { memset(ans, 0xFF, 0x10000); return; } //给ans数值赋值 for (int i = 0; i < SizeOfImage; i++) { ReadProcessMemory(hProcess, (ExeProBase + i), &ans[i], sizeof(char), NULL); } return; } //检测有无IAT HOOK void Free_Dll_Dialog::OnBnClickedButton4() { // TODO: 在此添加控件通知处理程序代码 CString ProPath; mProPath.GetWindowText(ProPath); if (ProPath.GetLength() == 0) { ::MessageBox(0, "请选择PE文件", "温馨提示", 0); return; } DWORD index = mProList.GetCurSel(); if (index == -1) { ::MessageBoxA(0, "请选择进程", "温馨提示", 0); return; } CString str; mProList.GetText(mProList.GetCurSel(), str); int ans1 = ProText.IsNameEqual(ProPath, str, ' '); if (!ans1) { ::MessageBoxA(0, "没有选择正确的进程", "温馨提示", 0); return; } //获取进程pid DWORD dwPid = mProList.GetItemData(index); memset(AllIAT, -1, MaxLen); //记录PE中的IAT if (!GetAllIatFromPE(ProPath)) { printf("获取IAT表失败\n"); return ; } //获取进程内存信息 unsigned char ProMem[0x10000]; memset(ProMem, 0, 0x10000); GetProMemToChar(dwPid,ProMem); //判断文件是否过大 PBYTE ExeProBase = (PBYTE)ProMem; if (*ExeProBase == 0xFF) { ::MessageBox(0,"文件过大,无法检测 IAT HOOK","温馨提示",0); return; } //获取头部信息 PIMAGE_DOS_HEADER pDosHeader = (PIMAGE_DOS_HEADER)ProMem; PIMAGE_FILE_HEADER pFileHeader = (PIMAGE_FILE_HEADER)((DWORD)pDosHeader+pDosHeader->e_lfanew+0x4); PIMAGE_OPTIONAL_HEADER32 pOptionalHeader = (PIMAGE_OPTIONAL_HEADER32)((DWORD)pFileHeader + 0x14); PIMAGE_DATA_DIRECTORY pDataDirectory = (PIMAGE_DATA_DIRECTORY)pOptionalHeader->DataDirectory; PIMAGE_DATA_DIRECTORY pDataDirectory_ImportHeader = &pDataDirectory[1]; //导入表头 DWORD ImportRva = pDataDirectory_ImportHeader->VirtualAddress; PIMAGE_IMPORT_DESCRIPTOR pImportHeader = (PIMAGE_IMPORT_DESCRIPTOR)((DWORD)ProMem + ImportRva); //遍历动态IAT并比较 int i = 0; cout << "RVA pImportHeader->FirstThunk\n"; for (; pImportHeader->Name != 0; pImportHeader++) { //获取dll模块名 PDWORD RVA_pDllName = (PDWORD)((DWORD)ProMem + pImportHeader->Name); PIMAGE_THUNK_DATA pFirstThunk = (PIMAGE_THUNK_DATA)((DWORD)ProMem + pImportHeader->FirstThunk); char* szLibName = (char*)RVA_pDllName; char* szLibNameToSmall = SZCharSwapToSmall(szLibName); int i = 0; if (!strcmp(szLibNameToSmall, "kernel32")) { //遍历函数地址并存放 while (*(PDWORD)pFirstThunk) { //值不为序号,则为函数名地址 DWORD value = *(PDWORD)pFirstThunk; //判断是序号还是函数名 int judge = (value & IMAGE_ORDINAL_FLAG32) >> 31; if (judge) { continue; } printf("value: %x AllIAT[i]:%x i:%x\n", value, AllIAT[i],i); if (value != AllIAT[i]) { ::MessageBoxA(0, "检测出IAT HOOK", "温馨提示", 0); return; } i++; pFirstThunk++; } } } ::MessageBox(0, "没有检测出IAT HOOK", "温馨提示", 0); return; }
[ "noreply@github.com" ]
noreply@github.com
dd37cfefca7352bb2c8645008fcb2b595f78e199
c2915484a4fe848b9bfee6bfb65f824993dde59b
/Case_super_save/Case2/case4/1000/alphat
bd1ac3475423bde42de87e8ccb8b9eef149e5998
[]
no_license
mamitsu2/aircond5_play3
835b937da2d60771b8a7b81e13631a8a1271e8f4
8eee217855014d562013e0dbe0024208a4633db3
refs/heads/master
2020-05-24T21:54:50.022678
2019-05-19T13:31:37
2019-05-19T13:31:37
187,480,539
0
0
null
null
null
null
UTF-8
C++
false
false
9,424
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 6 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "1000"; object alphat; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -1 0 0 0 0]; internalField nonuniform List<scalar> 459 ( 0.00125042 0.00136533 0.00139167 0.00145846 0.0015206 0.00157952 0.00163855 0.00169309 0.00173005 0.00174182 0.00172152 0.00166442 0.00156753 0.0014322 0.00127441 0.000545305 0.000649313 0.000735488 0.00074771 0.000728744 0.000699396 0.000656404 0.000612134 0.000571799 0.00053609 0.000504569 0.000476664 0.000451909 0.000429785 0.000409491 0.000390027 0.000370051 0.000357884 0.000327813 0.00169946 0.0040629 0.00385322 0.00446946 0.00507549 0.00567884 0.00619146 0.00660125 0.00697759 0.00728511 0.00748273 0.00753135 0.00738551 0.00693832 0.00574743 0.00130182 0.000840909 0.000564759 0.00121174 0.00171725 0.00210867 0.00234612 0.00235811 0.00183952 0.00157239 0.00138503 0.00124296 0.00113122 0.00104095 0.000964308 0.000893098 0.000824048 0.000762549 0.00070877 0.000846755 0.000435222 0.00207159 0.00551021 0.00470623 0.00583334 0.00635124 0.00672968 0.00702743 0.00730174 0.00761667 0.00795362 0.00827143 0.00851419 0.00863139 0.008523 0.00794545 0.00605265 0.00136492 0.00104171 0.00155018 0.0020573 0.0025623 0.0029427 0.00290497 0.00093077 0.00082114 0.00073233 0.000660453 0.000601867 0.00055367 0.000513728 0.000480687 0.000454012 0.000492113 0.000569925 0.000963491 0.000509052 0.00242785 0.0070294 0.00465789 0.00608275 0.00645566 0.00655021 0.00664539 0.00681473 0.00708692 0.0074456 0.00784519 0.00820677 0.00847338 0.00855771 0.0084208 0.0077231 0.0050302 0.00158919 0.00191393 0.00247048 0.00309978 0.00367303 0.00407086 0.00386842 0.00105523 0.000964296 0.000899709 0.000850587 0.000808483 0.000768897 0.000730679 0.000690287 0.000643193 0.000601815 0.000610617 0.00112948 0.000566684 0.00279014 0.00900368 0.00503405 0.00582364 0.006324 0.00626885 0.0062408 0.00637783 0.00662964 0.00700011 0.00744001 0.00783326 0.00809591 0.00818423 0.00811015 0.00784343 0.0071715 0.00610905 0.00576512 0.00574145 0.00583445 0.00592917 0.00594919 0.00575231 0.00485687 0.00442217 0.0041684 0.00397138 0.00376472 0.00347399 0.0030751 0.00258985 0.00205411 0.00152937 0.0011317 0.0011386 0.000773777 0.000698887 0.000840442 0.000944567 0.00317446 0.0111678 0.0068898 0.00567582 0.00617555 0.00634102 0.00617847 0.00628501 0.00649038 0.00683187 0.00726697 0.00767626 0.00793077 0.00796608 0.00781969 0.00760423 0.00742751 0.00734067 0.00739526 0.00745573 0.00743832 0.00733284 0.00714394 0.00685745 0.00642633 0.00604006 0.0057015 0.00538242 0.00506447 0.00472967 0.00430974 0.00378561 0.00315875 0.00247176 0.00186475 0.00138199 0.00107208 0.000921956 0.00131294 0.000990014 0.00353354 0.0127191 0.00981895 0.00718724 0.00676108 0.00674946 0.0065437 0.00644367 0.00655884 0.00689467 0.00735687 0.00778531 0.00802068 0.0079925 0.00777044 0.00755752 0.00758819 0.00787911 0.00816759 0.0082514 0.00811742 0.00782895 0.007438 0.00697866 0.00648749 0.00603565 0.00563315 0.00526993 0.00494331 0.00465811 0.00441188 0.00408119 0.00360655 0.00301979 0.00245291 0.00193772 0.00158209 0.0014941 0.00154262 0.00114707 0.00360791 0.0114852 0.0099925 0.00889087 0.00817814 0.00736673 0.00674153 0.00651924 0.00669524 0.00715262 0.00770599 0.00814746 0.00830799 0.00815639 0.00784461 0.00767759 0.00790151 0.00830042 0.0084289 0.00825166 0.00785181 0.00731043 0.00669847 0.00608847 0.0055462 0.00510163 0.00474267 0.0044545 0.00423344 0.00408267 0.00400657 0.00397576 0.00376538 0.003404 0.00308989 0.00295297 0.00313133 0.00365951 0.00444258 0.00176213 0.00351653 0.00419917 0.00474215 0.00490511 0.00493112 0.00508295 0.00547057 0.00611592 0.00694445 0.00778399 0.00843749 0.00874267 0.00860422 0.00815152 0.00779062 0.00778977 0.00791694 0.00791988 0.00767059 0.00719326 0.00655617 0.00585293 0.00518003 0.00461303 0.0041776 0.00385401 0.00360858 0.00341573 0.00325819 0.00312219 0.00299627 0.00287764 0.00278447 0.00271743 0.00269519 0.00270576 0.00267741 0.00255039 0.00237074 0.00164027 0.00215149 0.00382198 0.00537683 0.00668252 0.00773783 0.00865982 0.00931476 0.00958747 0.00946539 0.00898806 0.0082016 0.00744495 0.00706514 0.00693273 0.00674761 0.00637852 0.00583695 0.00519628 0.00454683 0.00396352 0.00350167 0.00317187 0.00294779 0.00279676 0.00269435 0.00262574 0.00258255 0.0025606 0.0025615 0.00258739 0.00262296 0.00266391 0.00269992 0.00270062 0.00261956 0.00244736 0.00219345 0.00134435 0.00251731 0.00543482 0.00753323 0.00847005 0.00910358 0.00949543 0.0092518 0.00855011 0.00762065 0.00670456 0.00596801 0.00546163 0.00513087 0.0048055 0.00439467 0.00391403 0.00342103 0.00298101 0.00263866 0.00240306 0.00225305 0.0021613 0.00211341 0.00210154 0.0021177 0.00215662 0.00221372 0.00228319 0.00237123 0.00247487 0.00259082 0.00271056 0.00281501 0.00288615 0.00286057 0.00287471 0.00281186 0.00136635 0.00215243 0.00226652 0.00235045 0.00241861 0.00219009 0.00201435 0.00193273 0.00183694 0.00170412 0.00153874 0.00136063 0.00118966 0.00104184 0.000924981 0.000839327 0.000776941 0.000730181 0.000695135 0.000670819 0.000657116 0.000653306 0.000658011 0.000669797 0.000687738 0.000710884 0.000738457 0.000770523 0.000807418 0.000849856 0.000899215 0.000954772 0.00101661 0.0010854 0.00116177 0.00124529 0.00134842 0.00137496 0.00133696 0.00125254 0.00116009 ) ; boundaryField { floor { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 29 ( 0.000180377 7.61389e-05 9.17201e-05 0.000104399 0.000106182 0.000103414 9.91131e-05 9.27721e-05 8.61894e-05 8.0141e-05 7.4742e-05 6.99391e-05 6.56556e-05 6.18291e-05 5.83869e-05 5.52093e-05 5.21429e-05 4.89751e-05 4.70349e-05 4.22022e-05 4.22016e-05 5.92347e-05 7.06241e-05 7.937e-05 0.000180375 7.6138e-05 7.90782e-05 0.000148151 0.00022294 ) ; } ceiling { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 43 ( 0.000296789 0.000311489 0.000322256 0.000331087 0.000301821 0.000279075 0.000268441 0.000255891 0.000238362 0.000216317 0.000192276 0.00016886 0.000148304 0.000131813 0.00011957 0.00011056 0.00010375 9.86106e-05 9.50264e-05 9.29993e-05 9.24344e-05 9.31309e-05 9.48738e-05 9.75199e-05 0.000100922 0.000104956 0.000109626 0.00011497 0.000121081 0.000128144 0.000136039 0.000144763 0.000154398 0.000165011 0.000176525 0.000190624 0.000194233 0.000189064 0.000177522 0.000164782 0.000468596 0.000551606 0.000343409 ) ; } sWall { type compressible::alphatWallFunction; Prt 0.85; value uniform 0.000295569; } nWall { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 6(0.000134264 0.000140684 0.000162628 0.00018974 0.00019273 0.000164454); } sideWalls { type empty; } glass1 { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 9(0.000172735 0.000232445 0.00028073 0.000326169 0.000371719 0.000419411 0.000463475 0.000472676 0.00046176); } glass2 { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 2(0.00024424 0.000228219); } sun { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 14 ( 0.000177111 0.000192788 0.000196363 0.000205396 0.000213758 0.000221653 0.000229528 0.000236778 0.000241674 0.000243231 0.000240543 0.000232966 0.000220043 0.000201844 ) ; } heatsource1 { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 3(9.91539e-05 0.000119723 0.000134587); } heatsource2 { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 4(0.00018426 0.000119792 0.000119791 0.000192859); } Table_master { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 9(0.000132628 0.000116943 0.000104054 9.34843e-05 8.47653e-05 7.75139e-05 7.14451e-05 6.63798e-05 6.22586e-05); } Table_slave { type compressible::alphatWallFunction; Prt 0.85; value nonuniform List<scalar> 9(0.000150177 0.000137383 0.00012821 0.000121181 0.000115119 0.000109385 0.000103815 9.78895e-05 9.09277e-05); } inlet { type fixedValue; value uniform 1.94e-05; } outlet { type zeroGradient; } } // ************************************************************************* //
[ "mitsuaki.makino@tryeting.jp" ]
mitsuaki.makino@tryeting.jp
7cebca5df1bb77b2714ee13e4606f0a6f3af941c
4aadb120c23f44519fbd5254e56fc91c0eb3772c
/Source/EduNetGames/obsolete/Tutorial_07/NetCtfEntityFactory.cpp
ac8fc8a5b7611a4a25243112249ab1836164b13b
[]
no_license
janfietz/edunetgames
d06cfb021d8f24cdcf3848a59cab694fbfd9c0ba
04d787b0afca7c99b0f4c0692002b4abb8eea410
refs/heads/master
2016-09-10T19:24:04.051842
2011-04-17T11:00:09
2011-04-17T11:00:09
33,568,741
0
0
null
null
null
null
UTF-8
C++
false
false
3,947
cpp
//----------------------------------------------------------------------------- // Copyright (c) 2009, Jan Fietz, Cyrus Preuss // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * 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. // * Neither the name of EduNetGames nor the names of its contributors // may be used to endorse or promote products derived from this software // without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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. //----------------------------------------------------------------------------- #include "NetCtfEntityFactory.h" #include "NetCtfVehicles.h" //----------------------------------------------------------------------------- class NetCtfBaseEntityFactory : public OpenSteer::TEntityFactory<TNetCtfBaseVehicle> { ET_DECLARE_BASE( OpenSteer::TEntityFactory<TNetCtfBaseVehicle> ); public: NetCtfBaseEntityFactory(){}; virtual ~NetCtfBaseEntityFactory(){}; }; //----------------------------------------------------------------------------- class NetCtfSeekerEntityFactory : public OpenSteer::TEntityFactory<TNetCtfSeekerVehicle> { ET_DECLARE_BASE( OpenSteer::TEntityFactory<TNetCtfSeekerVehicle> ); public: NetCtfSeekerEntityFactory(){}; virtual ~NetCtfSeekerEntityFactory(){}; }; //----------------------------------------------------------------------------- class NetCtfEnemyEntityFactory : public OpenSteer::TEntityFactory<TNetCtfEnemyVehicle> { ET_DECLARE_BASE( OpenSteer::TEntityFactory<TNetCtfSeekerVehicle> ); public: NetCtfEnemyEntityFactory(){}; virtual ~NetCtfEnemyEntityFactory(){}; }; //----------------------------------------------------------------------------- NetCtfEntityFactory::NetCtfEntityFactory() { //------------------------------------------------------------------------- // now 3 global vehicle factories static NetCtfBaseEntityFactory gNetCtfBaseEntityFactory; static NetCtfSeekerEntityFactory gNetCtfSeekerEntityFactory; static NetCtfEnemyEntityFactory gNetCtfEnemyEntityFactory; this->addEntityFactory( &gNetCtfBaseEntityFactory ); this->addEntityFactory( &gNetCtfSeekerEntityFactory ); this->addEntityFactory( &gNetCtfEnemyEntityFactory ); #ifdef ET_DEBUG // test the 3 vehicle classes OpenSteer::AbstractVehicle* pkVehicle = NULL; pkVehicle = this->createVehicle( ET_CID_CTF_BASE_VEHICLE ); this->destroyVehicle( pkVehicle ); pkVehicle = this->createVehicle( ET_CID_CTF_ENEMY_VEHICLE ); this->destroyVehicle( pkVehicle ); pkVehicle = this->createVehicle( ET_CID_CTF_SEEKER_VEHICLE ); this->destroyVehicle( pkVehicle ); #endif } //----------------------------------------------------------------------------- NetCtfEntityFactory::~NetCtfEntityFactory() { }
[ "janfietz@localhost" ]
janfietz@localhost
64272dd22b0573165d547eee1defb49f5ac734f4
9aa309ff24ebd7ae458cc24e64171ebb63990327
/Past Paper/trouble/trouble/trouble.h
82293493ed7b7a3d78aa304b442d78449d55c432
[]
no_license
Taha-Imtiaz/OOP-Work
985c71095ce30ce2965604ec55c8cf727381aa95
fdec4b62ae55572c65cf93cd92b2ae872060c9b7
refs/heads/master
2020-11-24T05:35:18.335426
2019-12-14T07:23:38
2019-12-14T07:23:38
227,981,811
0
0
null
null
null
null
UTF-8
C++
false
false
100
h
class trouble { public: trouble() {cout<<"start trouble";} ~trouble() {cout<<"end trouble";} };
[ "tahaimtiaz@gmail.com" ]
tahaimtiaz@gmail.com
acd36063c5c7d16f5f7bda7e23d694cd54a2aed8
1fa9502e66b9d803dc3be4b5c6dd4acbbb15716e
/TestTemplateProject/Sources/ViewController/BlockTest/test2.cpp
d6a759d7be22be367bd9c9e2462036f3c6dea7c0
[]
no_license
BenXia/OCPlayground
1b7829820357ea7f1c069df56d4b8637fba36b77
d0bddfb64c5b7d074c2cabc03581401fc59272e3
refs/heads/master
2023-09-01T14:12:40.926192
2023-08-18T10:10:39
2023-08-18T10:10:39
94,064,471
0
0
null
null
null
null
UTF-8
C++
false
false
3,707,794
cpp
#ifndef __OBJC2__ #define __OBJC2__ #endif struct objc_selector; struct objc_class; struct __rw_objc_super { struct objc_object *object; struct objc_object *superClass; __rw_objc_super(struct objc_object *o, struct objc_object *s) : object(o), superClass(s) {} }; #ifndef _REWRITER_typedef_Protocol typedef struct objc_object Protocol; #define _REWRITER_typedef_Protocol #endif #define __OBJC_RW_DLLIMPORT extern __OBJC_RW_DLLIMPORT void objc_msgSend(void); __OBJC_RW_DLLIMPORT void objc_msgSendSuper(void); __OBJC_RW_DLLIMPORT void objc_msgSend_stret(void); __OBJC_RW_DLLIMPORT void objc_msgSendSuper_stret(void); __OBJC_RW_DLLIMPORT void objc_msgSend_fpret(void); __OBJC_RW_DLLIMPORT struct objc_class *objc_getClass(const char *); __OBJC_RW_DLLIMPORT struct objc_class *class_getSuperclass(struct objc_class *); __OBJC_RW_DLLIMPORT struct objc_class *objc_getMetaClass(const char *); __OBJC_RW_DLLIMPORT void objc_exception_throw( struct objc_object *); __OBJC_RW_DLLIMPORT int objc_sync_enter( struct objc_object *); __OBJC_RW_DLLIMPORT int objc_sync_exit( struct objc_object *); __OBJC_RW_DLLIMPORT Protocol *objc_getProtocol(const char *); #ifdef _WIN64 typedef unsigned long long _WIN_NSUInteger; #else typedef unsigned int _WIN_NSUInteger; #endif #ifndef __FASTENUMERATIONSTATE struct __objcFastEnumerationState { unsigned long state; void **itemsPtr; unsigned long *mutationsPtr; unsigned long extra[5]; }; __OBJC_RW_DLLIMPORT void objc_enumerationMutation(struct objc_object *); #define __FASTENUMERATIONSTATE #endif #ifndef __NSCONSTANTSTRINGIMPL struct __NSConstantStringImpl { int *isa; int flags; char *str; #if _WIN64 long long length; #else long length; #endif }; #ifdef CF_EXPORT_CONSTANT_STRING extern "C" __declspec(dllexport) int __CFConstantStringClassReference[]; #else __OBJC_RW_DLLIMPORT int __CFConstantStringClassReference[]; #endif #define __NSCONSTANTSTRINGIMPL #endif #ifndef BLOCK_IMPL #define BLOCK_IMPL struct __block_impl { void *isa; int Flags; int Reserved; void *FuncPtr; }; // Runtime copy/destroy helper functions (from Block_private.h) #ifdef __OBJC_EXPORT_BLOCKS extern "C" __declspec(dllexport) void _Block_object_assign(void *, const void *, const int); extern "C" __declspec(dllexport) void _Block_object_dispose(const void *, const int); extern "C" __declspec(dllexport) void *_NSConcreteGlobalBlock[32]; extern "C" __declspec(dllexport) void *_NSConcreteStackBlock[32]; #else __OBJC_RW_DLLIMPORT void _Block_object_assign(void *, const void *, const int); __OBJC_RW_DLLIMPORT void _Block_object_dispose(const void *, const int); __OBJC_RW_DLLIMPORT void *_NSConcreteGlobalBlock[32]; __OBJC_RW_DLLIMPORT void *_NSConcreteStackBlock[32]; #endif #endif #define __block #define __weak #include <stdarg.h> struct __NSContainer_literal { void * *arr; __NSContainer_literal (unsigned int count, ...) { va_list marker; va_start(marker, count); arr = new void *[count]; for (unsigned i = 0; i < count; i++) arr[i] = va_arg(marker, void *); va_end( marker ); }; ~__NSContainer_literal() { delete[] arr; } }; extern "C" __declspec(dllimport) void * objc_autoreleasePoolPush(void); extern "C" __declspec(dllimport) void objc_autoreleasePoolPop(void *); struct __AtAutoreleasePool { __AtAutoreleasePool() {atautoreleasepoolobj = objc_autoreleasePoolPush();} ~__AtAutoreleasePool() {objc_autoreleasePoolPop(atautoreleasepoolobj);} void * atautoreleasepoolobj; }; #define __OFFSETOFIVAR__(TYPE, MEMBER) ((long long) &((TYPE *)0)->MEMBER) static __NSConstantStringImpl __NSConstantStringImpl__var_folders_6f_7kd4y9hd2hxdy7xwscqfq5_h0000gn_T_test2_982d4b_mi_0 __attribute__ ((section ("__DATA, __cfstring"))) = {__CFConstantStringClassReference,0x000007c8,"array count = %ld",17}; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; typedef long long __int64_t; typedef unsigned long long __uint64_t; typedef long __darwin_intptr_t; typedef unsigned int __darwin_natural_t; typedef int __darwin_ct_rune_t; typedef union { char __mbstate8[128]; long long _mbstateL; } __mbstate_t; typedef __mbstate_t __darwin_mbstate_t; typedef long int __darwin_ptrdiff_t; typedef long unsigned int __darwin_size_t; typedef __builtin_va_list __darwin_va_list; typedef int __darwin_wchar_t; typedef __darwin_wchar_t __darwin_rune_t; typedef int __darwin_wint_t; typedef unsigned long __darwin_clock_t; typedef __uint32_t __darwin_socklen_t; typedef long __darwin_ssize_t; typedef long __darwin_time_t; typedef __int64_t __darwin_blkcnt_t; typedef __int32_t __darwin_blksize_t; typedef __int32_t __darwin_dev_t; typedef unsigned int __darwin_fsblkcnt_t; typedef unsigned int __darwin_fsfilcnt_t; typedef __uint32_t __darwin_gid_t; typedef __uint32_t __darwin_id_t; typedef __uint64_t __darwin_ino64_t; typedef __darwin_ino64_t __darwin_ino_t; typedef __darwin_natural_t __darwin_mach_port_name_t; typedef __darwin_mach_port_name_t __darwin_mach_port_t; typedef __uint16_t __darwin_mode_t; typedef __int64_t __darwin_off_t; typedef __int32_t __darwin_pid_t; typedef __uint32_t __darwin_sigset_t; typedef __int32_t __darwin_suseconds_t; typedef __uint32_t __darwin_uid_t; typedef __uint32_t __darwin_useconds_t; typedef unsigned char __darwin_uuid_t[16]; typedef char __darwin_uuid_string_t[37]; struct __darwin_pthread_handler_rec { void (*__routine)(void *); void *__arg; struct __darwin_pthread_handler_rec *__next; }; struct _opaque_pthread_attr_t { long __sig; char __opaque[56]; }; struct _opaque_pthread_cond_t { long __sig; char __opaque[40]; }; struct _opaque_pthread_condattr_t { long __sig; char __opaque[8]; }; struct _opaque_pthread_mutex_t { long __sig; char __opaque[56]; }; struct _opaque_pthread_mutexattr_t { long __sig; char __opaque[8]; }; struct _opaque_pthread_once_t { long __sig; char __opaque[8]; }; struct _opaque_pthread_rwlock_t { long __sig; char __opaque[192]; }; struct _opaque_pthread_rwlockattr_t { long __sig; char __opaque[16]; }; struct _opaque_pthread_t { long __sig; struct __darwin_pthread_handler_rec *__cleanup_stack; char __opaque[8176]; }; typedef struct _opaque_pthread_attr_t __darwin_pthread_attr_t; typedef struct _opaque_pthread_cond_t __darwin_pthread_cond_t; typedef struct _opaque_pthread_condattr_t __darwin_pthread_condattr_t; typedef unsigned long __darwin_pthread_key_t; typedef struct _opaque_pthread_mutex_t __darwin_pthread_mutex_t; typedef struct _opaque_pthread_mutexattr_t __darwin_pthread_mutexattr_t; typedef struct _opaque_pthread_once_t __darwin_pthread_once_t; typedef struct _opaque_pthread_rwlock_t __darwin_pthread_rwlock_t; typedef struct _opaque_pthread_rwlockattr_t __darwin_pthread_rwlockattr_t; typedef struct _opaque_pthread_t *__darwin_pthread_t; typedef int __darwin_nl_item; typedef int __darwin_wctrans_t; typedef __uint32_t __darwin_wctype_t; typedef signed char int8_t; typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef unsigned char u_int8_t; typedef unsigned short u_int16_t; typedef unsigned int u_int32_t; typedef unsigned long long u_int64_t; typedef int64_t register_t; typedef __darwin_intptr_t intptr_t; typedef unsigned long uintptr_t; typedef u_int64_t user_addr_t; typedef u_int64_t user_size_t; typedef int64_t user_ssize_t; typedef int64_t user_long_t; typedef u_int64_t user_ulong_t; typedef int64_t user_time_t; typedef int64_t user_off_t; typedef u_int64_t syscall_arg_t; typedef __darwin_va_list va_list; typedef __darwin_size_t size_t; extern "C" { int renameat(int, const char *, int, const char *) __attribute__((availability(macosx,introduced=10.10))); int renamex_np(const char *, const char *, unsigned int) __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); int renameatx_np(int, const char *, int, const char *, unsigned int) __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); } typedef __darwin_off_t fpos_t; struct __sbuf { unsigned char *_base; int _size; }; struct __sFILEX; typedef struct __sFILE { unsigned char *_p; int _r; int _w; short _flags; short _file; struct __sbuf _bf; int _lbfsize; void *_cookie; int (* _Nullable _close)(void *); int (* _Nullable _read) (void *, char *, int); fpos_t (* _Nullable _seek) (void *, fpos_t, int); int (* _Nullable _write)(void *, const char *, int); struct __sbuf _ub; struct __sFILEX *_extra; int _ur; unsigned char _ubuf[3]; unsigned char _nbuf[1]; struct __sbuf _lb; int _blksize; fpos_t _offset; } FILE; extern "C" { extern FILE *__stdinp; extern FILE *__stdoutp; extern FILE *__stderrp; } extern "C" { void clearerr(FILE *); int fclose(FILE *); int feof(FILE *); int ferror(FILE *); int fflush(FILE *); int fgetc(FILE *); int fgetpos(FILE * , fpos_t *); char *fgets(char * , int, FILE *); FILE *fopen(const char * __filename, const char * __mode) __asm("_" "fopen" ); int fprintf(FILE * , const char * , ...) __attribute__((__format__ (__printf__, 2, 3))); int fputc(int, FILE *); int fputs(const char * , FILE * ) __asm("_" "fputs" ); size_t fread(void * __ptr, size_t __size, size_t __nitems, FILE * __stream); FILE *freopen(const char * , const char * , FILE * ) __asm("_" "freopen" ); int fscanf(FILE * , const char * , ...) __attribute__((__format__ (__scanf__, 2, 3))); int fseek(FILE *, long, int); int fsetpos(FILE *, const fpos_t *); long ftell(FILE *); size_t fwrite(const void * __ptr, size_t __size, size_t __nitems, FILE * __stream) __asm("_" "fwrite" ); int getc(FILE *); int getchar(void); char *gets(char *); void perror(const char *) __attribute__((__cold__)); int printf(const char * , ...) __attribute__((__format__ (__printf__, 1, 2))); int putc(int, FILE *); int putchar(int); int puts(const char *); int remove(const char *); int rename (const char *__old, const char *__new); void rewind(FILE *); int scanf(const char * , ...) __attribute__((__format__ (__scanf__, 1, 2))); void setbuf(FILE * , char * ); int setvbuf(FILE * , char * , int, size_t); int sprintf(char * , const char * , ...) __attribute__((__format__ (__printf__, 2, 3))) __attribute__((__availability__(swift, unavailable, message="Use snprintf instead."))); int sscanf(const char * , const char * , ...) __attribute__((__format__ (__scanf__, 2, 3))); FILE *tmpfile(void); __attribute__((__availability__(swift, unavailable, message="Use mkstemp(3) instead."))) __attribute__((__deprecated__("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead."))) char *tmpnam(char *); int ungetc(int, FILE *); int vfprintf(FILE * , const char * , va_list) __attribute__((__format__ (__printf__, 2, 0))); int vprintf(const char * , va_list) __attribute__((__format__ (__printf__, 1, 0))); int vsprintf(char * , const char * , va_list) __attribute__((__format__ (__printf__, 2, 0))) __attribute__((__availability__(swift, unavailable, message="Use vsnprintf instead."))); } extern "C" { extern "C" { char *ctermid(char *); } FILE *fdopen(int, const char *) __asm("_" "fdopen" ); int fileno(FILE *); } extern "C" { int pclose(FILE *) __attribute__((__availability__(swift, unavailable, message="Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"))); FILE *popen(const char *, const char *) __asm("_" "popen" ) __attribute__((__availability__(swift, unavailable, message="Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"))); } extern "C" { int __srget(FILE *); int __svfscanf(FILE *, const char *, va_list) __attribute__((__format__ (__scanf__, 2, 0))); int __swbuf(int, FILE *); } inline __attribute__ ((__always_inline__)) int __sputc(int _c, FILE *_p) { if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) return (*_p->_p++ = _c); else return (__swbuf(_c, _p)); } extern "C" { void flockfile(FILE *); int ftrylockfile(FILE *); void funlockfile(FILE *); int getc_unlocked(FILE *); int getchar_unlocked(void); int putc_unlocked(int, FILE *); int putchar_unlocked(int); int getw(FILE *); int putw(int, FILE *); __attribute__((__availability__(swift, unavailable, message="Use mkstemp(3) instead."))) __attribute__((__deprecated__("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead."))) char *tempnam(const char *__dir, const char *__prefix) __asm("_" "tempnam" ); } typedef __darwin_off_t off_t; extern "C" { int fseeko(FILE * __stream, off_t __offset, int __whence); off_t ftello(FILE * __stream); } extern "C" { int snprintf(char * __str, size_t __size, const char * __format, ...) __attribute__((__format__ (__printf__, 3, 4))); int vfscanf(FILE * __stream, const char * __format, va_list) __attribute__((__format__ (__scanf__, 2, 0))); int vscanf(const char * __format, va_list) __attribute__((__format__ (__scanf__, 1, 0))); int vsnprintf(char * __str, size_t __size, const char * __format, va_list) __attribute__((__format__ (__printf__, 3, 0))); int vsscanf(const char * __str, const char * __format, va_list) __attribute__((__format__ (__scanf__, 2, 0))); } typedef __darwin_ssize_t ssize_t; extern "C" { int dprintf(int, const char * , ...) __attribute__((__format__ (__printf__, 2, 3))) __attribute__((availability(macosx,introduced=10.7))); int vdprintf(int, const char * , va_list) __attribute__((__format__ (__printf__, 2, 0))) __attribute__((availability(macosx,introduced=10.7))); ssize_t getdelim(char ** __linep, size_t * __linecapp, int __delimiter, FILE * __stream) __attribute__((availability(macosx,introduced=10.7))); ssize_t getline(char ** __linep, size_t * __linecapp, FILE * __stream) __attribute__((availability(macosx,introduced=10.7))); FILE *fmemopen(void * __buf, size_t __size, const char * __mode) __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); FILE *open_memstream(char **__bufp, size_t *__sizep) __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); } extern "C" { extern const int sys_nerr; extern const char *const sys_errlist[]; int asprintf(char ** , const char * , ...) __attribute__((__format__ (__printf__, 2, 3))); char *ctermid_r(char *); char *fgetln(FILE *, size_t *); const char *fmtcheck(const char *, const char *); int fpurge(FILE *); void setbuffer(FILE *, char *, int); int setlinebuf(FILE *); int vasprintf(char ** , const char * , va_list) __attribute__((__format__ (__printf__, 2, 0))); FILE *funopen(const void *, int (* _Nullable)(void *, char *, int), int (* _Nullable)(void *, const char *, int), fpos_t (* _Nullable)(void *, fpos_t, int), int (* _Nullable)(void *)); } static inline __uint16_t _OSSwapInt16( __uint16_t _data ) { return (__uint16_t)((_data << 8) | (_data >> 8)); } static inline __uint32_t _OSSwapInt32( __uint32_t _data ) { return __builtin_bswap32(_data); } static inline __uint64_t _OSSwapInt64( __uint64_t _data ) { return __builtin_bswap64(_data); } typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; typedef unsigned long u_long; typedef unsigned short ushort; typedef unsigned int uint; typedef u_int64_t u_quad_t; typedef int64_t quad_t; typedef quad_t * qaddr_t; typedef char * caddr_t; typedef int32_t daddr_t; typedef __darwin_dev_t dev_t; typedef u_int32_t fixpt_t; typedef __darwin_blkcnt_t blkcnt_t; typedef __darwin_blksize_t blksize_t; typedef __darwin_gid_t gid_t; typedef __uint32_t in_addr_t; typedef __uint16_t in_port_t; typedef __darwin_ino_t ino_t; typedef __darwin_ino64_t ino64_t; typedef __int32_t key_t; typedef __darwin_mode_t mode_t; typedef __uint16_t nlink_t; typedef __darwin_id_t id_t; typedef __darwin_pid_t pid_t; typedef int32_t segsz_t; typedef int32_t swblk_t; typedef __darwin_uid_t uid_t; static inline __int32_t major(__uint32_t _x) { return (__int32_t)(((__uint32_t)_x >> 24) & 0xff); } static inline __int32_t minor(__uint32_t _x) { return (__int32_t)((_x) & 0xffffff); } static inline dev_t makedev(__uint32_t _major, __uint32_t _minor) { return (dev_t)(((_major) << 24) | (_minor)); } typedef __darwin_clock_t clock_t; typedef __darwin_time_t time_t; typedef __darwin_useconds_t useconds_t; typedef __darwin_suseconds_t suseconds_t; typedef __darwin_size_t rsize_t; typedef int errno_t; extern "C" { typedef struct fd_set { __int32_t fds_bits[((((1024) % ((sizeof(__int32_t) * 8))) == 0) ? ((1024) / ((sizeof(__int32_t) * 8))) : (((1024) / ((sizeof(__int32_t) * 8))) + 1))]; } fd_set; int __darwin_check_fd_set_overflow(int, const void *, int) __attribute__((availability(macosx,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))); } inline __attribute__ ((__always_inline__)) int __darwin_check_fd_set(int _a, const void *_b) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunguarded-availability-new" if ((uintptr_t)&__darwin_check_fd_set_overflow != (uintptr_t) 0) { return __darwin_check_fd_set_overflow(_a, _b, 0); } else { return 1; } #pragma clang diagnostic pop } inline __attribute__ ((__always_inline__)) int __darwin_fd_isset(int _fd, const struct fd_set *_p) { if (__darwin_check_fd_set(_fd, (const void *) _p)) { return _p->fds_bits[(unsigned long)_fd / (sizeof(__int32_t) * 8)] & ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % (sizeof(__int32_t) * 8)))); } return 0; } inline __attribute__ ((__always_inline__)) void __darwin_fd_set(int _fd, struct fd_set *const _p) { if (__darwin_check_fd_set(_fd, (const void *) _p)) { (_p->fds_bits[(unsigned long)_fd / (sizeof(__int32_t) * 8)] |= ((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % (sizeof(__int32_t) * 8))))); } } inline __attribute__ ((__always_inline__)) void __darwin_fd_clr(int _fd, struct fd_set *const _p) { if (__darwin_check_fd_set(_fd, (const void *) _p)) { (_p->fds_bits[(unsigned long)_fd / (sizeof(__int32_t) * 8)] &= ~((__int32_t)(((unsigned long)1) << ((unsigned long)_fd % (sizeof(__int32_t) * 8))))); } } typedef __int32_t fd_mask; typedef __darwin_pthread_attr_t pthread_attr_t; typedef __darwin_pthread_cond_t pthread_cond_t; typedef __darwin_pthread_condattr_t pthread_condattr_t; typedef __darwin_pthread_mutex_t pthread_mutex_t; typedef __darwin_pthread_mutexattr_t pthread_mutexattr_t; typedef __darwin_pthread_once_t pthread_once_t; typedef __darwin_pthread_rwlock_t pthread_rwlock_t; typedef __darwin_pthread_rwlockattr_t pthread_rwlockattr_t; typedef __darwin_pthread_t pthread_t; typedef __darwin_pthread_key_t pthread_key_t; typedef __darwin_fsblkcnt_t fsblkcnt_t; typedef __darwin_fsfilcnt_t fsfilcnt_t; typedef __builtin_va_list va_list; typedef __builtin_va_list __gnuc_va_list; typedef enum { P_ALL, P_PID, P_PGID } idtype_t; typedef int sig_atomic_t; struct __darwin_i386_thread_state { unsigned int __eax; unsigned int __ebx; unsigned int __ecx; unsigned int __edx; unsigned int __edi; unsigned int __esi; unsigned int __ebp; unsigned int __esp; unsigned int __ss; unsigned int __eflags; unsigned int __eip; unsigned int __cs; unsigned int __ds; unsigned int __es; unsigned int __fs; unsigned int __gs; }; struct __darwin_fp_control { unsigned short __invalid :1, __denorm :1, __zdiv :1, __ovrfl :1, __undfl :1, __precis :1, :2, __pc :2, __rc :2, :1, :3; }; typedef struct __darwin_fp_control __darwin_fp_control_t; struct __darwin_fp_status { unsigned short __invalid :1, __denorm :1, __zdiv :1, __ovrfl :1, __undfl :1, __precis :1, __stkflt :1, __errsumm :1, __c0 :1, __c1 :1, __c2 :1, __tos :3, __c3 :1, __busy :1; }; typedef struct __darwin_fp_status __darwin_fp_status_t; struct __darwin_mmst_reg { char __mmst_reg[10]; char __mmst_rsrv[6]; }; struct __darwin_xmm_reg { char __xmm_reg[16]; }; struct __darwin_ymm_reg { char __ymm_reg[32]; }; struct __darwin_zmm_reg { char __zmm_reg[64]; }; struct __darwin_opmask_reg { char __opmask_reg[8]; }; struct __darwin_i386_float_state { int __fpu_reserved[2]; struct __darwin_fp_control __fpu_fcw; struct __darwin_fp_status __fpu_fsw; __uint8_t __fpu_ftw; __uint8_t __fpu_rsrv1; __uint16_t __fpu_fop; __uint32_t __fpu_ip; __uint16_t __fpu_cs; __uint16_t __fpu_rsrv2; __uint32_t __fpu_dp; __uint16_t __fpu_ds; __uint16_t __fpu_rsrv3; __uint32_t __fpu_mxcsr; __uint32_t __fpu_mxcsrmask; struct __darwin_mmst_reg __fpu_stmm0; struct __darwin_mmst_reg __fpu_stmm1; struct __darwin_mmst_reg __fpu_stmm2; struct __darwin_mmst_reg __fpu_stmm3; struct __darwin_mmst_reg __fpu_stmm4; struct __darwin_mmst_reg __fpu_stmm5; struct __darwin_mmst_reg __fpu_stmm6; struct __darwin_mmst_reg __fpu_stmm7; struct __darwin_xmm_reg __fpu_xmm0; struct __darwin_xmm_reg __fpu_xmm1; struct __darwin_xmm_reg __fpu_xmm2; struct __darwin_xmm_reg __fpu_xmm3; struct __darwin_xmm_reg __fpu_xmm4; struct __darwin_xmm_reg __fpu_xmm5; struct __darwin_xmm_reg __fpu_xmm6; struct __darwin_xmm_reg __fpu_xmm7; char __fpu_rsrv4[14*16]; int __fpu_reserved1; }; struct __darwin_i386_avx_state { int __fpu_reserved[2]; struct __darwin_fp_control __fpu_fcw; struct __darwin_fp_status __fpu_fsw; __uint8_t __fpu_ftw; __uint8_t __fpu_rsrv1; __uint16_t __fpu_fop; __uint32_t __fpu_ip; __uint16_t __fpu_cs; __uint16_t __fpu_rsrv2; __uint32_t __fpu_dp; __uint16_t __fpu_ds; __uint16_t __fpu_rsrv3; __uint32_t __fpu_mxcsr; __uint32_t __fpu_mxcsrmask; struct __darwin_mmst_reg __fpu_stmm0; struct __darwin_mmst_reg __fpu_stmm1; struct __darwin_mmst_reg __fpu_stmm2; struct __darwin_mmst_reg __fpu_stmm3; struct __darwin_mmst_reg __fpu_stmm4; struct __darwin_mmst_reg __fpu_stmm5; struct __darwin_mmst_reg __fpu_stmm6; struct __darwin_mmst_reg __fpu_stmm7; struct __darwin_xmm_reg __fpu_xmm0; struct __darwin_xmm_reg __fpu_xmm1; struct __darwin_xmm_reg __fpu_xmm2; struct __darwin_xmm_reg __fpu_xmm3; struct __darwin_xmm_reg __fpu_xmm4; struct __darwin_xmm_reg __fpu_xmm5; struct __darwin_xmm_reg __fpu_xmm6; struct __darwin_xmm_reg __fpu_xmm7; char __fpu_rsrv4[14*16]; int __fpu_reserved1; char __avx_reserved1[64]; struct __darwin_xmm_reg __fpu_ymmh0; struct __darwin_xmm_reg __fpu_ymmh1; struct __darwin_xmm_reg __fpu_ymmh2; struct __darwin_xmm_reg __fpu_ymmh3; struct __darwin_xmm_reg __fpu_ymmh4; struct __darwin_xmm_reg __fpu_ymmh5; struct __darwin_xmm_reg __fpu_ymmh6; struct __darwin_xmm_reg __fpu_ymmh7; }; struct __darwin_i386_avx512_state { int __fpu_reserved[2]; struct __darwin_fp_control __fpu_fcw; struct __darwin_fp_status __fpu_fsw; __uint8_t __fpu_ftw; __uint8_t __fpu_rsrv1; __uint16_t __fpu_fop; __uint32_t __fpu_ip; __uint16_t __fpu_cs; __uint16_t __fpu_rsrv2; __uint32_t __fpu_dp; __uint16_t __fpu_ds; __uint16_t __fpu_rsrv3; __uint32_t __fpu_mxcsr; __uint32_t __fpu_mxcsrmask; struct __darwin_mmst_reg __fpu_stmm0; struct __darwin_mmst_reg __fpu_stmm1; struct __darwin_mmst_reg __fpu_stmm2; struct __darwin_mmst_reg __fpu_stmm3; struct __darwin_mmst_reg __fpu_stmm4; struct __darwin_mmst_reg __fpu_stmm5; struct __darwin_mmst_reg __fpu_stmm6; struct __darwin_mmst_reg __fpu_stmm7; struct __darwin_xmm_reg __fpu_xmm0; struct __darwin_xmm_reg __fpu_xmm1; struct __darwin_xmm_reg __fpu_xmm2; struct __darwin_xmm_reg __fpu_xmm3; struct __darwin_xmm_reg __fpu_xmm4; struct __darwin_xmm_reg __fpu_xmm5; struct __darwin_xmm_reg __fpu_xmm6; struct __darwin_xmm_reg __fpu_xmm7; char __fpu_rsrv4[14*16]; int __fpu_reserved1; char __avx_reserved1[64]; struct __darwin_xmm_reg __fpu_ymmh0; struct __darwin_xmm_reg __fpu_ymmh1; struct __darwin_xmm_reg __fpu_ymmh2; struct __darwin_xmm_reg __fpu_ymmh3; struct __darwin_xmm_reg __fpu_ymmh4; struct __darwin_xmm_reg __fpu_ymmh5; struct __darwin_xmm_reg __fpu_ymmh6; struct __darwin_xmm_reg __fpu_ymmh7; struct __darwin_opmask_reg __fpu_k0; struct __darwin_opmask_reg __fpu_k1; struct __darwin_opmask_reg __fpu_k2; struct __darwin_opmask_reg __fpu_k3; struct __darwin_opmask_reg __fpu_k4; struct __darwin_opmask_reg __fpu_k5; struct __darwin_opmask_reg __fpu_k6; struct __darwin_opmask_reg __fpu_k7; struct __darwin_ymm_reg __fpu_zmmh0; struct __darwin_ymm_reg __fpu_zmmh1; struct __darwin_ymm_reg __fpu_zmmh2; struct __darwin_ymm_reg __fpu_zmmh3; struct __darwin_ymm_reg __fpu_zmmh4; struct __darwin_ymm_reg __fpu_zmmh5; struct __darwin_ymm_reg __fpu_zmmh6; struct __darwin_ymm_reg __fpu_zmmh7; }; struct __darwin_i386_exception_state { __uint16_t __trapno; __uint16_t __cpu; __uint32_t __err; __uint32_t __faultvaddr; }; struct __darwin_x86_debug_state32 { unsigned int __dr0; unsigned int __dr1; unsigned int __dr2; unsigned int __dr3; unsigned int __dr4; unsigned int __dr5; unsigned int __dr6; unsigned int __dr7; }; struct __x86_instruction_state { int __insn_stream_valid_bytes; int __insn_offset; int __out_of_synch; __uint8_t __insn_bytes[(2448 - 64 - 4)]; __uint8_t __insn_cacheline[64]; }; struct __last_branch_record { __uint64_t __from_ip; __uint64_t __to_ip; __uint32_t __mispredict : 1, __tsx_abort : 1, __in_tsx : 1, __cycle_count: 16, __reserved : 13; }; struct __last_branch_state { int __lbr_count; __uint32_t __lbr_supported_tsx : 1, __lbr_supported_cycle_count : 1, __reserved : 30; struct __last_branch_record __lbrs[32]; }; struct __x86_pagein_state { int __pagein_error; }; struct __darwin_x86_thread_state64 { __uint64_t __rax; __uint64_t __rbx; __uint64_t __rcx; __uint64_t __rdx; __uint64_t __rdi; __uint64_t __rsi; __uint64_t __rbp; __uint64_t __rsp; __uint64_t __r8; __uint64_t __r9; __uint64_t __r10; __uint64_t __r11; __uint64_t __r12; __uint64_t __r13; __uint64_t __r14; __uint64_t __r15; __uint64_t __rip; __uint64_t __rflags; __uint64_t __cs; __uint64_t __fs; __uint64_t __gs; }; struct __darwin_x86_thread_full_state64 { struct __darwin_x86_thread_state64 __ss64; __uint64_t __ds; __uint64_t __es; __uint64_t __ss; __uint64_t __gsbase; }; struct __darwin_x86_float_state64 { int __fpu_reserved[2]; struct __darwin_fp_control __fpu_fcw; struct __darwin_fp_status __fpu_fsw; __uint8_t __fpu_ftw; __uint8_t __fpu_rsrv1; __uint16_t __fpu_fop; __uint32_t __fpu_ip; __uint16_t __fpu_cs; __uint16_t __fpu_rsrv2; __uint32_t __fpu_dp; __uint16_t __fpu_ds; __uint16_t __fpu_rsrv3; __uint32_t __fpu_mxcsr; __uint32_t __fpu_mxcsrmask; struct __darwin_mmst_reg __fpu_stmm0; struct __darwin_mmst_reg __fpu_stmm1; struct __darwin_mmst_reg __fpu_stmm2; struct __darwin_mmst_reg __fpu_stmm3; struct __darwin_mmst_reg __fpu_stmm4; struct __darwin_mmst_reg __fpu_stmm5; struct __darwin_mmst_reg __fpu_stmm6; struct __darwin_mmst_reg __fpu_stmm7; struct __darwin_xmm_reg __fpu_xmm0; struct __darwin_xmm_reg __fpu_xmm1; struct __darwin_xmm_reg __fpu_xmm2; struct __darwin_xmm_reg __fpu_xmm3; struct __darwin_xmm_reg __fpu_xmm4; struct __darwin_xmm_reg __fpu_xmm5; struct __darwin_xmm_reg __fpu_xmm6; struct __darwin_xmm_reg __fpu_xmm7; struct __darwin_xmm_reg __fpu_xmm8; struct __darwin_xmm_reg __fpu_xmm9; struct __darwin_xmm_reg __fpu_xmm10; struct __darwin_xmm_reg __fpu_xmm11; struct __darwin_xmm_reg __fpu_xmm12; struct __darwin_xmm_reg __fpu_xmm13; struct __darwin_xmm_reg __fpu_xmm14; struct __darwin_xmm_reg __fpu_xmm15; char __fpu_rsrv4[6*16]; int __fpu_reserved1; }; struct __darwin_x86_avx_state64 { int __fpu_reserved[2]; struct __darwin_fp_control __fpu_fcw; struct __darwin_fp_status __fpu_fsw; __uint8_t __fpu_ftw; __uint8_t __fpu_rsrv1; __uint16_t __fpu_fop; __uint32_t __fpu_ip; __uint16_t __fpu_cs; __uint16_t __fpu_rsrv2; __uint32_t __fpu_dp; __uint16_t __fpu_ds; __uint16_t __fpu_rsrv3; __uint32_t __fpu_mxcsr; __uint32_t __fpu_mxcsrmask; struct __darwin_mmst_reg __fpu_stmm0; struct __darwin_mmst_reg __fpu_stmm1; struct __darwin_mmst_reg __fpu_stmm2; struct __darwin_mmst_reg __fpu_stmm3; struct __darwin_mmst_reg __fpu_stmm4; struct __darwin_mmst_reg __fpu_stmm5; struct __darwin_mmst_reg __fpu_stmm6; struct __darwin_mmst_reg __fpu_stmm7; struct __darwin_xmm_reg __fpu_xmm0; struct __darwin_xmm_reg __fpu_xmm1; struct __darwin_xmm_reg __fpu_xmm2; struct __darwin_xmm_reg __fpu_xmm3; struct __darwin_xmm_reg __fpu_xmm4; struct __darwin_xmm_reg __fpu_xmm5; struct __darwin_xmm_reg __fpu_xmm6; struct __darwin_xmm_reg __fpu_xmm7; struct __darwin_xmm_reg __fpu_xmm8; struct __darwin_xmm_reg __fpu_xmm9; struct __darwin_xmm_reg __fpu_xmm10; struct __darwin_xmm_reg __fpu_xmm11; struct __darwin_xmm_reg __fpu_xmm12; struct __darwin_xmm_reg __fpu_xmm13; struct __darwin_xmm_reg __fpu_xmm14; struct __darwin_xmm_reg __fpu_xmm15; char __fpu_rsrv4[6*16]; int __fpu_reserved1; char __avx_reserved1[64]; struct __darwin_xmm_reg __fpu_ymmh0; struct __darwin_xmm_reg __fpu_ymmh1; struct __darwin_xmm_reg __fpu_ymmh2; struct __darwin_xmm_reg __fpu_ymmh3; struct __darwin_xmm_reg __fpu_ymmh4; struct __darwin_xmm_reg __fpu_ymmh5; struct __darwin_xmm_reg __fpu_ymmh6; struct __darwin_xmm_reg __fpu_ymmh7; struct __darwin_xmm_reg __fpu_ymmh8; struct __darwin_xmm_reg __fpu_ymmh9; struct __darwin_xmm_reg __fpu_ymmh10; struct __darwin_xmm_reg __fpu_ymmh11; struct __darwin_xmm_reg __fpu_ymmh12; struct __darwin_xmm_reg __fpu_ymmh13; struct __darwin_xmm_reg __fpu_ymmh14; struct __darwin_xmm_reg __fpu_ymmh15; }; struct __darwin_x86_avx512_state64 { int __fpu_reserved[2]; struct __darwin_fp_control __fpu_fcw; struct __darwin_fp_status __fpu_fsw; __uint8_t __fpu_ftw; __uint8_t __fpu_rsrv1; __uint16_t __fpu_fop; __uint32_t __fpu_ip; __uint16_t __fpu_cs; __uint16_t __fpu_rsrv2; __uint32_t __fpu_dp; __uint16_t __fpu_ds; __uint16_t __fpu_rsrv3; __uint32_t __fpu_mxcsr; __uint32_t __fpu_mxcsrmask; struct __darwin_mmst_reg __fpu_stmm0; struct __darwin_mmst_reg __fpu_stmm1; struct __darwin_mmst_reg __fpu_stmm2; struct __darwin_mmst_reg __fpu_stmm3; struct __darwin_mmst_reg __fpu_stmm4; struct __darwin_mmst_reg __fpu_stmm5; struct __darwin_mmst_reg __fpu_stmm6; struct __darwin_mmst_reg __fpu_stmm7; struct __darwin_xmm_reg __fpu_xmm0; struct __darwin_xmm_reg __fpu_xmm1; struct __darwin_xmm_reg __fpu_xmm2; struct __darwin_xmm_reg __fpu_xmm3; struct __darwin_xmm_reg __fpu_xmm4; struct __darwin_xmm_reg __fpu_xmm5; struct __darwin_xmm_reg __fpu_xmm6; struct __darwin_xmm_reg __fpu_xmm7; struct __darwin_xmm_reg __fpu_xmm8; struct __darwin_xmm_reg __fpu_xmm9; struct __darwin_xmm_reg __fpu_xmm10; struct __darwin_xmm_reg __fpu_xmm11; struct __darwin_xmm_reg __fpu_xmm12; struct __darwin_xmm_reg __fpu_xmm13; struct __darwin_xmm_reg __fpu_xmm14; struct __darwin_xmm_reg __fpu_xmm15; char __fpu_rsrv4[6*16]; int __fpu_reserved1; char __avx_reserved1[64]; struct __darwin_xmm_reg __fpu_ymmh0; struct __darwin_xmm_reg __fpu_ymmh1; struct __darwin_xmm_reg __fpu_ymmh2; struct __darwin_xmm_reg __fpu_ymmh3; struct __darwin_xmm_reg __fpu_ymmh4; struct __darwin_xmm_reg __fpu_ymmh5; struct __darwin_xmm_reg __fpu_ymmh6; struct __darwin_xmm_reg __fpu_ymmh7; struct __darwin_xmm_reg __fpu_ymmh8; struct __darwin_xmm_reg __fpu_ymmh9; struct __darwin_xmm_reg __fpu_ymmh10; struct __darwin_xmm_reg __fpu_ymmh11; struct __darwin_xmm_reg __fpu_ymmh12; struct __darwin_xmm_reg __fpu_ymmh13; struct __darwin_xmm_reg __fpu_ymmh14; struct __darwin_xmm_reg __fpu_ymmh15; struct __darwin_opmask_reg __fpu_k0; struct __darwin_opmask_reg __fpu_k1; struct __darwin_opmask_reg __fpu_k2; struct __darwin_opmask_reg __fpu_k3; struct __darwin_opmask_reg __fpu_k4; struct __darwin_opmask_reg __fpu_k5; struct __darwin_opmask_reg __fpu_k6; struct __darwin_opmask_reg __fpu_k7; struct __darwin_ymm_reg __fpu_zmmh0; struct __darwin_ymm_reg __fpu_zmmh1; struct __darwin_ymm_reg __fpu_zmmh2; struct __darwin_ymm_reg __fpu_zmmh3; struct __darwin_ymm_reg __fpu_zmmh4; struct __darwin_ymm_reg __fpu_zmmh5; struct __darwin_ymm_reg __fpu_zmmh6; struct __darwin_ymm_reg __fpu_zmmh7; struct __darwin_ymm_reg __fpu_zmmh8; struct __darwin_ymm_reg __fpu_zmmh9; struct __darwin_ymm_reg __fpu_zmmh10; struct __darwin_ymm_reg __fpu_zmmh11; struct __darwin_ymm_reg __fpu_zmmh12; struct __darwin_ymm_reg __fpu_zmmh13; struct __darwin_ymm_reg __fpu_zmmh14; struct __darwin_ymm_reg __fpu_zmmh15; struct __darwin_zmm_reg __fpu_zmm16; struct __darwin_zmm_reg __fpu_zmm17; struct __darwin_zmm_reg __fpu_zmm18; struct __darwin_zmm_reg __fpu_zmm19; struct __darwin_zmm_reg __fpu_zmm20; struct __darwin_zmm_reg __fpu_zmm21; struct __darwin_zmm_reg __fpu_zmm22; struct __darwin_zmm_reg __fpu_zmm23; struct __darwin_zmm_reg __fpu_zmm24; struct __darwin_zmm_reg __fpu_zmm25; struct __darwin_zmm_reg __fpu_zmm26; struct __darwin_zmm_reg __fpu_zmm27; struct __darwin_zmm_reg __fpu_zmm28; struct __darwin_zmm_reg __fpu_zmm29; struct __darwin_zmm_reg __fpu_zmm30; struct __darwin_zmm_reg __fpu_zmm31; }; struct __darwin_x86_exception_state64 { __uint16_t __trapno; __uint16_t __cpu; __uint32_t __err; __uint64_t __faultvaddr; }; struct __darwin_x86_debug_state64 { __uint64_t __dr0; __uint64_t __dr1; __uint64_t __dr2; __uint64_t __dr3; __uint64_t __dr4; __uint64_t __dr5; __uint64_t __dr6; __uint64_t __dr7; }; struct __darwin_x86_cpmu_state64 { __uint64_t __ctrs[16]; }; struct __darwin_mcontext32 { struct __darwin_i386_exception_state __es; struct __darwin_i386_thread_state __ss; struct __darwin_i386_float_state __fs; }; struct __darwin_mcontext_avx32 { struct __darwin_i386_exception_state __es; struct __darwin_i386_thread_state __ss; struct __darwin_i386_avx_state __fs; }; struct __darwin_mcontext_avx512_32 { struct __darwin_i386_exception_state __es; struct __darwin_i386_thread_state __ss; struct __darwin_i386_avx512_state __fs; }; struct __darwin_mcontext64 { struct __darwin_x86_exception_state64 __es; struct __darwin_x86_thread_state64 __ss; struct __darwin_x86_float_state64 __fs; }; struct __darwin_mcontext64_full { struct __darwin_x86_exception_state64 __es; struct __darwin_x86_thread_full_state64 __ss; struct __darwin_x86_float_state64 __fs; }; struct __darwin_mcontext_avx64 { struct __darwin_x86_exception_state64 __es; struct __darwin_x86_thread_state64 __ss; struct __darwin_x86_avx_state64 __fs; }; struct __darwin_mcontext_avx64_full { struct __darwin_x86_exception_state64 __es; struct __darwin_x86_thread_full_state64 __ss; struct __darwin_x86_avx_state64 __fs; }; struct __darwin_mcontext_avx512_64 { struct __darwin_x86_exception_state64 __es; struct __darwin_x86_thread_state64 __ss; struct __darwin_x86_avx512_state64 __fs; }; struct __darwin_mcontext_avx512_64_full { struct __darwin_x86_exception_state64 __es; struct __darwin_x86_thread_full_state64 __ss; struct __darwin_x86_avx512_state64 __fs; }; typedef struct __darwin_mcontext64 *mcontext_t; struct __darwin_sigaltstack { void *ss_sp; __darwin_size_t ss_size; int ss_flags; }; typedef struct __darwin_sigaltstack stack_t; struct __darwin_ucontext { int uc_onstack; __darwin_sigset_t uc_sigmask; struct __darwin_sigaltstack uc_stack; struct __darwin_ucontext *uc_link; __darwin_size_t uc_mcsize; struct __darwin_mcontext64 *uc_mcontext; }; typedef struct __darwin_ucontext ucontext_t; typedef __darwin_sigset_t sigset_t; union sigval { int sival_int; void *sival_ptr; }; struct sigevent { int sigev_notify; int sigev_signo; union sigval sigev_value; void (*sigev_notify_function)(union sigval); pthread_attr_t *sigev_notify_attributes; }; typedef struct __siginfo { int si_signo; int si_errno; int si_code; pid_t si_pid; uid_t si_uid; int si_status; void *si_addr; union sigval si_value; long si_band; unsigned long __pad[7]; } siginfo_t; union __sigaction_u { void (*__sa_handler)(int); void (*__sa_sigaction)(int, struct __siginfo *, void *); }; struct __sigaction { union __sigaction_u __sigaction_u; void (*sa_tramp)(void *, int, int, siginfo_t *, void *); sigset_t sa_mask; int sa_flags; }; struct sigaction { union __sigaction_u __sigaction_u; sigset_t sa_mask; int sa_flags; }; typedef void (*sig_t)(int); struct sigvec { void (*sv_handler)(int); int sv_mask; int sv_flags; }; struct sigstack { char *ss_sp; int ss_onstack; }; extern "C" { void(*signal(int, void (*)(int)))(int); } typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; typedef int64_t int_least64_t; typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; typedef uint64_t uint_least64_t; typedef int8_t int_fast8_t; typedef int16_t int_fast16_t; typedef int32_t int_fast32_t; typedef int64_t int_fast64_t; typedef uint8_t uint_fast8_t; typedef uint16_t uint_fast16_t; typedef uint32_t uint_fast32_t; typedef uint64_t uint_fast64_t; typedef long int intmax_t; typedef long unsigned int uintmax_t; struct timeval { __darwin_time_t tv_sec; __darwin_suseconds_t tv_usec; }; typedef __uint64_t rlim_t; struct rusage { struct timeval ru_utime; struct timeval ru_stime; long ru_maxrss; long ru_ixrss; long ru_idrss; long ru_isrss; long ru_minflt; long ru_majflt; long ru_nswap; long ru_inblock; long ru_oublock; long ru_msgsnd; long ru_msgrcv; long ru_nsignals; long ru_nvcsw; long ru_nivcsw; }; typedef void *rusage_info_t; struct rusage_info_v0 { uint8_t ri_uuid[16]; uint64_t ri_user_time; uint64_t ri_system_time; uint64_t ri_pkg_idle_wkups; uint64_t ri_interrupt_wkups; uint64_t ri_pageins; uint64_t ri_wired_size; uint64_t ri_resident_size; uint64_t ri_phys_footprint; uint64_t ri_proc_start_abstime; uint64_t ri_proc_exit_abstime; }; struct rusage_info_v1 { uint8_t ri_uuid[16]; uint64_t ri_user_time; uint64_t ri_system_time; uint64_t ri_pkg_idle_wkups; uint64_t ri_interrupt_wkups; uint64_t ri_pageins; uint64_t ri_wired_size; uint64_t ri_resident_size; uint64_t ri_phys_footprint; uint64_t ri_proc_start_abstime; uint64_t ri_proc_exit_abstime; uint64_t ri_child_user_time; uint64_t ri_child_system_time; uint64_t ri_child_pkg_idle_wkups; uint64_t ri_child_interrupt_wkups; uint64_t ri_child_pageins; uint64_t ri_child_elapsed_abstime; }; struct rusage_info_v2 { uint8_t ri_uuid[16]; uint64_t ri_user_time; uint64_t ri_system_time; uint64_t ri_pkg_idle_wkups; uint64_t ri_interrupt_wkups; uint64_t ri_pageins; uint64_t ri_wired_size; uint64_t ri_resident_size; uint64_t ri_phys_footprint; uint64_t ri_proc_start_abstime; uint64_t ri_proc_exit_abstime; uint64_t ri_child_user_time; uint64_t ri_child_system_time; uint64_t ri_child_pkg_idle_wkups; uint64_t ri_child_interrupt_wkups; uint64_t ri_child_pageins; uint64_t ri_child_elapsed_abstime; uint64_t ri_diskio_bytesread; uint64_t ri_diskio_byteswritten; }; struct rusage_info_v3 { uint8_t ri_uuid[16]; uint64_t ri_user_time; uint64_t ri_system_time; uint64_t ri_pkg_idle_wkups; uint64_t ri_interrupt_wkups; uint64_t ri_pageins; uint64_t ri_wired_size; uint64_t ri_resident_size; uint64_t ri_phys_footprint; uint64_t ri_proc_start_abstime; uint64_t ri_proc_exit_abstime; uint64_t ri_child_user_time; uint64_t ri_child_system_time; uint64_t ri_child_pkg_idle_wkups; uint64_t ri_child_interrupt_wkups; uint64_t ri_child_pageins; uint64_t ri_child_elapsed_abstime; uint64_t ri_diskio_bytesread; uint64_t ri_diskio_byteswritten; uint64_t ri_cpu_time_qos_default; uint64_t ri_cpu_time_qos_maintenance; uint64_t ri_cpu_time_qos_background; uint64_t ri_cpu_time_qos_utility; uint64_t ri_cpu_time_qos_legacy; uint64_t ri_cpu_time_qos_user_initiated; uint64_t ri_cpu_time_qos_user_interactive; uint64_t ri_billed_system_time; uint64_t ri_serviced_system_time; }; struct rusage_info_v4 { uint8_t ri_uuid[16]; uint64_t ri_user_time; uint64_t ri_system_time; uint64_t ri_pkg_idle_wkups; uint64_t ri_interrupt_wkups; uint64_t ri_pageins; uint64_t ri_wired_size; uint64_t ri_resident_size; uint64_t ri_phys_footprint; uint64_t ri_proc_start_abstime; uint64_t ri_proc_exit_abstime; uint64_t ri_child_user_time; uint64_t ri_child_system_time; uint64_t ri_child_pkg_idle_wkups; uint64_t ri_child_interrupt_wkups; uint64_t ri_child_pageins; uint64_t ri_child_elapsed_abstime; uint64_t ri_diskio_bytesread; uint64_t ri_diskio_byteswritten; uint64_t ri_cpu_time_qos_default; uint64_t ri_cpu_time_qos_maintenance; uint64_t ri_cpu_time_qos_background; uint64_t ri_cpu_time_qos_utility; uint64_t ri_cpu_time_qos_legacy; uint64_t ri_cpu_time_qos_user_initiated; uint64_t ri_cpu_time_qos_user_interactive; uint64_t ri_billed_system_time; uint64_t ri_serviced_system_time; uint64_t ri_logical_writes; uint64_t ri_lifetime_max_phys_footprint; uint64_t ri_instructions; uint64_t ri_cycles; uint64_t ri_billed_energy; uint64_t ri_serviced_energy; uint64_t ri_interval_max_phys_footprint; uint64_t ri_runnable_time; }; struct rusage_info_v5 { uint8_t ri_uuid[16]; uint64_t ri_user_time; uint64_t ri_system_time; uint64_t ri_pkg_idle_wkups; uint64_t ri_interrupt_wkups; uint64_t ri_pageins; uint64_t ri_wired_size; uint64_t ri_resident_size; uint64_t ri_phys_footprint; uint64_t ri_proc_start_abstime; uint64_t ri_proc_exit_abstime; uint64_t ri_child_user_time; uint64_t ri_child_system_time; uint64_t ri_child_pkg_idle_wkups; uint64_t ri_child_interrupt_wkups; uint64_t ri_child_pageins; uint64_t ri_child_elapsed_abstime; uint64_t ri_diskio_bytesread; uint64_t ri_diskio_byteswritten; uint64_t ri_cpu_time_qos_default; uint64_t ri_cpu_time_qos_maintenance; uint64_t ri_cpu_time_qos_background; uint64_t ri_cpu_time_qos_utility; uint64_t ri_cpu_time_qos_legacy; uint64_t ri_cpu_time_qos_user_initiated; uint64_t ri_cpu_time_qos_user_interactive; uint64_t ri_billed_system_time; uint64_t ri_serviced_system_time; uint64_t ri_logical_writes; uint64_t ri_lifetime_max_phys_footprint; uint64_t ri_instructions; uint64_t ri_cycles; uint64_t ri_billed_energy; uint64_t ri_serviced_energy; uint64_t ri_interval_max_phys_footprint; uint64_t ri_runnable_time; uint64_t ri_flags; }; typedef struct rusage_info_v5 rusage_info_current; struct rlimit { rlim_t rlim_cur; rlim_t rlim_max; }; struct proc_rlimit_control_wakeupmon { uint32_t wm_flags; int32_t wm_rate; }; extern "C" { int getpriority(int, id_t); int getiopolicy_np(int, int) __attribute__((availability(macosx,introduced=10.5))); int getrlimit(int, struct rlimit *) __asm("_" "getrlimit" ); int getrusage(int, struct rusage *); int setpriority(int, id_t, int); int setiopolicy_np(int, int, int) __attribute__((availability(macosx,introduced=10.5))); int setrlimit(int, const struct rlimit *) __asm("_" "setrlimit" ); } union wait { int w_status; struct { unsigned int w_Termsig:7, w_Coredump:1, w_Retcode:8, w_Filler:16; } w_T; struct { unsigned int w_Stopval:8, w_Stopsig:8, w_Filler:16; } w_S; }; extern "C" { pid_t wait(int *) __asm("_" "wait" ); pid_t waitpid(pid_t, int *, int) __asm("_" "waitpid" ); int waitid(idtype_t, id_t, siginfo_t *, int) __asm("_" "waitid" ); pid_t wait3(int *, int, struct rusage *); pid_t wait4(pid_t, int *, int, struct rusage *); } extern "C" { void *alloca(size_t); } typedef __darwin_ct_rune_t ct_rune_t; typedef __darwin_rune_t rune_t; typedef struct { int quot; int rem; } div_t; typedef struct { long quot; long rem; } ldiv_t; typedef struct { long long quot; long long rem; } lldiv_t; extern int __mb_cur_max; extern "C" { void *malloc(size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1))); void *calloc(size_t __count, size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1,2))); void free(void *); void *realloc(void *__ptr, size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(2))); void *valloc(size_t) __attribute__((alloc_size(1))); void *aligned_alloc(size_t __alignment, size_t __size) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(2))) __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); int posix_memalign(void **__memptr, size_t __alignment, size_t __size) __attribute__((availability(macosx,introduced=10.6))); } extern "C" { void abort(void) __attribute__((__cold__)) __attribute__((__noreturn__)); int abs(int) __attribute__((__const__)); int atexit(void (* _Nonnull)(void)); double atof(const char *); int atoi(const char *); long atol(const char *); long long atoll(const char *); void *bsearch(const void *__key, const void *__base, size_t __nel, size_t __width, int (* _Nonnull __compar)(const void *, const void *)); div_t div(int, int) __attribute__((__const__)); void exit(int) __attribute__((__noreturn__)); char *getenv(const char *); long labs(long) __attribute__((__const__)); ldiv_t ldiv(long, long) __attribute__((__const__)); long long llabs(long long); lldiv_t lldiv(long long, long long); int mblen(const char *__s, size_t __n); size_t mbstowcs(wchar_t * , const char * , size_t); int mbtowc(wchar_t * , const char * , size_t); void qsort(void *__base, size_t __nel, size_t __width, int (* _Nonnull __compar)(const void *, const void *)); int rand(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); void srand(unsigned) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); double strtod(const char *, char **) __asm("_" "strtod" ); float strtof(const char *, char **) __asm("_" "strtof" ); long strtol(const char *__str, char **__endptr, int __base); long double strtold(const char *, char **); long long strtoll(const char *__str, char **__endptr, int __base); unsigned long strtoul(const char *__str, char **__endptr, int __base); unsigned long long strtoull(const char *__str, char **__endptr, int __base); __attribute__((__availability__(swift, unavailable, message="Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"))) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) int system(const char *) __asm("_" "system" ); size_t wcstombs(char * , const wchar_t * , size_t); int wctomb(char *, wchar_t); void _Exit(int) __attribute__((__noreturn__)); long a64l(const char *); double drand48(void); char *ecvt(double, int, int *, int *); double erand48(unsigned short[3]); char *fcvt(double, int, int *, int *); char *gcvt(double, int, char *); int getsubopt(char **, char * const *, char **); int grantpt(int); char *initstate(unsigned, char *, size_t); long jrand48(unsigned short[3]) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); char *l64a(long); void lcong48(unsigned short[7]); long lrand48(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); char *mktemp(char *); int mkstemp(char *); long mrand48(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); long nrand48(unsigned short[3]) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); int posix_openpt(int); char *ptsname(int); int ptsname_r(int fildes, char *buffer, size_t buflen) __attribute__((availability(macos,introduced=10.13.4))) __attribute__((availability(ios,introduced=11.3))) __attribute__((availability(tvos,introduced=11.3))) __attribute__((availability(watchos,introduced=4.3))); int putenv(char *) __asm("_" "putenv" ); long random(void) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); int rand_r(unsigned *) __attribute__((__availability__(swift, unavailable, message="Use arc4random instead."))); char *realpath(const char * , char * ) __asm("_" "realpath" "$DARWIN_EXTSN"); unsigned short *seed48(unsigned short[3]); int setenv(const char * __name, const char * __value, int __overwrite) __asm("_" "setenv" ); void setkey(const char *) __asm("_" "setkey" ); char *setstate(const char *); void srand48(long); void srandom(unsigned); int unlockpt(int); int unsetenv(const char *) __asm("_" "unsetenv" ); uint32_t arc4random(void); void arc4random_addrandom(unsigned char * , int ) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(macosx,deprecated=10.12,message="use arc4random_stir"))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=10.0,message="use arc4random_stir"))) __attribute__((availability(tvos,introduced=2.0))) __attribute__((availability(tvos,deprecated=10.0,message="use arc4random_stir"))) __attribute__((availability(watchos,introduced=1.0))) __attribute__((availability(watchos,deprecated=3.0,message="use arc4random_stir"))); void arc4random_buf(void * __buf, size_t __nbytes) __attribute__((availability(macosx,introduced=10.7))); void arc4random_stir(void); uint32_t arc4random_uniform(uint32_t __upper_bound) __attribute__((availability(macosx,introduced=10.7))); int atexit_b(void (^ _Nonnull)(void)) __attribute__((availability(macosx,introduced=10.6))); void *bsearch_b(const void *__key, const void *__base, size_t __nel, size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __attribute__((__noescape__))) __attribute__((availability(macosx,introduced=10.6))); char *cgetcap(char *, const char *, int); int cgetclose(void); int cgetent(char **, char **, const char *); int cgetfirst(char **, char **); int cgetmatch(const char *, const char *); int cgetnext(char **, char **); int cgetnum(char *, const char *, long *); int cgetset(const char *); int cgetstr(char *, const char *, char **); int cgetustr(char *, const char *, char **); int daemon(int, int) __asm("_" "daemon" "$1050") __attribute__((availability(macosx,introduced=10.0,deprecated=10.5,message="Use posix_spawn APIs instead."))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); char *devname(dev_t, mode_t); char *devname_r(dev_t, mode_t, char *buf, int len); char *getbsize(int *, long *); int getloadavg(double [], int); const char *getprogname(void); void setprogname(const char *); int heapsort(void *__base, size_t __nel, size_t __width, int (* _Nonnull __compar)(const void *, const void *)); int heapsort_b(void *__base, size_t __nel, size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __attribute__((__noescape__))) __attribute__((availability(macosx,introduced=10.6))); int mergesort(void *__base, size_t __nel, size_t __width, int (* _Nonnull __compar)(const void *, const void *)); int mergesort_b(void *__base, size_t __nel, size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __attribute__((__noescape__))) __attribute__((availability(macosx,introduced=10.6))); void psort(void *__base, size_t __nel, size_t __width, int (* _Nonnull __compar)(const void *, const void *)) __attribute__((availability(macosx,introduced=10.6))); void psort_b(void *__base, size_t __nel, size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __attribute__((__noescape__))) __attribute__((availability(macosx,introduced=10.6))); void psort_r(void *__base, size_t __nel, size_t __width, void *, int (* _Nonnull __compar)(void *, const void *, const void *)) __attribute__((availability(macosx,introduced=10.6))); void qsort_b(void *__base, size_t __nel, size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __attribute__((__noescape__))) __attribute__((availability(macosx,introduced=10.6))); void qsort_r(void *__base, size_t __nel, size_t __width, void *, int (* _Nonnull __compar)(void *, const void *, const void *)); int radixsort(const unsigned char **__base, int __nel, const unsigned char *__table, unsigned __endbyte); int rpmatch(const char *) __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); int sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table, unsigned __endbyte); void sranddev(void); void srandomdev(void); void *reallocf(void *__ptr, size_t __size) __attribute__((alloc_size(2))); long long strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))); long long strtoq(const char *__str, char **__endptr, int __base); unsigned long long strtouq(const char *__str, char **__endptr, int __base); extern char *suboptarg; } extern "C" { void __assert_rtn(const char *, const char *, int, const char *) __attribute__((__noreturn__)) __attribute__((__cold__)) __attribute__((__disable_tail_calls__)); } typedef __darwin_wint_t wint_t; typedef struct { __darwin_rune_t __min; __darwin_rune_t __max; __darwin_rune_t __map; __uint32_t *__types; } _RuneEntry; typedef struct { int __nranges; _RuneEntry *__ranges; } _RuneRange; typedef struct { char __name[14]; __uint32_t __mask; } _RuneCharClass; typedef struct { char __magic[8]; char __encoding[32]; __darwin_rune_t (*__sgetrune)(const char *, __darwin_size_t, char const **); int (*__sputrune)(__darwin_rune_t, char *, __darwin_size_t, char **); __darwin_rune_t __invalid_rune; __uint32_t __runetype[(1 <<8 )]; __darwin_rune_t __maplower[(1 <<8 )]; __darwin_rune_t __mapupper[(1 <<8 )]; _RuneRange __runetype_ext; _RuneRange __maplower_ext; _RuneRange __mapupper_ext; void *__variable; int __variable_len; int __ncharclasses; _RuneCharClass *__charclasses; } _RuneLocale; extern "C" { extern _RuneLocale _DefaultRuneLocale; extern _RuneLocale *_CurrentRuneLocale; } extern "C" { unsigned long ___runetype(__darwin_ct_rune_t); __darwin_ct_rune_t ___tolower(__darwin_ct_rune_t); __darwin_ct_rune_t ___toupper(__darwin_ct_rune_t); } inline int isascii(int _c) { return ((_c & ~0x7F) == 0); } extern "C" { int __maskrune(__darwin_ct_rune_t, unsigned long); } inline int __istype(__darwin_ct_rune_t _c, unsigned long _f) { return (isascii(_c) ? !!(_DefaultRuneLocale.__runetype[_c] & _f) : !!__maskrune(_c, _f)); } inline __darwin_ct_rune_t __isctype(__darwin_ct_rune_t _c, unsigned long _f) { return (_c < 0 || _c >= (1 <<8 )) ? 0 : !!(_DefaultRuneLocale.__runetype[_c] & _f); } extern "C" { __darwin_ct_rune_t __toupper(__darwin_ct_rune_t); __darwin_ct_rune_t __tolower(__darwin_ct_rune_t); } inline int __wcwidth(__darwin_ct_rune_t _c) { unsigned int _x; if (_c == 0) return (0); _x = (unsigned int)__maskrune(_c, 0xe0000000L|0x00040000L); if ((_x & 0xe0000000L) != 0) return ((_x & 0xe0000000L) >> 30); return ((_x & 0x00040000L) != 0 ? 1 : -1); } inline int isalnum(int _c) { return (__istype(_c, 0x00000100L|0x00000400L)); } inline int isalpha(int _c) { return (__istype(_c, 0x00000100L)); } inline int isblank(int _c) { return (__istype(_c, 0x00020000L)); } inline int iscntrl(int _c) { return (__istype(_c, 0x00000200L)); } inline int isdigit(int _c) { return (__isctype(_c, 0x00000400L)); } inline int isgraph(int _c) { return (__istype(_c, 0x00000800L)); } inline int islower(int _c) { return (__istype(_c, 0x00001000L)); } inline int isprint(int _c) { return (__istype(_c, 0x00040000L)); } inline int ispunct(int _c) { return (__istype(_c, 0x00002000L)); } inline int isspace(int _c) { return (__istype(_c, 0x00004000L)); } inline int isupper(int _c) { return (__istype(_c, 0x00008000L)); } inline int isxdigit(int _c) { return (__isctype(_c, 0x00010000L)); } inline int toascii(int _c) { return (_c & 0x7F); } inline int tolower(int _c) { return (__tolower(_c)); } inline int toupper(int _c) { return (__toupper(_c)); } inline int digittoint(int _c) { return (__maskrune(_c, 0x0F)); } inline int ishexnumber(int _c) { return (__istype(_c, 0x00010000L)); } inline int isideogram(int _c) { return (__istype(_c, 0x00080000L)); } inline int isnumber(int _c) { return (__istype(_c, 0x00000400L)); } inline int isphonogram(int _c) { return (__istype(_c, 0x00200000L)); } inline int isrune(int _c) { return (__istype(_c, 0xFFFFFFF0L)); } inline int isspecial(int _c) { return (__istype(_c, 0x00100000L)); } extern "C" { extern int * __error(void); } struct lconv { char *decimal_point; char *thousands_sep; char *grouping; char *int_curr_symbol; char *currency_symbol; char *mon_decimal_point; char *mon_thousands_sep; char *mon_grouping; char *positive_sign; char *negative_sign; char int_frac_digits; char frac_digits; char p_cs_precedes; char p_sep_by_space; char n_cs_precedes; char n_sep_by_space; char p_sign_posn; char n_sign_posn; char int_p_cs_precedes; char int_n_cs_precedes; char int_p_sep_by_space; char int_n_sep_by_space; char int_p_sign_posn; char int_n_sign_posn; }; extern "C" { struct lconv *localeconv(void); } extern "C" { char *setlocale(int, const char *); } extern "C" { typedef float float_t; typedef double double_t; extern int __math_errhandling(void); extern int __fpclassifyf(float); extern int __fpclassifyd(double); extern int __fpclassifyl(long double); inline __attribute__ ((__always_inline__)) int __inline_isfinitef(float); inline __attribute__ ((__always_inline__)) int __inline_isfinited(double); inline __attribute__ ((__always_inline__)) int __inline_isfinitel(long double); inline __attribute__ ((__always_inline__)) int __inline_isinff(float); inline __attribute__ ((__always_inline__)) int __inline_isinfd(double); inline __attribute__ ((__always_inline__)) int __inline_isinfl(long double); inline __attribute__ ((__always_inline__)) int __inline_isnanf(float); inline __attribute__ ((__always_inline__)) int __inline_isnand(double); inline __attribute__ ((__always_inline__)) int __inline_isnanl(long double); inline __attribute__ ((__always_inline__)) int __inline_isnormalf(float); inline __attribute__ ((__always_inline__)) int __inline_isnormald(double); inline __attribute__ ((__always_inline__)) int __inline_isnormall(long double); inline __attribute__ ((__always_inline__)) int __inline_signbitf(float); inline __attribute__ ((__always_inline__)) int __inline_signbitd(double); inline __attribute__ ((__always_inline__)) int __inline_signbitl(long double); inline __attribute__ ((__always_inline__)) int __inline_isfinitef(float __x) { return __x == __x && __builtin_fabsf(__x) != __builtin_inff(); } inline __attribute__ ((__always_inline__)) int __inline_isfinited(double __x) { return __x == __x && __builtin_fabs(__x) != __builtin_inf(); } inline __attribute__ ((__always_inline__)) int __inline_isfinitel(long double __x) { return __x == __x && __builtin_fabsl(__x) != __builtin_infl(); } inline __attribute__ ((__always_inline__)) int __inline_isinff(float __x) { return __builtin_fabsf(__x) == __builtin_inff(); } inline __attribute__ ((__always_inline__)) int __inline_isinfd(double __x) { return __builtin_fabs(__x) == __builtin_inf(); } inline __attribute__ ((__always_inline__)) int __inline_isinfl(long double __x) { return __builtin_fabsl(__x) == __builtin_infl(); } inline __attribute__ ((__always_inline__)) int __inline_isnanf(float __x) { return __x != __x; } inline __attribute__ ((__always_inline__)) int __inline_isnand(double __x) { return __x != __x; } inline __attribute__ ((__always_inline__)) int __inline_isnanl(long double __x) { return __x != __x; } inline __attribute__ ((__always_inline__)) int __inline_signbitf(float __x) { union { float __f; unsigned int __u; } __u; __u.__f = __x; return (int)(__u.__u >> 31); } inline __attribute__ ((__always_inline__)) int __inline_signbitd(double __x) { union { double __f; unsigned long long __u; } __u; __u.__f = __x; return (int)(__u.__u >> 63); } inline __attribute__ ((__always_inline__)) int __inline_signbitl(long double __x) { union { long double __ld; struct{ unsigned long long __m; unsigned short __sexp; } __p; } __u; __u.__ld = __x; return (int)(__u.__p.__sexp >> 15); } inline __attribute__ ((__always_inline__)) int __inline_isnormalf(float __x) { return __inline_isfinitef(__x) && __builtin_fabsf(__x) >= 1.17549435e-38F; } inline __attribute__ ((__always_inline__)) int __inline_isnormald(double __x) { return __inline_isfinited(__x) && __builtin_fabs(__x) >= 2.2250738585072014e-308; } inline __attribute__ ((__always_inline__)) int __inline_isnormall(long double __x) { return __inline_isfinitel(__x) && __builtin_fabsl(__x) >= 3.36210314311209350626e-4932L; } extern float acosf(float); extern double acos(double); extern long double acosl(long double); extern float asinf(float); extern double asin(double); extern long double asinl(long double); extern float atanf(float); extern double atan(double); extern long double atanl(long double); extern float atan2f(float, float); extern double atan2(double, double); extern long double atan2l(long double, long double); extern float cosf(float); extern double cos(double); extern long double cosl(long double); extern float sinf(float); extern double sin(double); extern long double sinl(long double); extern float tanf(float); extern double tan(double); extern long double tanl(long double); extern float acoshf(float); extern double acosh(double); extern long double acoshl(long double); extern float asinhf(float); extern double asinh(double); extern long double asinhl(long double); extern float atanhf(float); extern double atanh(double); extern long double atanhl(long double); extern float coshf(float); extern double cosh(double); extern long double coshl(long double); extern float sinhf(float); extern double sinh(double); extern long double sinhl(long double); extern float tanhf(float); extern double tanh(double); extern long double tanhl(long double); extern float expf(float); extern double exp(double); extern long double expl(long double); extern float exp2f(float); extern double exp2(double); extern long double exp2l(long double); extern float expm1f(float); extern double expm1(double); extern long double expm1l(long double); extern float logf(float); extern double log(double); extern long double logl(long double); extern float log10f(float); extern double log10(double); extern long double log10l(long double); extern float log2f(float); extern double log2(double); extern long double log2l(long double); extern float log1pf(float); extern double log1p(double); extern long double log1pl(long double); extern float logbf(float); extern double logb(double); extern long double logbl(long double); extern float modff(float, float *); extern double modf(double, double *); extern long double modfl(long double, long double *); extern float ldexpf(float, int); extern double ldexp(double, int); extern long double ldexpl(long double, int); extern float frexpf(float, int *); extern double frexp(double, int *); extern long double frexpl(long double, int *); extern int ilogbf(float); extern int ilogb(double); extern int ilogbl(long double); extern float scalbnf(float, int); extern double scalbn(double, int); extern long double scalbnl(long double, int); extern float scalblnf(float, long int); extern double scalbln(double, long int); extern long double scalblnl(long double, long int); extern float fabsf(float); extern double fabs(double); extern long double fabsl(long double); extern float cbrtf(float); extern double cbrt(double); extern long double cbrtl(long double); extern float hypotf(float, float); extern double hypot(double, double); extern long double hypotl(long double, long double); extern float powf(float, float); extern double pow(double, double); extern long double powl(long double, long double); extern float sqrtf(float); extern double sqrt(double); extern long double sqrtl(long double); extern float erff(float); extern double erf(double); extern long double erfl(long double); extern float erfcf(float); extern double erfc(double); extern long double erfcl(long double); extern float lgammaf(float); extern double lgamma(double); extern long double lgammal(long double); extern float tgammaf(float); extern double tgamma(double); extern long double tgammal(long double); extern float ceilf(float); extern double ceil(double); extern long double ceill(long double); extern float floorf(float); extern double floor(double); extern long double floorl(long double); extern float nearbyintf(float); extern double nearbyint(double); extern long double nearbyintl(long double); extern float rintf(float); extern double rint(double); extern long double rintl(long double); extern long int lrintf(float); extern long int lrint(double); extern long int lrintl(long double); extern float roundf(float); extern double round(double); extern long double roundl(long double); extern long int lroundf(float); extern long int lround(double); extern long int lroundl(long double); extern long long int llrintf(float); extern long long int llrint(double); extern long long int llrintl(long double); extern long long int llroundf(float); extern long long int llround(double); extern long long int llroundl(long double); extern float truncf(float); extern double trunc(double); extern long double truncl(long double); extern float fmodf(float, float); extern double fmod(double, double); extern long double fmodl(long double, long double); extern float remainderf(float, float); extern double remainder(double, double); extern long double remainderl(long double, long double); extern float remquof(float, float, int *); extern double remquo(double, double, int *); extern long double remquol(long double, long double, int *); extern float copysignf(float, float); extern double copysign(double, double); extern long double copysignl(long double, long double); extern float nanf(const char *); extern double nan(const char *); extern long double nanl(const char *); extern float nextafterf(float, float); extern double nextafter(double, double); extern long double nextafterl(long double, long double); extern double nexttoward(double, long double); extern float nexttowardf(float, long double); extern long double nexttowardl(long double, long double); extern float fdimf(float, float); extern double fdim(double, double); extern long double fdiml(long double, long double); extern float fmaxf(float, float); extern double fmax(double, double); extern long double fmaxl(long double, long double); extern float fminf(float, float); extern double fmin(double, double); extern long double fminl(long double, long double); extern float fmaf(float, float, float); extern double fma(double, double, double); extern long double fmal(long double, long double, long double); extern float __inff(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="use `(float)INFINITY` instead"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern double __inf(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="use `INFINITY` instead"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern long double __infl(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="use `(long double)INFINITY` instead"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern float __nan(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.14,message="use `NAN` instead"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern float __exp10f(float) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern double __exp10(double) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); inline __attribute__ ((__always_inline__)) void __sincosf(float __x, float *__sinp, float *__cosp); inline __attribute__ ((__always_inline__)) void __sincos(double __x, double *__sinp, double *__cosp); extern float __cospif(float) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern double __cospi(double) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern float __sinpif(float) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern double __sinpi(double) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern float __tanpif(float) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern double __tanpi(double) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); inline __attribute__ ((__always_inline__)) void __sincospif(float __x, float *__sinp, float *__cosp); inline __attribute__ ((__always_inline__)) void __sincospi(double __x, double *__sinp, double *__cosp); struct __float2 { float __sinval; float __cosval; }; struct __double2 { double __sinval; double __cosval; }; extern struct __float2 __sincosf_stret(float); extern struct __double2 __sincos_stret(double); extern struct __float2 __sincospif_stret(float); extern struct __double2 __sincospi_stret(double); inline __attribute__ ((__always_inline__)) void __sincosf(float __x, float *__sinp, float *__cosp) { const struct __float2 __stret = __sincosf_stret(__x); *__sinp = __stret.__sinval; *__cosp = __stret.__cosval; } inline __attribute__ ((__always_inline__)) void __sincos(double __x, double *__sinp, double *__cosp) { const struct __double2 __stret = __sincos_stret(__x); *__sinp = __stret.__sinval; *__cosp = __stret.__cosval; } inline __attribute__ ((__always_inline__)) void __sincospif(float __x, float *__sinp, float *__cosp) { const struct __float2 __stret = __sincospif_stret(__x); *__sinp = __stret.__sinval; *__cosp = __stret.__cosval; } inline __attribute__ ((__always_inline__)) void __sincospi(double __x, double *__sinp, double *__cosp) { const struct __double2 __stret = __sincospi_stret(__x); *__sinp = __stret.__sinval; *__cosp = __stret.__cosval; } extern double j0(double) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))); extern double j1(double) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))); extern double jn(int, double) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))); extern double y0(double) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))); extern double y1(double) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))); extern double yn(int, double) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))); extern double scalb(double, double); extern int signgam; extern long int rinttol(double) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,replacement="lrint"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern long int roundtol(double) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,replacement="lround"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern double drem(double, double) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,replacement="remainder"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern int finite(double) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use `isfinite((double)x)` instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern double gamma(double) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,replacement="tgamma"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern double significand(double) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use `2*frexp( )` or `scalbn(x, -ilogb(x))` instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); } typedef int jmp_buf[((9 * 2) + 3 + 16)]; typedef int sigjmp_buf[((9 * 2) + 3 + 16) + 1]; extern "C" { extern int setjmp(jmp_buf); extern void longjmp(jmp_buf, int) __attribute__((__noreturn__)); int _setjmp(jmp_buf); void _longjmp(jmp_buf, int) __attribute__((__noreturn__)); int sigsetjmp(sigjmp_buf, int); void siglongjmp(sigjmp_buf, int) __attribute__((__noreturn__)); void longjmperror(void); } extern const char *const sys_signame[32]; extern const char *const sys_siglist[32]; extern "C" { int raise(int); } extern "C" { void (* _Nullable bsd_signal(int, void (* _Nullable)(int)))(int); int kill(pid_t, int) __asm("_" "kill" ); int killpg(pid_t, int) __asm("_" "killpg" ); int pthread_kill(pthread_t, int); int pthread_sigmask(int, const sigset_t *, sigset_t *) __asm("_" "pthread_sigmask" ); int sigaction(int, const struct sigaction * , struct sigaction * ); int sigaddset(sigset_t *, int); int sigaltstack(const stack_t * , stack_t * ) __asm("_" "sigaltstack" ) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sighold(int); int sigignore(int); int siginterrupt(int, int); int sigismember(const sigset_t *, int); int sigpause(int) __asm("_" "sigpause" ); int sigpending(sigset_t *); int sigprocmask(int, const sigset_t * , sigset_t * ); int sigrelse(int); void (* _Nullable sigset(int, void (* _Nullable)(int)))(int); int sigsuspend(const sigset_t *) __asm("_" "sigsuspend" ); int sigwait(const sigset_t * , int * ) __asm("_" "sigwait" ); void psignal(unsigned int, const char *); int sigblock(int); int sigsetmask(int); int sigvec(int, struct sigvec *, struct sigvec *); } inline __attribute__ ((__always_inline__)) int __sigbits(int __signo) { return __signo > 32 ? 0 : (1 << (__signo - 1)); } typedef long int ptrdiff_t; extern "C" { void *memchr(const void *__s, int __c, size_t __n); int memcmp(const void *__s1, const void *__s2, size_t __n); void *memcpy(void *__dst, const void *__src, size_t __n); void *memmove(void *__dst, const void *__src, size_t __len); void *memset(void *__b, int __c, size_t __len); char *strcat(char *__s1, const char *__s2); char *strchr(const char *__s, int __c); int strcmp(const char *__s1, const char *__s2); int strcoll(const char *__s1, const char *__s2); char *strcpy(char *__dst, const char *__src); size_t strcspn(const char *__s, const char *__charset); char *strerror(int __errnum) __asm("_" "strerror" ); size_t strlen(const char *__s); char *strncat(char *__s1, const char *__s2, size_t __n); int strncmp(const char *__s1, const char *__s2, size_t __n); char *strncpy(char *__dst, const char *__src, size_t __n); char *strpbrk(const char *__s, const char *__charset); char *strrchr(const char *__s, int __c); size_t strspn(const char *__s, const char *__charset); char *strstr(const char *__big, const char *__little); char *strtok(char *__str, const char *__sep); size_t strxfrm(char *__s1, const char *__s2, size_t __n); } extern "C" { char *strtok_r(char *__str, const char *__sep, char **__lasts); } extern "C" { int strerror_r(int __errnum, char *__strerrbuf, size_t __buflen); char *strdup(const char *__s1); void *memccpy(void *__dst, const void *__src, int __c, size_t __n); } extern "C" { char *stpcpy(char *__dst, const char *__src); char *stpncpy(char *__dst, const char *__src, size_t __n) __attribute__((availability(macosx,introduced=10.7))); char *strndup(const char *__s1, size_t __n) __attribute__((availability(macosx,introduced=10.7))); size_t strnlen(const char *__s1, size_t __n) __attribute__((availability(macosx,introduced=10.7))); char *strsignal(int __sig); } extern "C" { errno_t memset_s(void *__s, rsize_t __smax, int __c, rsize_t __n) __attribute__((availability(macosx,introduced=10.9))); } extern "C" { void *memmem(const void *__big, size_t __big_len, const void *__little, size_t __little_len) __attribute__((availability(macosx,introduced=10.7))); void memset_pattern4(void *__b, const void *__pattern4, size_t __len) __attribute__((availability(macosx,introduced=10.5))); void memset_pattern8(void *__b, const void *__pattern8, size_t __len) __attribute__((availability(macosx,introduced=10.5))); void memset_pattern16(void *__b, const void *__pattern16, size_t __len) __attribute__((availability(macosx,introduced=10.5))); char *strcasestr(const char *__big, const char *__little); char *strnstr(const char *__big, const char *__little, size_t __len); size_t strlcat(char *__dst, const char *__source, size_t __size); size_t strlcpy(char *__dst, const char *__source, size_t __size); void strmode(int __mode, char *__bp); char *strsep(char **__stringp, const char *__delim); void swab(const void * , void * , ssize_t); __attribute__((availability(macosx,introduced=10.12.1))) __attribute__((availability(ios,introduced=10.1))) __attribute__((availability(tvos,introduced=10.0.1))) __attribute__((availability(watchos,introduced=3.1))) int timingsafe_bcmp(const void *__b1, const void *__b2, size_t __len); __attribute__((availability(macosx,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) int strsignal_r(int __sig, char *__strsignalbuf, size_t __buflen); } extern "C" { int bcmp(const void *, const void *, size_t) ; void bcopy(const void *, void *, size_t) ; void bzero(void *, size_t) ; char *index(const char *, int) ; char *rindex(const char *, int) ; int ffs(int); int strcasecmp(const char *, const char *); int strncasecmp(const char *, const char *, size_t); } extern "C" { int ffsl(long) __attribute__((availability(macosx,introduced=10.5))); int ffsll(long long) __attribute__((availability(macosx,introduced=10.9))); int fls(int) __attribute__((availability(macosx,introduced=10.5))); int flsl(long) __attribute__((availability(macosx,introduced=10.5))); int flsll(long long) __attribute__((availability(macosx,introduced=10.9))); } struct timespec { __darwin_time_t tv_sec; long tv_nsec; }; struct tm { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst; long tm_gmtoff; char *tm_zone; }; extern char *tzname[]; extern int getdate_err; extern long timezone __asm("_" "timezone" ); extern int daylight; extern "C" { char *asctime(const struct tm *); clock_t clock(void) __asm("_" "clock" ); char *ctime(const time_t *); double difftime(time_t, time_t); struct tm *getdate(const char *); struct tm *gmtime(const time_t *); struct tm *localtime(const time_t *); time_t mktime(struct tm *) __asm("_" "mktime" ); size_t strftime(char * , size_t, const char * , const struct tm * ) __asm("_" "strftime" ); char *strptime(const char * , const char * , struct tm * ) __asm("_" "strptime" ); time_t time(time_t *); void tzset(void); char *asctime_r(const struct tm * , char * ); char *ctime_r(const time_t *, char *); struct tm *gmtime_r(const time_t * , struct tm * ); struct tm *localtime_r(const time_t * , struct tm * ); time_t posix2time(time_t); void tzsetwall(void); time_t time2posix(time_t); time_t timelocal(struct tm * const); time_t timegm(struct tm * const); int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __asm("_" "nanosleep" ); typedef enum { _CLOCK_REALTIME __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 0, _CLOCK_MONOTONIC __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 6, _CLOCK_MONOTONIC_RAW __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 4, _CLOCK_MONOTONIC_RAW_APPROX __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 5, _CLOCK_UPTIME_RAW __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 8, _CLOCK_UPTIME_RAW_APPROX __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 9, _CLOCK_PROCESS_CPUTIME_ID __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 12, _CLOCK_THREAD_CPUTIME_ID __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 16 } clockid_t; __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) int clock_getres(clockid_t __clock_id, struct timespec *__res); __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) int clock_gettime(clockid_t __clock_id, struct timespec *__tp); __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __uint64_t clock_gettime_nsec_np(clockid_t __clock_id); __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) int clock_settime(clockid_t __clock_id, const struct timespec *__tp); __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) int timespec_get(struct timespec *ts, int base); } extern "C" { extern "C" void *_Block_copy(const void *aBlock) __attribute__((availability(macosx,introduced=10.6))); extern "C" void _Block_release(const void *aBlock) __attribute__((availability(macosx,introduced=10.6))); extern "C" void _Block_object_assign(void *, const void *, const int) __attribute__((availability(macosx,introduced=10.6))); extern "C" void _Block_object_dispose(const void *, const int) __attribute__((availability(macosx,introduced=10.6))); extern "C" void * _NSConcreteGlobalBlock[32] __attribute__((availability(macosx,introduced=10.6))); extern "C" void * _NSConcreteStackBlock[32] __attribute__((availability(macosx,introduced=10.6))); } extern "C" { #pragma pack(push, 2) typedef unsigned char UInt8; typedef signed char SInt8; typedef unsigned short UInt16; typedef signed short SInt16; typedef unsigned int UInt32; typedef signed int SInt32; struct wide { UInt32 lo; SInt32 hi; }; typedef struct wide wide; struct UnsignedWide { UInt32 lo; UInt32 hi; }; typedef struct UnsignedWide UnsignedWide; typedef signed long long SInt64; typedef unsigned long long UInt64; typedef SInt32 Fixed; typedef Fixed * FixedPtr; typedef SInt32 Fract; typedef Fract * FractPtr; typedef UInt32 UnsignedFixed; typedef UnsignedFixed * UnsignedFixedPtr; typedef short ShortFixed; typedef ShortFixed * ShortFixedPtr; typedef float Float32; typedef double Float64; struct Float80 { SInt16 exp; UInt16 man[4]; }; typedef struct Float80 Float80; struct Float96 { SInt16 exp[2]; UInt16 man[4]; }; typedef struct Float96 Float96; struct Float32Point { Float32 x; Float32 y; }; typedef struct Float32Point Float32Point; typedef char * Ptr; typedef Ptr * Handle; typedef long Size; typedef SInt16 OSErr; typedef SInt32 OSStatus; typedef void * LogicalAddress; typedef const void * ConstLogicalAddress; typedef void * PhysicalAddress; typedef UInt8 * BytePtr; typedef unsigned long ByteCount; typedef unsigned long ByteOffset; typedef SInt32 Duration; typedef UnsignedWide AbsoluteTime; typedef UInt32 OptionBits; typedef unsigned long ItemCount; typedef UInt32 PBVersion; typedef SInt16 ScriptCode; typedef SInt16 LangCode; typedef SInt16 RegionCode; typedef UInt32 FourCharCode; typedef FourCharCode OSType; typedef FourCharCode ResType; typedef OSType * OSTypePtr; typedef ResType * ResTypePtr; typedef unsigned char Boolean; typedef long ( * ProcPtr)(void); typedef void ( * Register68kProcPtr)(void); typedef ProcPtr UniversalProcPtr; typedef ProcPtr * ProcHandle; typedef UniversalProcPtr * UniversalProcHandle; typedef void * PRefCon; typedef void * URefCon; typedef void * SRefCon; enum { noErr = 0 }; enum { kNilOptions = 0 }; enum { kVariableLengthArray __attribute__((deprecated)) = 1 }; enum { kUnknownType = 0x3F3F3F3F }; typedef UInt32 UnicodeScalarValue; typedef UInt32 UTF32Char; typedef UInt16 UniChar; typedef UInt16 UTF16Char; typedef UInt8 UTF8Char; typedef UniChar * UniCharPtr; typedef unsigned long UniCharCount; typedef UniCharCount * UniCharCountPtr; typedef unsigned char Str255[256]; typedef unsigned char Str63[64]; typedef unsigned char Str32[33]; typedef unsigned char Str31[32]; typedef unsigned char Str27[28]; typedef unsigned char Str15[16]; typedef unsigned char Str32Field[34]; typedef Str63 StrFileName; typedef unsigned char * StringPtr; typedef StringPtr * StringHandle; typedef const unsigned char * ConstStringPtr; typedef const unsigned char * ConstStr255Param; typedef const unsigned char * ConstStr63Param; typedef const unsigned char * ConstStr32Param; typedef const unsigned char * ConstStr31Param; typedef const unsigned char * ConstStr27Param; typedef const unsigned char * ConstStr15Param; typedef ConstStr63Param ConstStrFileNameParam; inline unsigned char StrLength(ConstStr255Param string) { return (*string); } struct ProcessSerialNumber { UInt32 highLongOfPSN; UInt32 lowLongOfPSN; }; typedef struct ProcessSerialNumber ProcessSerialNumber; typedef ProcessSerialNumber * ProcessSerialNumberPtr; struct Point { short v; short h; }; typedef struct Point Point; typedef Point * PointPtr; struct Rect { short top; short left; short bottom; short right; }; typedef struct Rect Rect; typedef Rect * RectPtr; struct FixedPoint { Fixed x; Fixed y; }; typedef struct FixedPoint FixedPoint; struct FixedRect { Fixed left; Fixed top; Fixed right; Fixed bottom; }; typedef struct FixedRect FixedRect; typedef short CharParameter; enum { normal = 0, bold = 1, italic = 2, underline = 4, outline = 8, shadow = 0x10, condense = 0x20, extend = 0x40 }; typedef unsigned char Style; typedef short StyleParameter; typedef Style StyleField; typedef SInt32 TimeValue; typedef SInt32 TimeScale; typedef wide CompTimeValue; typedef SInt64 TimeValue64; typedef struct TimeBaseRecord* TimeBase; struct TimeRecord { CompTimeValue value; TimeScale scale; TimeBase base; }; typedef struct TimeRecord TimeRecord; struct NumVersion { UInt8 nonRelRev; UInt8 stage; UInt8 minorAndBugRev; UInt8 majorRev; }; typedef struct NumVersion NumVersion; enum { developStage = 0x20, alphaStage = 0x40, betaStage = 0x60, finalStage = 0x80 }; union NumVersionVariant { NumVersion parts; UInt32 whole; }; typedef union NumVersionVariant NumVersionVariant; typedef NumVersionVariant * NumVersionVariantPtr; typedef NumVersionVariantPtr * NumVersionVariantHandle; struct VersRec { NumVersion numericVersion; short countryCode; Str255 shortVersion; Str255 reserved; }; typedef struct VersRec VersRec; typedef VersRec * VersRecPtr; typedef VersRecPtr * VersRecHndl; typedef UInt8 Byte; typedef SInt8 SignedByte; typedef wide * WidePtr; typedef UnsignedWide * UnsignedWidePtr; typedef Float80 extended80; typedef Float96 extended96; typedef SInt8 VHSelect; extern void Debugger(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DebugStr(ConstStr255Param debuggerMsg) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SysBreak(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SysBreakStr(ConstStr255Param debuggerMsg) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SysBreakFunc(ConstStr255Param debuggerMsg) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); #pragma pack(pop) } extern "C" { // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSAttributedString; #ifndef _REWRITER_typedef_NSAttributedString #define _REWRITER_typedef_NSAttributedString typedef struct objc_object NSAttributedString; typedef struct {} _objc_exc_NSAttributedString; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSNull; #ifndef _REWRITER_typedef_NSNull #define _REWRITER_typedef_NSNull typedef struct objc_object NSNull; typedef struct {} _objc_exc_NSNull; #endif // @class NSCharacterSet; #ifndef _REWRITER_typedef_NSCharacterSet #define _REWRITER_typedef_NSCharacterSet typedef struct objc_object NSCharacterSet; typedef struct {} _objc_exc_NSCharacterSet; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @class NSDate; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif // @class NSTimeZone; #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @class NSLocale; #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif // @class NSNumber; #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif // @class NSSet; #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif extern double kCFCoreFoundationVersionNumber; typedef unsigned long CFTypeID; typedef unsigned long CFOptionFlags; typedef unsigned long CFHashCode; typedef signed long CFIndex; typedef const __attribute__((objc_bridge(id))) void * CFTypeRef; typedef const struct __attribute__((objc_bridge(NSString))) __CFString * CFStringRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableString))) __CFString * CFMutableStringRef; typedef __attribute__((objc_bridge(id))) CFTypeRef CFPropertyListRef; typedef CFIndex CFComparisonResult; enum { kCFCompareLessThan = -1L, kCFCompareEqualTo = 0, kCFCompareGreaterThan = 1 }; typedef CFComparisonResult (*CFComparatorFunction)(const void *val1, const void *val2, void *context); static const CFIndex kCFNotFound = -1; typedef struct { CFIndex location; CFIndex length; } CFRange; static __inline__ __attribute__((always_inline)) CFRange CFRangeMake(CFIndex loc, CFIndex len) { CFRange range; range.location = loc; range.length = len; return range; } extern CFRange __CFRangeMake(CFIndex loc, CFIndex len); typedef const struct __attribute__((objc_bridge(NSNull))) __CFNull * CFNullRef; extern CFTypeID CFNullGetTypeID(void); extern const CFNullRef kCFNull; typedef const struct __attribute__((objc_bridge(id))) __CFAllocator * CFAllocatorRef; extern const CFAllocatorRef kCFAllocatorDefault; extern const CFAllocatorRef kCFAllocatorSystemDefault; extern const CFAllocatorRef kCFAllocatorMalloc; extern const CFAllocatorRef kCFAllocatorMallocZone; extern const CFAllocatorRef kCFAllocatorNull; extern const CFAllocatorRef kCFAllocatorUseContext; typedef const void * (*CFAllocatorRetainCallBack)(const void *info); typedef void (*CFAllocatorReleaseCallBack)(const void *info); typedef CFStringRef (*CFAllocatorCopyDescriptionCallBack)(const void *info); typedef void * (*CFAllocatorAllocateCallBack)(CFIndex allocSize, CFOptionFlags hint, void *info); typedef void * (*CFAllocatorReallocateCallBack)(void *ptr, CFIndex newsize, CFOptionFlags hint, void *info); typedef void (*CFAllocatorDeallocateCallBack)(void *ptr, void *info); typedef CFIndex (*CFAllocatorPreferredSizeCallBack)(CFIndex size, CFOptionFlags hint, void *info); typedef struct { CFIndex version; void * info; CFAllocatorRetainCallBack retain; CFAllocatorReleaseCallBack release; CFAllocatorCopyDescriptionCallBack copyDescription; CFAllocatorAllocateCallBack allocate; CFAllocatorReallocateCallBack reallocate; CFAllocatorDeallocateCallBack deallocate; CFAllocatorPreferredSizeCallBack preferredSize; } CFAllocatorContext; extern CFTypeID CFAllocatorGetTypeID(void); extern void CFAllocatorSetDefault(CFAllocatorRef allocator); extern CFAllocatorRef CFAllocatorGetDefault(void); extern CFAllocatorRef CFAllocatorCreate(CFAllocatorRef allocator, CFAllocatorContext *context); extern void *CFAllocatorAllocate(CFAllocatorRef allocator, CFIndex size, CFOptionFlags hint); extern void *CFAllocatorReallocate(CFAllocatorRef allocator, void *ptr, CFIndex newsize, CFOptionFlags hint); extern void CFAllocatorDeallocate(CFAllocatorRef allocator, void *ptr); extern CFIndex CFAllocatorGetPreferredSizeForSize(CFAllocatorRef allocator, CFIndex size, CFOptionFlags hint); extern void CFAllocatorGetContext(CFAllocatorRef allocator, CFAllocatorContext *context); extern CFTypeID CFGetTypeID(CFTypeRef cf); extern CFStringRef CFCopyTypeIDDescription(CFTypeID type_id); extern CFTypeRef CFRetain(CFTypeRef cf); extern void CFRelease(CFTypeRef cf); extern CFTypeRef CFAutorelease(CFTypeRef __attribute__((cf_consumed)) arg) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFIndex CFGetRetainCount(CFTypeRef cf); extern Boolean CFEqual(CFTypeRef cf1, CFTypeRef cf2); extern CFHashCode CFHash(CFTypeRef cf); extern CFStringRef CFCopyDescription(CFTypeRef cf); extern CFAllocatorRef CFGetAllocator(CFTypeRef cf); extern CFTypeRef CFMakeCollectable(CFTypeRef cf) ; typedef enum { ptrauth_key_asia = 0, ptrauth_key_asib = 1, ptrauth_key_asda = 2, ptrauth_key_asdb = 3, ptrauth_key_process_independent_code = ptrauth_key_asia, ptrauth_key_process_dependent_code = ptrauth_key_asib, ptrauth_key_process_independent_data = ptrauth_key_asda, ptrauth_key_process_dependent_data = ptrauth_key_asdb, ptrauth_key_function_pointer = ptrauth_key_process_independent_code, ptrauth_key_return_address = ptrauth_key_process_dependent_code, ptrauth_key_frame_pointer = ptrauth_key_process_dependent_data, ptrauth_key_block_function = ptrauth_key_asia, ptrauth_key_cxx_vtable_pointer = ptrauth_key_asda, ptrauth_key_method_list_pointer = ptrauth_key_asda, ptrauth_key_objc_isa_pointer = ptrauth_key_process_independent_data, ptrauth_key_objc_super_pointer = ptrauth_key_process_independent_data, ptrauth_key_block_descriptor_pointer = ptrauth_key_asda, } ptrauth_key; typedef long unsigned int ptrauth_extra_data_t; typedef long unsigned int ptrauth_generic_signature_t; } extern "C" { typedef const void * (*CFArrayRetainCallBack)(CFAllocatorRef allocator, const void *value); typedef void (*CFArrayReleaseCallBack)(CFAllocatorRef allocator, const void *value); typedef CFStringRef (*CFArrayCopyDescriptionCallBack)(const void *value); typedef Boolean (*CFArrayEqualCallBack)(const void *value1, const void *value2); typedef struct { CFIndex version; CFArrayRetainCallBack retain; CFArrayReleaseCallBack release; CFArrayCopyDescriptionCallBack copyDescription; CFArrayEqualCallBack equal; } CFArrayCallBacks; extern const CFArrayCallBacks kCFTypeArrayCallBacks; typedef void (*CFArrayApplierFunction)(const void *value, void *context); typedef const struct __attribute__((objc_bridge(NSArray))) __CFArray * CFArrayRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableArray))) __CFArray * CFMutableArrayRef; extern CFTypeID CFArrayGetTypeID(void); extern CFArrayRef CFArrayCreate(CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFArrayCallBacks *callBacks); extern CFArrayRef CFArrayCreateCopy(CFAllocatorRef allocator, CFArrayRef theArray); extern CFMutableArrayRef CFArrayCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFArrayCallBacks *callBacks); extern CFMutableArrayRef CFArrayCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFArrayRef theArray); extern CFIndex CFArrayGetCount(CFArrayRef theArray); extern CFIndex CFArrayGetCountOfValue(CFArrayRef theArray, CFRange range, const void *value); extern Boolean CFArrayContainsValue(CFArrayRef theArray, CFRange range, const void *value); extern const void *CFArrayGetValueAtIndex(CFArrayRef theArray, CFIndex idx); extern void CFArrayGetValues(CFArrayRef theArray, CFRange range, const void **values); extern void CFArrayApplyFunction(CFArrayRef theArray, CFRange range, CFArrayApplierFunction __attribute__((noescape)) applier, void *context); extern CFIndex CFArrayGetFirstIndexOfValue(CFArrayRef theArray, CFRange range, const void *value); extern CFIndex CFArrayGetLastIndexOfValue(CFArrayRef theArray, CFRange range, const void *value); extern CFIndex CFArrayBSearchValues(CFArrayRef theArray, CFRange range, const void *value, CFComparatorFunction comparator, void *context); extern void CFArrayAppendValue(CFMutableArrayRef theArray, const void *value); extern void CFArrayInsertValueAtIndex(CFMutableArrayRef theArray, CFIndex idx, const void *value); extern void CFArraySetValueAtIndex(CFMutableArrayRef theArray, CFIndex idx, const void *value); extern void CFArrayRemoveValueAtIndex(CFMutableArrayRef theArray, CFIndex idx); extern void CFArrayRemoveAllValues(CFMutableArrayRef theArray); extern void CFArrayReplaceValues(CFMutableArrayRef theArray, CFRange range, const void **newValues, CFIndex newCount); extern void CFArrayExchangeValuesAtIndices(CFMutableArrayRef theArray, CFIndex idx1, CFIndex idx2); extern void CFArraySortValues(CFMutableArrayRef theArray, CFRange range, CFComparatorFunction comparator, void *context); extern void CFArrayAppendArray(CFMutableArrayRef theArray, CFArrayRef otherArray, CFRange otherRange); } extern "C" { typedef const void * (*CFBagRetainCallBack)(CFAllocatorRef allocator, const void *value); typedef void (*CFBagReleaseCallBack)(CFAllocatorRef allocator, const void *value); typedef CFStringRef (*CFBagCopyDescriptionCallBack)(const void *value); typedef Boolean (*CFBagEqualCallBack)(const void *value1, const void *value2); typedef CFHashCode (*CFBagHashCallBack)(const void *value); typedef struct { CFIndex version; CFBagRetainCallBack retain; CFBagReleaseCallBack release; CFBagCopyDescriptionCallBack copyDescription; CFBagEqualCallBack equal; CFBagHashCallBack hash; } CFBagCallBacks; extern const CFBagCallBacks kCFTypeBagCallBacks; extern const CFBagCallBacks kCFCopyStringBagCallBacks; typedef void (*CFBagApplierFunction)(const void *value, void *context); typedef const struct __attribute__((objc_bridge(id))) __CFBag * CFBagRef; typedef struct __attribute__((objc_bridge_mutable(id))) __CFBag * CFMutableBagRef; extern CFTypeID CFBagGetTypeID(void); extern CFBagRef CFBagCreate(CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFBagCallBacks *callBacks); extern CFBagRef CFBagCreateCopy(CFAllocatorRef allocator, CFBagRef theBag); extern CFMutableBagRef CFBagCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFBagCallBacks *callBacks); extern CFMutableBagRef CFBagCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFBagRef theBag); extern CFIndex CFBagGetCount(CFBagRef theBag); extern CFIndex CFBagGetCountOfValue(CFBagRef theBag, const void *value); extern Boolean CFBagContainsValue(CFBagRef theBag, const void *value); extern const void *CFBagGetValue(CFBagRef theBag, const void *value); extern Boolean CFBagGetValueIfPresent(CFBagRef theBag, const void *candidate, const void **value); extern void CFBagGetValues(CFBagRef theBag, const void **values); extern void CFBagApplyFunction(CFBagRef theBag, CFBagApplierFunction __attribute__((noescape)) applier, void *context); extern void CFBagAddValue(CFMutableBagRef theBag, const void *value); extern void CFBagReplaceValue(CFMutableBagRef theBag, const void *value); extern void CFBagSetValue(CFMutableBagRef theBag, const void *value); extern void CFBagRemoveValue(CFMutableBagRef theBag, const void *value); extern void CFBagRemoveAllValues(CFMutableBagRef theBag); } extern "C" { typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); } CFBinaryHeapCompareContext; typedef struct { CFIndex version; const void *(*retain)(CFAllocatorRef allocator, const void *ptr); void (*release)(CFAllocatorRef allocator, const void *ptr); CFStringRef (*copyDescription)(const void *ptr); CFComparisonResult (*compare)(const void *ptr1, const void *ptr2, void *context); } CFBinaryHeapCallBacks; extern const CFBinaryHeapCallBacks kCFStringBinaryHeapCallBacks; typedef void (*CFBinaryHeapApplierFunction)(const void *val, void *context); typedef struct __attribute__((objc_bridge_mutable(id))) __CFBinaryHeap * CFBinaryHeapRef; extern CFTypeID CFBinaryHeapGetTypeID(void); extern CFBinaryHeapRef CFBinaryHeapCreate(CFAllocatorRef allocator, CFIndex capacity, const CFBinaryHeapCallBacks *callBacks, const CFBinaryHeapCompareContext *compareContext); extern CFBinaryHeapRef CFBinaryHeapCreateCopy(CFAllocatorRef allocator, CFIndex capacity, CFBinaryHeapRef heap); extern CFIndex CFBinaryHeapGetCount(CFBinaryHeapRef heap); extern CFIndex CFBinaryHeapGetCountOfValue(CFBinaryHeapRef heap, const void *value); extern Boolean CFBinaryHeapContainsValue(CFBinaryHeapRef heap, const void *value); extern const void * CFBinaryHeapGetMinimum(CFBinaryHeapRef heap); extern Boolean CFBinaryHeapGetMinimumIfPresent(CFBinaryHeapRef heap, const void **value); extern void CFBinaryHeapGetValues(CFBinaryHeapRef heap, const void **values); extern void CFBinaryHeapApplyFunction(CFBinaryHeapRef heap, CFBinaryHeapApplierFunction __attribute__((noescape)) applier, void *context); extern void CFBinaryHeapAddValue(CFBinaryHeapRef heap, const void *value); extern void CFBinaryHeapRemoveMinimumValue(CFBinaryHeapRef heap); extern void CFBinaryHeapRemoveAllValues(CFBinaryHeapRef heap); } extern "C" { typedef UInt32 CFBit; typedef const struct __attribute__((objc_bridge(id))) __CFBitVector * CFBitVectorRef; typedef struct __attribute__((objc_bridge_mutable(id))) __CFBitVector * CFMutableBitVectorRef; extern CFTypeID CFBitVectorGetTypeID(void); extern CFBitVectorRef CFBitVectorCreate(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex numBits); extern CFBitVectorRef CFBitVectorCreateCopy(CFAllocatorRef allocator, CFBitVectorRef bv); extern CFMutableBitVectorRef CFBitVectorCreateMutable(CFAllocatorRef allocator, CFIndex capacity); extern CFMutableBitVectorRef CFBitVectorCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFBitVectorRef bv); extern CFIndex CFBitVectorGetCount(CFBitVectorRef bv); extern CFIndex CFBitVectorGetCountOfBit(CFBitVectorRef bv, CFRange range, CFBit value); extern Boolean CFBitVectorContainsBit(CFBitVectorRef bv, CFRange range, CFBit value); extern CFBit CFBitVectorGetBitAtIndex(CFBitVectorRef bv, CFIndex idx); extern void CFBitVectorGetBits(CFBitVectorRef bv, CFRange range, UInt8 *bytes); extern CFIndex CFBitVectorGetFirstIndexOfBit(CFBitVectorRef bv, CFRange range, CFBit value); extern CFIndex CFBitVectorGetLastIndexOfBit(CFBitVectorRef bv, CFRange range, CFBit value); extern void CFBitVectorSetCount(CFMutableBitVectorRef bv, CFIndex count); extern void CFBitVectorFlipBitAtIndex(CFMutableBitVectorRef bv, CFIndex idx); extern void CFBitVectorFlipBits(CFMutableBitVectorRef bv, CFRange range); extern void CFBitVectorSetBitAtIndex(CFMutableBitVectorRef bv, CFIndex idx, CFBit value); extern void CFBitVectorSetBits(CFMutableBitVectorRef bv, CFRange range, CFBit value); extern void CFBitVectorSetAllBits(CFMutableBitVectorRef bv, CFBit value); } static __inline__ uint16_t OSReadSwapInt16( const volatile void * base, uintptr_t byteOffset ) { uint16_t result; result = *(volatile uint16_t *)((uintptr_t)base + byteOffset); return _OSSwapInt16(result); } static __inline__ uint32_t OSReadSwapInt32( const volatile void * base, uintptr_t byteOffset ) { uint32_t result; result = *(volatile uint32_t *)((uintptr_t)base + byteOffset); return _OSSwapInt32(result); } static __inline__ uint64_t OSReadSwapInt64( const volatile void * base, uintptr_t byteOffset ) { uint64_t result; result = *(volatile uint64_t *)((uintptr_t)base + byteOffset); return _OSSwapInt64(result); } static __inline__ void OSWriteSwapInt16( volatile void * base, uintptr_t byteOffset, uint16_t data ) { *(volatile uint16_t *)((uintptr_t)base + byteOffset) = _OSSwapInt16(data); } static __inline__ void OSWriteSwapInt32( volatile void * base, uintptr_t byteOffset, uint32_t data ) { *(volatile uint32_t *)((uintptr_t)base + byteOffset) = _OSSwapInt32(data); } static __inline__ void OSWriteSwapInt64( volatile void * base, uintptr_t byteOffset, uint64_t data ) { *(volatile uint64_t *)((uintptr_t)base + byteOffset) = _OSSwapInt64(data); } enum { OSUnknownByteOrder, OSLittleEndian, OSBigEndian }; static inline int32_t OSHostByteOrder(void) { return OSLittleEndian; } static inline uint16_t _OSReadInt16( const volatile void * base, uintptr_t byteOffset ) { return *(volatile uint16_t *)((uintptr_t)base + byteOffset); } static inline uint32_t _OSReadInt32( const volatile void * base, uintptr_t byteOffset ) { return *(volatile uint32_t *)((uintptr_t)base + byteOffset); } static inline uint64_t _OSReadInt64( const volatile void * base, uintptr_t byteOffset ) { return *(volatile uint64_t *)((uintptr_t)base + byteOffset); } static inline void _OSWriteInt16( volatile void * base, uintptr_t byteOffset, uint16_t data ) { *(volatile uint16_t *)((uintptr_t)base + byteOffset) = data; } static inline void _OSWriteInt32( volatile void * base, uintptr_t byteOffset, uint32_t data ) { *(volatile uint32_t *)((uintptr_t)base + byteOffset) = data; } static inline void _OSWriteInt64( volatile void * base, uintptr_t byteOffset, uint64_t data ) { *(volatile uint64_t *)((uintptr_t)base + byteOffset) = data; } extern "C" { enum __CFByteOrder { CFByteOrderUnknown, CFByteOrderLittleEndian, CFByteOrderBigEndian }; typedef CFIndex CFByteOrder; static __inline__ __attribute__((always_inline)) CFByteOrder CFByteOrderGetCurrent(void) { int32_t byteOrder = OSHostByteOrder(); switch (byteOrder) { case OSLittleEndian: return CFByteOrderLittleEndian; case OSBigEndian: return CFByteOrderBigEndian; default: break; } return CFByteOrderUnknown; } static __inline__ __attribute__((always_inline)) uint16_t CFSwapInt16(uint16_t arg) { return ((__uint16_t)(__builtin_constant_p(arg) ? ((__uint16_t)((((__uint16_t)(arg) & 0xff00U) >> 8) | (((__uint16_t)(arg) & 0x00ffU) << 8))) : _OSSwapInt16(arg))); } static __inline__ __attribute__((always_inline)) uint32_t CFSwapInt32(uint32_t arg) { return (__builtin_constant_p(arg) ? ((__uint32_t)((((__uint32_t)(arg) & 0xff000000U) >> 24) | (((__uint32_t)(arg) & 0x00ff0000U) >> 8) | (((__uint32_t)(arg) & 0x0000ff00U) << 8) | (((__uint32_t)(arg) & 0x000000ffU) << 24))) : _OSSwapInt32(arg)); } static __inline__ __attribute__((always_inline)) uint64_t CFSwapInt64(uint64_t arg) { return (__builtin_constant_p(arg) ? ((__uint64_t)((((__uint64_t)(arg) & 0xff00000000000000ULL) >> 56) | (((__uint64_t)(arg) & 0x00ff000000000000ULL) >> 40) | (((__uint64_t)(arg) & 0x0000ff0000000000ULL) >> 24) | (((__uint64_t)(arg) & 0x000000ff00000000ULL) >> 8) | (((__uint64_t)(arg) & 0x00000000ff000000ULL) << 8) | (((__uint64_t)(arg) & 0x0000000000ff0000ULL) << 24) | (((__uint64_t)(arg) & 0x000000000000ff00ULL) << 40) | (((__uint64_t)(arg) & 0x00000000000000ffULL) << 56))) : _OSSwapInt64(arg)); } static __inline__ __attribute__((always_inline)) uint16_t CFSwapInt16BigToHost(uint16_t arg) { return ((__uint16_t)(__builtin_constant_p(arg) ? ((__uint16_t)((((__uint16_t)(arg) & 0xff00U) >> 8) | (((__uint16_t)(arg) & 0x00ffU) << 8))) : _OSSwapInt16(arg))); } static __inline__ __attribute__((always_inline)) uint32_t CFSwapInt32BigToHost(uint32_t arg) { return (__builtin_constant_p(arg) ? ((__uint32_t)((((__uint32_t)(arg) & 0xff000000U) >> 24) | (((__uint32_t)(arg) & 0x00ff0000U) >> 8) | (((__uint32_t)(arg) & 0x0000ff00U) << 8) | (((__uint32_t)(arg) & 0x000000ffU) << 24))) : _OSSwapInt32(arg)); } static __inline__ __attribute__((always_inline)) uint64_t CFSwapInt64BigToHost(uint64_t arg) { return (__builtin_constant_p(arg) ? ((__uint64_t)((((__uint64_t)(arg) & 0xff00000000000000ULL) >> 56) | (((__uint64_t)(arg) & 0x00ff000000000000ULL) >> 40) | (((__uint64_t)(arg) & 0x0000ff0000000000ULL) >> 24) | (((__uint64_t)(arg) & 0x000000ff00000000ULL) >> 8) | (((__uint64_t)(arg) & 0x00000000ff000000ULL) << 8) | (((__uint64_t)(arg) & 0x0000000000ff0000ULL) << 24) | (((__uint64_t)(arg) & 0x000000000000ff00ULL) << 40) | (((__uint64_t)(arg) & 0x00000000000000ffULL) << 56))) : _OSSwapInt64(arg)); } static __inline__ __attribute__((always_inline)) uint16_t CFSwapInt16HostToBig(uint16_t arg) { return ((__uint16_t)(__builtin_constant_p(arg) ? ((__uint16_t)((((__uint16_t)(arg) & 0xff00U) >> 8) | (((__uint16_t)(arg) & 0x00ffU) << 8))) : _OSSwapInt16(arg))); } static __inline__ __attribute__((always_inline)) uint32_t CFSwapInt32HostToBig(uint32_t arg) { return (__builtin_constant_p(arg) ? ((__uint32_t)((((__uint32_t)(arg) & 0xff000000U) >> 24) | (((__uint32_t)(arg) & 0x00ff0000U) >> 8) | (((__uint32_t)(arg) & 0x0000ff00U) << 8) | (((__uint32_t)(arg) & 0x000000ffU) << 24))) : _OSSwapInt32(arg)); } static __inline__ __attribute__((always_inline)) uint64_t CFSwapInt64HostToBig(uint64_t arg) { return (__builtin_constant_p(arg) ? ((__uint64_t)((((__uint64_t)(arg) & 0xff00000000000000ULL) >> 56) | (((__uint64_t)(arg) & 0x00ff000000000000ULL) >> 40) | (((__uint64_t)(arg) & 0x0000ff0000000000ULL) >> 24) | (((__uint64_t)(arg) & 0x000000ff00000000ULL) >> 8) | (((__uint64_t)(arg) & 0x00000000ff000000ULL) << 8) | (((__uint64_t)(arg) & 0x0000000000ff0000ULL) << 24) | (((__uint64_t)(arg) & 0x000000000000ff00ULL) << 40) | (((__uint64_t)(arg) & 0x00000000000000ffULL) << 56))) : _OSSwapInt64(arg)); } static __inline__ __attribute__((always_inline)) uint16_t CFSwapInt16LittleToHost(uint16_t arg) { return ((uint16_t)(arg)); } static __inline__ __attribute__((always_inline)) uint32_t CFSwapInt32LittleToHost(uint32_t arg) { return ((uint32_t)(arg)); } static __inline__ __attribute__((always_inline)) uint64_t CFSwapInt64LittleToHost(uint64_t arg) { return ((uint64_t)(arg)); } static __inline__ __attribute__((always_inline)) uint16_t CFSwapInt16HostToLittle(uint16_t arg) { return ((uint16_t)(arg)); } static __inline__ __attribute__((always_inline)) uint32_t CFSwapInt32HostToLittle(uint32_t arg) { return ((uint32_t)(arg)); } static __inline__ __attribute__((always_inline)) uint64_t CFSwapInt64HostToLittle(uint64_t arg) { return ((uint64_t)(arg)); } typedef struct {uint32_t v;} CFSwappedFloat32; typedef struct {uint64_t v;} CFSwappedFloat64; static __inline__ __attribute__((always_inline)) CFSwappedFloat32 CFConvertFloat32HostToSwapped(Float32 arg) { union CFSwap { Float32 v; CFSwappedFloat32 sv; } result; result.v = arg; result.sv.v = CFSwapInt32(result.sv.v); return result.sv; } static __inline__ __attribute__((always_inline)) Float32 CFConvertFloat32SwappedToHost(CFSwappedFloat32 arg) { union CFSwap { Float32 v; CFSwappedFloat32 sv; } result; result.sv = arg; result.sv.v = CFSwapInt32(result.sv.v); return result.v; } static __inline__ __attribute__((always_inline)) CFSwappedFloat64 CFConvertFloat64HostToSwapped(Float64 arg) { union CFSwap { Float64 v; CFSwappedFloat64 sv; } result; result.v = arg; result.sv.v = CFSwapInt64(result.sv.v); return result.sv; } static __inline__ __attribute__((always_inline)) Float64 CFConvertFloat64SwappedToHost(CFSwappedFloat64 arg) { union CFSwap { Float64 v; CFSwappedFloat64 sv; } result; result.sv = arg; result.sv.v = CFSwapInt64(result.sv.v); return result.v; } static __inline__ __attribute__((always_inline)) CFSwappedFloat32 CFConvertFloatHostToSwapped(float arg) { union CFSwap { float v; CFSwappedFloat32 sv; } result; result.v = arg; result.sv.v = CFSwapInt32(result.sv.v); return result.sv; } static __inline__ __attribute__((always_inline)) float CFConvertFloatSwappedToHost(CFSwappedFloat32 arg) { union CFSwap { float v; CFSwappedFloat32 sv; } result; result.sv = arg; result.sv.v = CFSwapInt32(result.sv.v); return result.v; } static __inline__ __attribute__((always_inline)) CFSwappedFloat64 CFConvertDoubleHostToSwapped(double arg) { union CFSwap { double v; CFSwappedFloat64 sv; } result; result.v = arg; result.sv.v = CFSwapInt64(result.sv.v); return result.sv; } static __inline__ __attribute__((always_inline)) double CFConvertDoubleSwappedToHost(CFSwappedFloat64 arg) { union CFSwap { double v; CFSwappedFloat64 sv; } result; result.sv = arg; result.sv.v = CFSwapInt64(result.sv.v); return result.v; } } extern "C" { typedef const void * (*CFDictionaryRetainCallBack)(CFAllocatorRef allocator, const void *value); typedef void (*CFDictionaryReleaseCallBack)(CFAllocatorRef allocator, const void *value); typedef CFStringRef (*CFDictionaryCopyDescriptionCallBack)(const void *value); typedef Boolean (*CFDictionaryEqualCallBack)(const void *value1, const void *value2); typedef CFHashCode (*CFDictionaryHashCallBack)(const void *value); typedef struct { CFIndex version; CFDictionaryRetainCallBack retain; CFDictionaryReleaseCallBack release; CFDictionaryCopyDescriptionCallBack copyDescription; CFDictionaryEqualCallBack equal; CFDictionaryHashCallBack hash; } CFDictionaryKeyCallBacks; extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks; extern const CFDictionaryKeyCallBacks kCFCopyStringDictionaryKeyCallBacks; typedef struct { CFIndex version; CFDictionaryRetainCallBack retain; CFDictionaryReleaseCallBack release; CFDictionaryCopyDescriptionCallBack copyDescription; CFDictionaryEqualCallBack equal; } CFDictionaryValueCallBacks; extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks; typedef void (*CFDictionaryApplierFunction)(const void *key, const void *value, void *context); typedef const struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableDictionary))) __CFDictionary * CFMutableDictionaryRef; extern CFTypeID CFDictionaryGetTypeID(void); extern CFDictionaryRef CFDictionaryCreate(CFAllocatorRef allocator, const void **keys, const void **values, CFIndex numValues, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks); extern CFDictionaryRef CFDictionaryCreateCopy(CFAllocatorRef allocator, CFDictionaryRef theDict); extern CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks); extern CFMutableDictionaryRef CFDictionaryCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFDictionaryRef theDict); extern CFIndex CFDictionaryGetCount(CFDictionaryRef theDict); extern CFIndex CFDictionaryGetCountOfKey(CFDictionaryRef theDict, const void *key); extern CFIndex CFDictionaryGetCountOfValue(CFDictionaryRef theDict, const void *value); extern Boolean CFDictionaryContainsKey(CFDictionaryRef theDict, const void *key); extern Boolean CFDictionaryContainsValue(CFDictionaryRef theDict, const void *value); extern const void *CFDictionaryGetValue(CFDictionaryRef theDict, const void *key); extern Boolean CFDictionaryGetValueIfPresent(CFDictionaryRef theDict, const void *key, const void **value); extern void CFDictionaryGetKeysAndValues(CFDictionaryRef theDict, const void **keys, const void **values); extern void CFDictionaryApplyFunction(CFDictionaryRef theDict, CFDictionaryApplierFunction __attribute__((noescape)) applier, void *context); extern void CFDictionaryAddValue(CFMutableDictionaryRef theDict, const void *key, const void *value); extern void CFDictionarySetValue(CFMutableDictionaryRef theDict, const void *key, const void *value); extern void CFDictionaryReplaceValue(CFMutableDictionaryRef theDict, const void *key, const void *value); extern void CFDictionaryRemoveValue(CFMutableDictionaryRef theDict, const void *key); extern void CFDictionaryRemoveAllValues(CFMutableDictionaryRef theDict); } extern "C" { typedef CFStringRef CFNotificationName __attribute__((swift_wrapper(struct))); typedef struct __attribute__((objc_bridge_mutable(id))) __CFNotificationCenter * CFNotificationCenterRef; typedef void (*CFNotificationCallback)(CFNotificationCenterRef center, void *observer, CFNotificationName name, const void *object, CFDictionaryRef userInfo); typedef CFIndex CFNotificationSuspensionBehavior; enum { CFNotificationSuspensionBehaviorDrop = 1, CFNotificationSuspensionBehaviorCoalesce = 2, CFNotificationSuspensionBehaviorHold = 3, CFNotificationSuspensionBehaviorDeliverImmediately = 4 }; extern CFTypeID CFNotificationCenterGetTypeID(void); extern CFNotificationCenterRef CFNotificationCenterGetLocalCenter(void); extern CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void); extern CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter(void); extern void CFNotificationCenterAddObserver(CFNotificationCenterRef center, const void *observer, CFNotificationCallback callBack, CFStringRef name, const void *object, CFNotificationSuspensionBehavior suspensionBehavior); extern void CFNotificationCenterRemoveObserver(CFNotificationCenterRef center, const void *observer, CFNotificationName name, const void *object); extern void CFNotificationCenterRemoveEveryObserver(CFNotificationCenterRef center, const void *observer); extern void CFNotificationCenterPostNotification(CFNotificationCenterRef center, CFNotificationName name, const void *object, CFDictionaryRef userInfo, Boolean deliverImmediately); enum { kCFNotificationDeliverImmediately = (1UL << 0), kCFNotificationPostToAllSessions = (1UL << 1) }; extern void CFNotificationCenterPostNotificationWithOptions(CFNotificationCenterRef center, CFNotificationName name, const void *object, CFDictionaryRef userInfo, CFOptionFlags options); } extern "C" { typedef CFStringRef CFLocaleIdentifier __attribute__((swift_wrapper(struct))); typedef CFStringRef CFLocaleKey __attribute__((swift_wrapper(enum))); typedef const struct __attribute__((objc_bridge(NSLocale))) __CFLocale *CFLocaleRef; extern CFTypeID CFLocaleGetTypeID(void); extern CFLocaleRef CFLocaleGetSystem(void); extern CFLocaleRef CFLocaleCopyCurrent(void); extern CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers(void); extern CFArrayRef CFLocaleCopyISOLanguageCodes(void); extern CFArrayRef CFLocaleCopyISOCountryCodes(void); extern CFArrayRef CFLocaleCopyISOCurrencyCodes(void); extern CFArrayRef CFLocaleCopyCommonISOCurrencyCodes(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFArrayRef CFLocaleCopyPreferredLanguages(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString(CFAllocatorRef allocator, CFStringRef localeIdentifier); extern CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString(CFAllocatorRef allocator, CFStringRef localeIdentifier); extern CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes(CFAllocatorRef allocator, LangCode lcode, RegionCode rcode); extern CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode(CFAllocatorRef allocator, uint32_t lcid) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern uint32_t CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier(CFLocaleIdentifier localeIdentifier) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFIndex CFLocaleLanguageDirection; enum { kCFLocaleLanguageDirectionUnknown = 0, kCFLocaleLanguageDirectionLeftToRight = 1, kCFLocaleLanguageDirectionRightToLeft = 2, kCFLocaleLanguageDirectionTopToBottom = 3, kCFLocaleLanguageDirectionBottomToTop = 4 }; extern CFLocaleLanguageDirection CFLocaleGetLanguageCharacterDirection(CFStringRef isoLangCode) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFLocaleLanguageDirection CFLocaleGetLanguageLineDirection(CFStringRef isoLangCode) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier(CFAllocatorRef allocator, CFLocaleIdentifier localeID); extern CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents(CFAllocatorRef allocator, CFDictionaryRef dictionary); extern CFLocaleRef CFLocaleCreate(CFAllocatorRef allocator, CFLocaleIdentifier localeIdentifier); extern CFLocaleRef CFLocaleCreateCopy(CFAllocatorRef allocator, CFLocaleRef locale); extern CFLocaleIdentifier CFLocaleGetIdentifier(CFLocaleRef locale); extern CFTypeRef CFLocaleGetValue(CFLocaleRef locale, CFLocaleKey key); extern CFStringRef CFLocaleCopyDisplayNameForPropertyValue(CFLocaleRef displayLocale, CFLocaleKey key, CFStringRef value); extern const CFNotificationName kCFLocaleCurrentLocaleDidChangeNotification __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFLocaleKey kCFLocaleIdentifier; extern const CFLocaleKey kCFLocaleLanguageCode; extern const CFLocaleKey kCFLocaleCountryCode; extern const CFLocaleKey kCFLocaleScriptCode; extern const CFLocaleKey kCFLocaleVariantCode; extern const CFLocaleKey kCFLocaleExemplarCharacterSet; extern const CFLocaleKey kCFLocaleCalendarIdentifier; extern const CFLocaleKey kCFLocaleCalendar; extern const CFLocaleKey kCFLocaleCollationIdentifier; extern const CFLocaleKey kCFLocaleUsesMetricSystem; extern const CFLocaleKey kCFLocaleMeasurementSystem; extern const CFLocaleKey kCFLocaleDecimalSeparator; extern const CFLocaleKey kCFLocaleGroupingSeparator; extern const CFLocaleKey kCFLocaleCurrencySymbol; extern const CFLocaleKey kCFLocaleCurrencyCode; extern const CFLocaleKey kCFLocaleCollatorIdentifier __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFLocaleKey kCFLocaleQuotationBeginDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFLocaleKey kCFLocaleQuotationEndDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFLocaleKey kCFLocaleAlternateQuotationBeginDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFLocaleKey kCFLocaleAlternateQuotationEndDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFStringRef CFCalendarIdentifier __attribute__((swift_wrapper(enum))); extern const CFCalendarIdentifier kCFGregorianCalendar; extern const CFCalendarIdentifier kCFBuddhistCalendar; extern const CFCalendarIdentifier kCFChineseCalendar; extern const CFCalendarIdentifier kCFHebrewCalendar; extern const CFCalendarIdentifier kCFIslamicCalendar; extern const CFCalendarIdentifier kCFIslamicCivilCalendar; extern const CFCalendarIdentifier kCFJapaneseCalendar; extern const CFCalendarIdentifier kCFRepublicOfChinaCalendar __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFCalendarIdentifier kCFPersianCalendar __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFCalendarIdentifier kCFIndianCalendar __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFCalendarIdentifier kCFISO8601Calendar __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFCalendarIdentifier kCFIslamicTabularCalendar __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFCalendarIdentifier kCFIslamicUmmAlQuraCalendar __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef double CFTimeInterval; typedef CFTimeInterval CFAbsoluteTime; extern CFAbsoluteTime CFAbsoluteTimeGetCurrent(void); extern const CFTimeInterval kCFAbsoluteTimeIntervalSince1970; extern const CFTimeInterval kCFAbsoluteTimeIntervalSince1904; typedef const struct __attribute__((objc_bridge(NSDate))) __CFDate * CFDateRef; extern CFTypeID CFDateGetTypeID(void); extern CFDateRef CFDateCreate(CFAllocatorRef allocator, CFAbsoluteTime at); extern CFAbsoluteTime CFDateGetAbsoluteTime(CFDateRef theDate); extern CFTimeInterval CFDateGetTimeIntervalSinceDate(CFDateRef theDate, CFDateRef otherDate); extern CFComparisonResult CFDateCompare(CFDateRef theDate, CFDateRef otherDate, void *context); typedef const struct __attribute__((objc_bridge(NSTimeZone))) __CFTimeZone * CFTimeZoneRef; typedef struct { SInt32 year; SInt8 month; SInt8 day; SInt8 hour; SInt8 minute; double second; } CFGregorianDate __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); typedef struct { SInt32 years; SInt32 months; SInt32 days; SInt32 hours; SInt32 minutes; double seconds; } CFGregorianUnits __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); typedef CFOptionFlags CFGregorianUnitFlags; enum { kCFGregorianUnitsYears __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = (1UL << 0), kCFGregorianUnitsMonths __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = (1UL << 1), kCFGregorianUnitsDays __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = (1UL << 2), kCFGregorianUnitsHours __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = (1UL << 3), kCFGregorianUnitsMinutes __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = (1UL << 4), kCFGregorianUnitsSeconds __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = (1UL << 5), kCFGregorianAllUnits __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))) = 0x00FFFFFF }; extern Boolean CFGregorianDateIsValid(CFGregorianDate gdate, CFOptionFlags unitFlags) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern CFAbsoluteTime CFGregorianDateGetAbsoluteTime(CFGregorianDate gdate, CFTimeZoneRef tz) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern CFGregorianDate CFAbsoluteTimeGetGregorianDate(CFAbsoluteTime at, CFTimeZoneRef tz) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern CFAbsoluteTime CFAbsoluteTimeAddGregorianUnits(CFAbsoluteTime at, CFTimeZoneRef tz, CFGregorianUnits units) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits(CFAbsoluteTime at1, CFAbsoluteTime at2, CFTimeZoneRef tz, CFOptionFlags unitFlags) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern SInt32 CFAbsoluteTimeGetDayOfWeek(CFAbsoluteTime at, CFTimeZoneRef tz) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern SInt32 CFAbsoluteTimeGetDayOfYear(CFAbsoluteTime at, CFTimeZoneRef tz) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); extern SInt32 CFAbsoluteTimeGetWeekOfYear(CFAbsoluteTime at, CFTimeZoneRef tz) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFCalendar or NSCalendar API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFCalendar or NSCalendar API instead"))); } extern "C" { typedef const struct __attribute__((objc_bridge(NSData))) __CFData * CFDataRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableData))) __CFData * CFMutableDataRef; extern CFTypeID CFDataGetTypeID(void); extern CFDataRef CFDataCreate(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex length); extern CFDataRef CFDataCreateWithBytesNoCopy(CFAllocatorRef allocator, const UInt8 *bytes, CFIndex length, CFAllocatorRef bytesDeallocator); extern CFDataRef CFDataCreateCopy(CFAllocatorRef allocator, CFDataRef theData); extern CFMutableDataRef CFDataCreateMutable(CFAllocatorRef allocator, CFIndex capacity); extern CFMutableDataRef CFDataCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFDataRef theData); extern CFIndex CFDataGetLength(CFDataRef theData); extern const UInt8 *CFDataGetBytePtr(CFDataRef theData); extern UInt8 *CFDataGetMutableBytePtr(CFMutableDataRef theData); extern void CFDataGetBytes(CFDataRef theData, CFRange range, UInt8 *buffer); extern void CFDataSetLength(CFMutableDataRef theData, CFIndex length); extern void CFDataIncreaseLength(CFMutableDataRef theData, CFIndex extraLength); extern void CFDataAppendBytes(CFMutableDataRef theData, const UInt8 *bytes, CFIndex length); extern void CFDataReplaceBytes(CFMutableDataRef theData, CFRange range, const UInt8 *newBytes, CFIndex newLength); extern void CFDataDeleteBytes(CFMutableDataRef theData, CFRange range); typedef CFOptionFlags CFDataSearchFlags; enum { kCFDataSearchBackwards = 1UL << 0, kCFDataSearchAnchored = 1UL << 1 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFRange CFDataFind(CFDataRef theData, CFDataRef dataToFind, CFRange searchRange, CFDataSearchFlags compareOptions) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef const struct __attribute__((objc_bridge(NSCharacterSet))) __CFCharacterSet * CFCharacterSetRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableCharacterSet))) __CFCharacterSet * CFMutableCharacterSetRef; typedef CFIndex CFCharacterSetPredefinedSet; enum { kCFCharacterSetControl = 1, kCFCharacterSetWhitespace, kCFCharacterSetWhitespaceAndNewline, kCFCharacterSetDecimalDigit, kCFCharacterSetLetter, kCFCharacterSetLowercaseLetter, kCFCharacterSetUppercaseLetter, kCFCharacterSetNonBase, kCFCharacterSetDecomposable, kCFCharacterSetAlphaNumeric, kCFCharacterSetPunctuation, kCFCharacterSetCapitalizedLetter = 13, kCFCharacterSetSymbol = 14, kCFCharacterSetNewline __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 15, kCFCharacterSetIllegal = 12 }; extern CFTypeID CFCharacterSetGetTypeID(void); extern CFCharacterSetRef CFCharacterSetGetPredefined(CFCharacterSetPredefinedSet theSetIdentifier); extern CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange(CFAllocatorRef alloc, CFRange theRange); extern CFCharacterSetRef CFCharacterSetCreateWithCharactersInString(CFAllocatorRef alloc, CFStringRef theString); extern CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation(CFAllocatorRef alloc, CFDataRef theData); extern CFCharacterSetRef CFCharacterSetCreateInvertedSet(CFAllocatorRef alloc, CFCharacterSetRef theSet); extern Boolean CFCharacterSetIsSupersetOfSet(CFCharacterSetRef theSet, CFCharacterSetRef theOtherset); extern Boolean CFCharacterSetHasMemberInPlane(CFCharacterSetRef theSet, CFIndex thePlane); extern CFMutableCharacterSetRef CFCharacterSetCreateMutable(CFAllocatorRef alloc); extern CFCharacterSetRef CFCharacterSetCreateCopy(CFAllocatorRef alloc, CFCharacterSetRef theSet); extern CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy(CFAllocatorRef alloc, CFCharacterSetRef theSet); extern Boolean CFCharacterSetIsCharacterMember(CFCharacterSetRef theSet, UniChar theChar); extern Boolean CFCharacterSetIsLongCharacterMember(CFCharacterSetRef theSet, UTF32Char theChar); extern CFDataRef CFCharacterSetCreateBitmapRepresentation(CFAllocatorRef alloc, CFCharacterSetRef theSet); extern void CFCharacterSetAddCharactersInRange(CFMutableCharacterSetRef theSet, CFRange theRange); extern void CFCharacterSetRemoveCharactersInRange(CFMutableCharacterSetRef theSet, CFRange theRange); extern void CFCharacterSetAddCharactersInString(CFMutableCharacterSetRef theSet, CFStringRef theString); extern void CFCharacterSetRemoveCharactersInString(CFMutableCharacterSetRef theSet, CFStringRef theString); extern void CFCharacterSetUnion(CFMutableCharacterSetRef theSet, CFCharacterSetRef theOtherSet); extern void CFCharacterSetIntersect(CFMutableCharacterSetRef theSet, CFCharacterSetRef theOtherSet); extern void CFCharacterSetInvert(CFMutableCharacterSetRef theSet); } extern "C" { typedef UInt32 CFStringEncoding; typedef CFStringEncoding CFStringBuiltInEncodings; enum { kCFStringEncodingMacRoman = 0, kCFStringEncodingWindowsLatin1 = 0x0500, kCFStringEncodingISOLatin1 = 0x0201, kCFStringEncodingNextStepLatin = 0x0B01, kCFStringEncodingASCII = 0x0600, kCFStringEncodingUnicode = 0x0100, kCFStringEncodingUTF8 = 0x08000100, kCFStringEncodingNonLossyASCII = 0x0BFF, kCFStringEncodingUTF16 = 0x0100, kCFStringEncodingUTF16BE = 0x10000100, kCFStringEncodingUTF16LE = 0x14000100, kCFStringEncodingUTF32 = 0x0c000100, kCFStringEncodingUTF32BE = 0x18000100, kCFStringEncodingUTF32LE = 0x1c000100 }; extern CFTypeID CFStringGetTypeID(void); extern CFStringRef CFStringCreateWithPascalString(CFAllocatorRef alloc, ConstStr255Param pStr, CFStringEncoding encoding); extern CFStringRef CFStringCreateWithCString(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding); extern CFStringRef CFStringCreateWithBytes(CFAllocatorRef alloc, const UInt8 *bytes, CFIndex numBytes, CFStringEncoding encoding, Boolean isExternalRepresentation); extern CFStringRef CFStringCreateWithCharacters(CFAllocatorRef alloc, const UniChar *chars, CFIndex numChars); extern CFStringRef CFStringCreateWithPascalStringNoCopy(CFAllocatorRef alloc, ConstStr255Param pStr, CFStringEncoding encoding, CFAllocatorRef contentsDeallocator); extern CFStringRef CFStringCreateWithCStringNoCopy(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding, CFAllocatorRef contentsDeallocator); extern CFStringRef CFStringCreateWithBytesNoCopy(CFAllocatorRef alloc, const UInt8 *bytes, CFIndex numBytes, CFStringEncoding encoding, Boolean isExternalRepresentation, CFAllocatorRef contentsDeallocator); extern CFStringRef CFStringCreateWithCharactersNoCopy(CFAllocatorRef alloc, const UniChar *chars, CFIndex numChars, CFAllocatorRef contentsDeallocator); extern CFStringRef CFStringCreateWithSubstring(CFAllocatorRef alloc, CFStringRef str, CFRange range); extern CFStringRef CFStringCreateCopy(CFAllocatorRef alloc, CFStringRef theString); extern CFStringRef CFStringCreateWithFormat(CFAllocatorRef alloc, CFDictionaryRef formatOptions, CFStringRef format, ...) __attribute__((format(CFString, 3, 4))); extern CFStringRef CFStringCreateWithFormatAndArguments(CFAllocatorRef alloc, CFDictionaryRef formatOptions, CFStringRef format, va_list arguments) __attribute__((format(CFString, 3, 0))); extern CFMutableStringRef CFStringCreateMutable(CFAllocatorRef alloc, CFIndex maxLength); extern CFMutableStringRef CFStringCreateMutableCopy(CFAllocatorRef alloc, CFIndex maxLength, CFStringRef theString); extern CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy(CFAllocatorRef alloc, UniChar *chars, CFIndex numChars, CFIndex capacity, CFAllocatorRef externalCharactersAllocator); extern CFIndex CFStringGetLength(CFStringRef theString); extern UniChar CFStringGetCharacterAtIndex(CFStringRef theString, CFIndex idx); extern void CFStringGetCharacters(CFStringRef theString, CFRange range, UniChar *buffer); extern Boolean CFStringGetPascalString(CFStringRef theString, StringPtr buffer, CFIndex bufferSize, CFStringEncoding encoding); extern Boolean CFStringGetCString(CFStringRef theString, char *buffer, CFIndex bufferSize, CFStringEncoding encoding); extern ConstStringPtr CFStringGetPascalStringPtr(CFStringRef theString, CFStringEncoding encoding); extern const char *CFStringGetCStringPtr(CFStringRef theString, CFStringEncoding encoding); extern const UniChar *CFStringGetCharactersPtr(CFStringRef theString); extern CFIndex CFStringGetBytes(CFStringRef theString, CFRange range, CFStringEncoding encoding, UInt8 lossByte, Boolean isExternalRepresentation, UInt8 *buffer, CFIndex maxBufLen, CFIndex *usedBufLen); extern CFStringRef CFStringCreateFromExternalRepresentation(CFAllocatorRef alloc, CFDataRef data, CFStringEncoding encoding); extern CFDataRef CFStringCreateExternalRepresentation(CFAllocatorRef alloc, CFStringRef theString, CFStringEncoding encoding, UInt8 lossByte); extern CFStringEncoding CFStringGetSmallestEncoding(CFStringRef theString); extern CFStringEncoding CFStringGetFastestEncoding(CFStringRef theString); extern CFStringEncoding CFStringGetSystemEncoding(void); extern CFIndex CFStringGetMaximumSizeForEncoding(CFIndex length, CFStringEncoding encoding); extern Boolean CFStringGetFileSystemRepresentation(CFStringRef string, char *buffer, CFIndex maxBufLen); extern CFIndex CFStringGetMaximumSizeOfFileSystemRepresentation(CFStringRef string); extern CFStringRef CFStringCreateWithFileSystemRepresentation(CFAllocatorRef alloc, const char *buffer); typedef CFOptionFlags CFStringCompareFlags; enum { kCFCompareCaseInsensitive = 1, kCFCompareBackwards = 4, kCFCompareAnchored = 8, kCFCompareNonliteral = 16, kCFCompareLocalized = 32, kCFCompareNumerically = 64, kCFCompareDiacriticInsensitive __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 128, kCFCompareWidthInsensitive __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 256, kCFCompareForcedOrdering __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 512 }; extern CFComparisonResult CFStringCompareWithOptionsAndLocale(CFStringRef theString1, CFStringRef theString2, CFRange rangeToCompare, CFStringCompareFlags compareOptions, CFLocaleRef locale) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFComparisonResult CFStringCompareWithOptions(CFStringRef theString1, CFStringRef theString2, CFRange rangeToCompare, CFStringCompareFlags compareOptions); extern CFComparisonResult CFStringCompare(CFStringRef theString1, CFStringRef theString2, CFStringCompareFlags compareOptions); extern Boolean CFStringFindWithOptionsAndLocale(CFStringRef theString, CFStringRef stringToFind, CFRange rangeToSearch, CFStringCompareFlags searchOptions, CFLocaleRef locale, CFRange *result) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFStringFindWithOptions(CFStringRef theString, CFStringRef stringToFind, CFRange rangeToSearch, CFStringCompareFlags searchOptions, CFRange *result); extern CFArrayRef CFStringCreateArrayWithFindResults(CFAllocatorRef alloc, CFStringRef theString, CFStringRef stringToFind, CFRange rangeToSearch, CFStringCompareFlags compareOptions); extern CFRange CFStringFind(CFStringRef theString, CFStringRef stringToFind, CFStringCompareFlags compareOptions); extern Boolean CFStringHasPrefix(CFStringRef theString, CFStringRef prefix); extern Boolean CFStringHasSuffix(CFStringRef theString, CFStringRef suffix); extern CFRange CFStringGetRangeOfComposedCharactersAtIndex(CFStringRef theString, CFIndex theIndex); extern Boolean CFStringFindCharacterFromSet(CFStringRef theString, CFCharacterSetRef theSet, CFRange rangeToSearch, CFStringCompareFlags searchOptions, CFRange *result); extern void CFStringGetLineBounds(CFStringRef theString, CFRange range, CFIndex *lineBeginIndex, CFIndex *lineEndIndex, CFIndex *contentsEndIndex); extern void CFStringGetParagraphBounds(CFStringRef string, CFRange range, CFIndex *parBeginIndex, CFIndex *parEndIndex, CFIndex *contentsEndIndex) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFIndex CFStringGetHyphenationLocationBeforeIndex(CFStringRef string, CFIndex location, CFRange limitRange, CFOptionFlags options, CFLocaleRef locale, UTF32Char *character) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFStringIsHyphenationAvailableForLocale(CFLocaleRef locale) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringRef CFStringCreateByCombiningStrings(CFAllocatorRef alloc, CFArrayRef theArray, CFStringRef separatorString); extern CFArrayRef CFStringCreateArrayBySeparatingStrings(CFAllocatorRef alloc, CFStringRef theString, CFStringRef separatorString); extern SInt32 CFStringGetIntValue(CFStringRef str); extern double CFStringGetDoubleValue(CFStringRef str); extern void CFStringAppend(CFMutableStringRef theString, CFStringRef appendedString); extern void CFStringAppendCharacters(CFMutableStringRef theString, const UniChar *chars, CFIndex numChars); extern void CFStringAppendPascalString(CFMutableStringRef theString, ConstStr255Param pStr, CFStringEncoding encoding); extern void CFStringAppendCString(CFMutableStringRef theString, const char *cStr, CFStringEncoding encoding); extern void CFStringAppendFormat(CFMutableStringRef theString, CFDictionaryRef formatOptions, CFStringRef format, ...) __attribute__((format(CFString, 3, 4))); extern void CFStringAppendFormatAndArguments(CFMutableStringRef theString, CFDictionaryRef formatOptions, CFStringRef format, va_list arguments) __attribute__((format(CFString, 3, 0))); extern void CFStringInsert(CFMutableStringRef str, CFIndex idx, CFStringRef insertedStr); extern void CFStringDelete(CFMutableStringRef theString, CFRange range); extern void CFStringReplace(CFMutableStringRef theString, CFRange range, CFStringRef replacement); extern void CFStringReplaceAll(CFMutableStringRef theString, CFStringRef replacement); extern CFIndex CFStringFindAndReplace(CFMutableStringRef theString, CFStringRef stringToFind, CFStringRef replacementString, CFRange rangeToSearch, CFStringCompareFlags compareOptions); extern void CFStringSetExternalCharactersNoCopy(CFMutableStringRef theString, UniChar *chars, CFIndex length, CFIndex capacity); extern void CFStringPad(CFMutableStringRef theString, CFStringRef padString, CFIndex length, CFIndex indexIntoPad); extern void CFStringTrim(CFMutableStringRef theString, CFStringRef trimString); extern void CFStringTrimWhitespace(CFMutableStringRef theString); extern void CFStringLowercase(CFMutableStringRef theString, CFLocaleRef locale); extern void CFStringUppercase(CFMutableStringRef theString, CFLocaleRef locale); extern void CFStringCapitalize(CFMutableStringRef theString, CFLocaleRef locale); typedef CFIndex CFStringNormalizationForm; enum { kCFStringNormalizationFormD = 0, kCFStringNormalizationFormKD, kCFStringNormalizationFormC, kCFStringNormalizationFormKC }; extern void CFStringNormalize(CFMutableStringRef theString, CFStringNormalizationForm theForm); extern void CFStringFold(CFMutableStringRef theString, CFStringCompareFlags theFlags, CFLocaleRef theLocale) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFStringTransform(CFMutableStringRef string, CFRange *range, CFStringRef transform, Boolean reverse); extern const CFStringRef kCFStringTransformStripCombiningMarks; extern const CFStringRef kCFStringTransformToLatin; extern const CFStringRef kCFStringTransformFullwidthHalfwidth; extern const CFStringRef kCFStringTransformLatinKatakana; extern const CFStringRef kCFStringTransformLatinHiragana; extern const CFStringRef kCFStringTransformHiraganaKatakana; extern const CFStringRef kCFStringTransformMandarinLatin; extern const CFStringRef kCFStringTransformLatinHangul; extern const CFStringRef kCFStringTransformLatinArabic; extern const CFStringRef kCFStringTransformLatinHebrew; extern const CFStringRef kCFStringTransformLatinThai; extern const CFStringRef kCFStringTransformLatinCyrillic; extern const CFStringRef kCFStringTransformLatinGreek; extern const CFStringRef kCFStringTransformToXMLHex; extern const CFStringRef kCFStringTransformToUnicodeName; extern const CFStringRef kCFStringTransformStripDiacritics __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFStringIsEncodingAvailable(CFStringEncoding encoding); extern const CFStringEncoding *CFStringGetListOfAvailableEncodings(void); extern CFStringRef CFStringGetNameOfEncoding(CFStringEncoding encoding); extern unsigned long CFStringConvertEncodingToNSStringEncoding(CFStringEncoding encoding); extern CFStringEncoding CFStringConvertNSStringEncodingToEncoding(unsigned long encoding); extern UInt32 CFStringConvertEncodingToWindowsCodepage(CFStringEncoding encoding); extern CFStringEncoding CFStringConvertWindowsCodepageToEncoding(UInt32 codepage); extern CFStringEncoding CFStringConvertIANACharSetNameToEncoding(CFStringRef theString); extern CFStringRef CFStringConvertEncodingToIANACharSetName(CFStringEncoding encoding); extern CFStringEncoding CFStringGetMostCompatibleMacStringEncoding(CFStringEncoding encoding); typedef struct { UniChar buffer[64]; CFStringRef theString; const UniChar *directUniCharBuffer; const char *directCStringBuffer; CFRange rangeToBuffer; CFIndex bufferedRangeStart; CFIndex bufferedRangeEnd; } CFStringInlineBuffer; static __inline__ __attribute__((always_inline)) void CFStringInitInlineBuffer(CFStringRef str, CFStringInlineBuffer *buf, CFRange range) { buf->theString = str; buf->rangeToBuffer = range; buf->directCStringBuffer = (buf->directUniCharBuffer = CFStringGetCharactersPtr(str)) ? __null : CFStringGetCStringPtr(str, kCFStringEncodingASCII); buf->bufferedRangeStart = buf->bufferedRangeEnd = 0; } static __inline__ __attribute__((always_inline)) UniChar CFStringGetCharacterFromInlineBuffer(CFStringInlineBuffer *buf, CFIndex idx) { if (idx < 0 || idx >= buf->rangeToBuffer.length) return 0; if (buf->directUniCharBuffer) return buf->directUniCharBuffer[idx + buf->rangeToBuffer.location]; if (buf->directCStringBuffer) return (UniChar)(buf->directCStringBuffer[idx + buf->rangeToBuffer.location]); if (idx >= buf->bufferedRangeEnd || idx < buf->bufferedRangeStart) { if ((buf->bufferedRangeStart = idx - 4) < 0) buf->bufferedRangeStart = 0; buf->bufferedRangeEnd = buf->bufferedRangeStart + 64; if (buf->bufferedRangeEnd > buf->rangeToBuffer.length) buf->bufferedRangeEnd = buf->rangeToBuffer.length; CFStringGetCharacters(buf->theString, CFRangeMake(buf->rangeToBuffer.location + buf->bufferedRangeStart, buf->bufferedRangeEnd - buf->bufferedRangeStart), buf->buffer); } return buf->buffer[idx - buf->bufferedRangeStart]; } static __inline__ __attribute__((always_inline)) Boolean CFStringIsSurrogateHighCharacter(UniChar character) { return ((character >= 0xD800UL) && (character <= 0xDBFFUL) ? true : false); } static __inline__ __attribute__((always_inline)) Boolean CFStringIsSurrogateLowCharacter(UniChar character) { return ((character >= 0xDC00UL) && (character <= 0xDFFFUL) ? true : false); } static __inline__ __attribute__((always_inline)) UTF32Char CFStringGetLongCharacterForSurrogatePair(UniChar surrogateHigh, UniChar surrogateLow) { return (UTF32Char)(((surrogateHigh - 0xD800UL) << 10) + (surrogateLow - 0xDC00UL) + 0x0010000UL); } static __inline__ __attribute__((always_inline)) Boolean CFStringGetSurrogatePairForLongCharacter(UTF32Char character, UniChar *surrogates) { if ((character > 0xFFFFUL) && (character < 0x110000UL)) { character -= 0x10000; if (__null != surrogates) { surrogates[0] = (UniChar)((character >> 10) + 0xD800UL); surrogates[1] = (UniChar)((character & 0x3FF) + 0xDC00UL); } return true; } else { if (__null != surrogates) *surrogates = (UniChar)character; return false; } } extern void CFShow(CFTypeRef obj); extern void CFShowStr(CFStringRef str); extern CFStringRef __CFStringMakeConstantString(const char *cStr) __attribute__((format_arg(1))); } extern "C" { extern CFTypeID CFTimeZoneGetTypeID(void); extern CFTimeZoneRef CFTimeZoneCopySystem(void); extern void CFTimeZoneResetSystem(void); extern CFTimeZoneRef CFTimeZoneCopyDefault(void); extern void CFTimeZoneSetDefault(CFTimeZoneRef tz); extern CFArrayRef CFTimeZoneCopyKnownNames(void); extern CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary(void); extern void CFTimeZoneSetAbbreviationDictionary(CFDictionaryRef dict); extern CFTimeZoneRef CFTimeZoneCreate(CFAllocatorRef allocator, CFStringRef name, CFDataRef data); extern CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT(CFAllocatorRef allocator, CFTimeInterval ti); extern CFTimeZoneRef CFTimeZoneCreateWithName(CFAllocatorRef allocator, CFStringRef name, Boolean tryAbbrev); extern CFStringRef CFTimeZoneGetName(CFTimeZoneRef tz); extern CFDataRef CFTimeZoneGetData(CFTimeZoneRef tz); extern CFTimeInterval CFTimeZoneGetSecondsFromGMT(CFTimeZoneRef tz, CFAbsoluteTime at); extern CFStringRef CFTimeZoneCopyAbbreviation(CFTimeZoneRef tz, CFAbsoluteTime at); extern Boolean CFTimeZoneIsDaylightSavingTime(CFTimeZoneRef tz, CFAbsoluteTime at); extern CFTimeInterval CFTimeZoneGetDaylightSavingTimeOffset(CFTimeZoneRef tz, CFAbsoluteTime at) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFAbsoluteTime CFTimeZoneGetNextDaylightSavingTimeTransition(CFTimeZoneRef tz, CFAbsoluteTime at) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFIndex CFTimeZoneNameStyle; enum { kCFTimeZoneNameStyleStandard, kCFTimeZoneNameStyleShortStandard, kCFTimeZoneNameStyleDaylightSaving, kCFTimeZoneNameStyleShortDaylightSaving, kCFTimeZoneNameStyleGeneric, kCFTimeZoneNameStyleShortGeneric } __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringRef CFTimeZoneCopyLocalizedName(CFTimeZoneRef tz, CFTimeZoneNameStyle style, CFLocaleRef locale) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFNotificationName kCFTimeZoneSystemTimeZoneDidChangeNotification __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef struct __attribute__((objc_bridge_mutable(NSCalendar))) __CFCalendar * CFCalendarRef; extern CFTypeID CFCalendarGetTypeID(void); extern CFCalendarRef CFCalendarCopyCurrent(void); extern CFCalendarRef CFCalendarCreateWithIdentifier(CFAllocatorRef allocator, CFCalendarIdentifier identifier); extern CFCalendarIdentifier CFCalendarGetIdentifier(CFCalendarRef calendar); extern CFLocaleRef CFCalendarCopyLocale(CFCalendarRef calendar); extern void CFCalendarSetLocale(CFCalendarRef calendar, CFLocaleRef locale); extern CFTimeZoneRef CFCalendarCopyTimeZone(CFCalendarRef calendar); extern void CFCalendarSetTimeZone(CFCalendarRef calendar, CFTimeZoneRef tz); extern CFIndex CFCalendarGetFirstWeekday(CFCalendarRef calendar); extern void CFCalendarSetFirstWeekday(CFCalendarRef calendar, CFIndex wkdy); extern CFIndex CFCalendarGetMinimumDaysInFirstWeek(CFCalendarRef calendar); extern void CFCalendarSetMinimumDaysInFirstWeek(CFCalendarRef calendar, CFIndex mwd); typedef CFOptionFlags CFCalendarUnit; enum { kCFCalendarUnitEra = (1UL << 1), kCFCalendarUnitYear = (1UL << 2), kCFCalendarUnitMonth = (1UL << 3), kCFCalendarUnitDay = (1UL << 4), kCFCalendarUnitHour = (1UL << 5), kCFCalendarUnitMinute = (1UL << 6), kCFCalendarUnitSecond = (1UL << 7), kCFCalendarUnitWeek __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use kCFCalendarUnitWeekOfYear or kCFCalendarUnitWeekOfMonth instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use kCFCalendarUnitWeekOfYear or kCFCalendarUnitWeekOfMonth instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use kCFCalendarUnitWeekOfYear or kCFCalendarUnitWeekOfMonth instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use kCFCalendarUnitWeekOfYear or kCFCalendarUnitWeekOfMonth instead"))) = (1UL << 8), kCFCalendarUnitWeekday = (1UL << 9), kCFCalendarUnitWeekdayOrdinal = (1UL << 10), kCFCalendarUnitQuarter __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1UL << 11), kCFCalendarUnitWeekOfMonth __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1UL << 12), kCFCalendarUnitWeekOfYear __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1UL << 13), kCFCalendarUnitYearForWeekOfYear __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1UL << 14), }; extern CFRange CFCalendarGetMinimumRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit unit); extern CFRange CFCalendarGetMaximumRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit unit); extern CFRange CFCalendarGetRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit smallerUnit, CFCalendarUnit biggerUnit, CFAbsoluteTime at); extern CFIndex CFCalendarGetOrdinalityOfUnit(CFCalendarRef calendar, CFCalendarUnit smallerUnit, CFCalendarUnit biggerUnit, CFAbsoluteTime at); extern Boolean CFCalendarGetTimeRangeOfUnit(CFCalendarRef calendar, CFCalendarUnit unit, CFAbsoluteTime at, CFAbsoluteTime *startp, CFTimeInterval *tip) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFCalendarComposeAbsoluteTime(CFCalendarRef calendar, CFAbsoluteTime *at, const char *componentDesc, ...); extern Boolean CFCalendarDecomposeAbsoluteTime(CFCalendarRef calendar, CFAbsoluteTime at, const char *componentDesc, ...); enum { kCFCalendarComponentsWrap = (1UL << 0) }; extern Boolean CFCalendarAddComponents(CFCalendarRef calendar, CFAbsoluteTime *at, CFOptionFlags options, const char *componentDesc, ...); extern Boolean CFCalendarGetComponentDifference(CFCalendarRef calendar, CFAbsoluteTime startingAT, CFAbsoluteTime resultAT, CFOptionFlags options, const char *componentDesc, ...); } extern "C" { typedef CFStringRef CFDateFormatterKey __attribute__((swift_wrapper(enum))); typedef struct __attribute__((objc_bridge_mutable(id))) __CFDateFormatter *CFDateFormatterRef; extern CFStringRef CFDateFormatterCreateDateFormatFromTemplate(CFAllocatorRef allocator, CFStringRef tmplate, CFOptionFlags options, CFLocaleRef locale) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFTypeID CFDateFormatterGetTypeID(void); typedef CFIndex CFDateFormatterStyle; enum { kCFDateFormatterNoStyle = 0, kCFDateFormatterShortStyle = 1, kCFDateFormatterMediumStyle = 2, kCFDateFormatterLongStyle = 3, kCFDateFormatterFullStyle = 4 }; typedef CFOptionFlags CFISO8601DateFormatOptions; enum { kCFISO8601DateFormatWithYear __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 0), kCFISO8601DateFormatWithMonth __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 1), kCFISO8601DateFormatWithWeekOfYear __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 2), kCFISO8601DateFormatWithDay __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 4), kCFISO8601DateFormatWithTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 5), kCFISO8601DateFormatWithTimeZone __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 6), kCFISO8601DateFormatWithSpaceBetweenDateAndTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 7), kCFISO8601DateFormatWithDashSeparatorInDate __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 8), kCFISO8601DateFormatWithColonSeparatorInTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 9), kCFISO8601DateFormatWithColonSeparatorInTimeZone __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = (1UL << 10), kCFISO8601DateFormatWithFractionalSeconds __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) = (1UL << 11), kCFISO8601DateFormatWithFullDate __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithYear | kCFISO8601DateFormatWithMonth | kCFISO8601DateFormatWithDay | kCFISO8601DateFormatWithDashSeparatorInDate, kCFISO8601DateFormatWithFullTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithTime | kCFISO8601DateFormatWithColonSeparatorInTime | kCFISO8601DateFormatWithTimeZone | kCFISO8601DateFormatWithColonSeparatorInTimeZone, kCFISO8601DateFormatWithInternetDateTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithFullDate | kCFISO8601DateFormatWithFullTime, }; extern CFDateFormatterRef CFDateFormatterCreateISO8601Formatter(CFAllocatorRef allocator, CFISO8601DateFormatOptions formatOptions) __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern CFDateFormatterRef CFDateFormatterCreate(CFAllocatorRef allocator, CFLocaleRef locale, CFDateFormatterStyle dateStyle, CFDateFormatterStyle timeStyle); extern CFLocaleRef CFDateFormatterGetLocale(CFDateFormatterRef formatter); extern CFDateFormatterStyle CFDateFormatterGetDateStyle(CFDateFormatterRef formatter); extern CFDateFormatterStyle CFDateFormatterGetTimeStyle(CFDateFormatterRef formatter); extern CFStringRef CFDateFormatterGetFormat(CFDateFormatterRef formatter); extern void CFDateFormatterSetFormat(CFDateFormatterRef formatter, CFStringRef formatString); extern CFStringRef CFDateFormatterCreateStringWithDate(CFAllocatorRef allocator, CFDateFormatterRef formatter, CFDateRef date); extern CFStringRef CFDateFormatterCreateStringWithAbsoluteTime(CFAllocatorRef allocator, CFDateFormatterRef formatter, CFAbsoluteTime at); extern CFDateRef CFDateFormatterCreateDateFromString(CFAllocatorRef allocator, CFDateFormatterRef formatter, CFStringRef string, CFRange *rangep); extern Boolean CFDateFormatterGetAbsoluteTimeFromString(CFDateFormatterRef formatter, CFStringRef string, CFRange *rangep, CFAbsoluteTime *atp); extern void CFDateFormatterSetProperty(CFDateFormatterRef formatter, CFStringRef key, CFTypeRef value); extern CFTypeRef CFDateFormatterCopyProperty(CFDateFormatterRef formatter, CFDateFormatterKey key); extern const CFDateFormatterKey kCFDateFormatterIsLenient; extern const CFDateFormatterKey kCFDateFormatterTimeZone; extern const CFDateFormatterKey kCFDateFormatterCalendarName; extern const CFDateFormatterKey kCFDateFormatterDefaultFormat; extern const CFDateFormatterKey kCFDateFormatterTwoDigitStartDate; extern const CFDateFormatterKey kCFDateFormatterDefaultDate; extern const CFDateFormatterKey kCFDateFormatterCalendar; extern const CFDateFormatterKey kCFDateFormatterEraSymbols; extern const CFDateFormatterKey kCFDateFormatterMonthSymbols; extern const CFDateFormatterKey kCFDateFormatterShortMonthSymbols; extern const CFDateFormatterKey kCFDateFormatterWeekdaySymbols; extern const CFDateFormatterKey kCFDateFormatterShortWeekdaySymbols; extern const CFDateFormatterKey kCFDateFormatterAMSymbol; extern const CFDateFormatterKey kCFDateFormatterPMSymbol; extern const CFDateFormatterKey kCFDateFormatterLongEraSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterVeryShortMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterShortStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterVeryShortStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterVeryShortWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterShortStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterVeryShortStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterShortQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterStandaloneQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterShortStandaloneQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterGregorianStartDate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFDateFormatterKey kCFDateFormatterDoesRelativeDateFormattingKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef CFStringRef CFErrorDomain __attribute__((swift_wrapper(struct))); typedef struct __attribute__((objc_bridge(NSError))) __CFError * CFErrorRef; extern CFTypeID CFErrorGetTypeID(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFErrorDomain kCFErrorDomainPOSIX __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFErrorDomain kCFErrorDomainOSStatus __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFErrorDomain kCFErrorDomainMach __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFErrorDomain kCFErrorDomainCocoa __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorLocalizedDescriptionKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorLocalizedFailureKey __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern const CFStringRef kCFErrorLocalizedFailureReasonKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorLocalizedRecoverySuggestionKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorDescriptionKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorUnderlyingErrorKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorURLKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFErrorFilePathKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFErrorRef CFErrorCreate(CFAllocatorRef allocator, CFErrorDomain domain, CFIndex code, CFDictionaryRef userInfo) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFErrorRef CFErrorCreateWithUserInfoKeysAndValues(CFAllocatorRef allocator, CFErrorDomain domain, CFIndex code, const void *const *userInfoKeys, const void *const *userInfoValues, CFIndex numUserInfoValues) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFErrorDomain CFErrorGetDomain(CFErrorRef err) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFIndex CFErrorGetCode(CFErrorRef err) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDictionaryRef CFErrorCopyUserInfo(CFErrorRef err) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringRef CFErrorCopyDescription(CFErrorRef err) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringRef CFErrorCopyFailureReason(CFErrorRef err) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringRef CFErrorCopyRecoverySuggestion(CFErrorRef err) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef const struct __attribute__((objc_bridge(NSNumber))) __CFBoolean * CFBooleanRef; extern const CFBooleanRef kCFBooleanTrue; extern const CFBooleanRef kCFBooleanFalse; extern CFTypeID CFBooleanGetTypeID(void); extern Boolean CFBooleanGetValue(CFBooleanRef boolean); typedef CFIndex CFNumberType; enum { kCFNumberSInt8Type = 1, kCFNumberSInt16Type = 2, kCFNumberSInt32Type = 3, kCFNumberSInt64Type = 4, kCFNumberFloat32Type = 5, kCFNumberFloat64Type = 6, kCFNumberCharType = 7, kCFNumberShortType = 8, kCFNumberIntType = 9, kCFNumberLongType = 10, kCFNumberLongLongType = 11, kCFNumberFloatType = 12, kCFNumberDoubleType = 13, kCFNumberCFIndexType = 14, kCFNumberNSIntegerType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 15, kCFNumberCGFloatType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 16, kCFNumberMaxType = 16 }; typedef const struct __attribute__((objc_bridge(NSNumber))) __CFNumber * CFNumberRef; extern const CFNumberRef kCFNumberPositiveInfinity; extern const CFNumberRef kCFNumberNegativeInfinity; extern const CFNumberRef kCFNumberNaN; extern CFTypeID CFNumberGetTypeID(void); extern CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr); extern CFNumberType CFNumberGetType(CFNumberRef number); extern CFIndex CFNumberGetByteSize(CFNumberRef number); extern Boolean CFNumberIsFloatType(CFNumberRef number); extern Boolean CFNumberGetValue(CFNumberRef number, CFNumberType theType, void *valuePtr); extern CFComparisonResult CFNumberCompare(CFNumberRef number, CFNumberRef otherNumber, void *context); } extern "C" { typedef CFStringRef CFNumberFormatterKey __attribute__((swift_wrapper(enum))); typedef struct __attribute__((objc_bridge_mutable(id))) __CFNumberFormatter *CFNumberFormatterRef; extern CFTypeID CFNumberFormatterGetTypeID(void); typedef CFIndex CFNumberFormatterStyle; enum { kCFNumberFormatterNoStyle = 0, kCFNumberFormatterDecimalStyle = 1, kCFNumberFormatterCurrencyStyle = 2, kCFNumberFormatterPercentStyle = 3, kCFNumberFormatterScientificStyle = 4, kCFNumberFormatterSpellOutStyle = 5, kCFNumberFormatterOrdinalStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 6, kCFNumberFormatterCurrencyISOCodeStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 8, kCFNumberFormatterCurrencyPluralStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 9, kCFNumberFormatterCurrencyAccountingStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 10, }; extern CFNumberFormatterRef CFNumberFormatterCreate(CFAllocatorRef allocator, CFLocaleRef locale, CFNumberFormatterStyle style); extern CFLocaleRef CFNumberFormatterGetLocale(CFNumberFormatterRef formatter); extern CFNumberFormatterStyle CFNumberFormatterGetStyle(CFNumberFormatterRef formatter); extern CFStringRef CFNumberFormatterGetFormat(CFNumberFormatterRef formatter); extern void CFNumberFormatterSetFormat(CFNumberFormatterRef formatter, CFStringRef formatString); extern CFStringRef CFNumberFormatterCreateStringWithNumber(CFAllocatorRef allocator, CFNumberFormatterRef formatter, CFNumberRef number); extern CFStringRef CFNumberFormatterCreateStringWithValue(CFAllocatorRef allocator, CFNumberFormatterRef formatter, CFNumberType numberType, const void *valuePtr); typedef CFOptionFlags CFNumberFormatterOptionFlags; enum { kCFNumberFormatterParseIntegersOnly = 1 }; extern CFNumberRef CFNumberFormatterCreateNumberFromString(CFAllocatorRef allocator, CFNumberFormatterRef formatter, CFStringRef string, CFRange *rangep, CFOptionFlags options); extern Boolean CFNumberFormatterGetValueFromString(CFNumberFormatterRef formatter, CFStringRef string, CFRange *rangep, CFNumberType numberType, void *valuePtr); extern void CFNumberFormatterSetProperty(CFNumberFormatterRef formatter, CFNumberFormatterKey key, CFTypeRef value); extern CFTypeRef CFNumberFormatterCopyProperty(CFNumberFormatterRef formatter, CFNumberFormatterKey key); extern const CFNumberFormatterKey kCFNumberFormatterCurrencyCode; extern const CFNumberFormatterKey kCFNumberFormatterDecimalSeparator; extern const CFNumberFormatterKey kCFNumberFormatterCurrencyDecimalSeparator; extern const CFNumberFormatterKey kCFNumberFormatterAlwaysShowDecimalSeparator; extern const CFNumberFormatterKey kCFNumberFormatterGroupingSeparator; extern const CFNumberFormatterKey kCFNumberFormatterUseGroupingSeparator; extern const CFNumberFormatterKey kCFNumberFormatterPercentSymbol; extern const CFNumberFormatterKey kCFNumberFormatterZeroSymbol; extern const CFNumberFormatterKey kCFNumberFormatterNaNSymbol; extern const CFNumberFormatterKey kCFNumberFormatterInfinitySymbol; extern const CFNumberFormatterKey kCFNumberFormatterMinusSign; extern const CFNumberFormatterKey kCFNumberFormatterPlusSign; extern const CFNumberFormatterKey kCFNumberFormatterCurrencySymbol; extern const CFNumberFormatterKey kCFNumberFormatterExponentSymbol; extern const CFNumberFormatterKey kCFNumberFormatterMinIntegerDigits; extern const CFNumberFormatterKey kCFNumberFormatterMaxIntegerDigits; extern const CFNumberFormatterKey kCFNumberFormatterMinFractionDigits; extern const CFNumberFormatterKey kCFNumberFormatterMaxFractionDigits; extern const CFNumberFormatterKey kCFNumberFormatterGroupingSize; extern const CFNumberFormatterKey kCFNumberFormatterSecondaryGroupingSize; extern const CFNumberFormatterKey kCFNumberFormatterRoundingMode; extern const CFNumberFormatterKey kCFNumberFormatterRoundingIncrement; extern const CFNumberFormatterKey kCFNumberFormatterFormatWidth; extern const CFNumberFormatterKey kCFNumberFormatterPaddingPosition; extern const CFNumberFormatterKey kCFNumberFormatterPaddingCharacter; extern const CFNumberFormatterKey kCFNumberFormatterDefaultFormat; extern const CFNumberFormatterKey kCFNumberFormatterMultiplier; extern const CFNumberFormatterKey kCFNumberFormatterPositivePrefix; extern const CFNumberFormatterKey kCFNumberFormatterPositiveSuffix; extern const CFNumberFormatterKey kCFNumberFormatterNegativePrefix; extern const CFNumberFormatterKey kCFNumberFormatterNegativeSuffix; extern const CFNumberFormatterKey kCFNumberFormatterPerMillSymbol; extern const CFNumberFormatterKey kCFNumberFormatterInternationalCurrencySymbol; extern const CFNumberFormatterKey kCFNumberFormatterCurrencyGroupingSeparator __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFNumberFormatterKey kCFNumberFormatterIsLenient __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFNumberFormatterKey kCFNumberFormatterUseSignificantDigits __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFNumberFormatterKey kCFNumberFormatterMinSignificantDigits __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFNumberFormatterKey kCFNumberFormatterMaxSignificantDigits __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFIndex CFNumberFormatterRoundingMode; enum { kCFNumberFormatterRoundCeiling = 0, kCFNumberFormatterRoundFloor = 1, kCFNumberFormatterRoundDown = 2, kCFNumberFormatterRoundUp = 3, kCFNumberFormatterRoundHalfEven = 4, kCFNumberFormatterRoundHalfDown = 5, kCFNumberFormatterRoundHalfUp = 6 }; typedef CFIndex CFNumberFormatterPadPosition; enum { kCFNumberFormatterPadBeforePrefix = 0, kCFNumberFormatterPadAfterPrefix = 1, kCFNumberFormatterPadBeforeSuffix = 2, kCFNumberFormatterPadAfterSuffix = 3 }; extern Boolean CFNumberFormatterGetDecimalInfoForCurrencyCode(CFStringRef currencyCode, int32_t *defaultFractionDigits, double *roundingIncrement); } #pragma clang assume_nonnull begin extern "C" { extern const CFStringRef kCFPreferencesAnyApplication; extern const CFStringRef kCFPreferencesCurrentApplication; extern const CFStringRef kCFPreferencesAnyHost; extern const CFStringRef kCFPreferencesCurrentHost; extern const CFStringRef kCFPreferencesAnyUser; extern const CFStringRef kCFPreferencesCurrentUser; extern _Nullable CFPropertyListRef CFPreferencesCopyAppValue(CFStringRef key, CFStringRef applicationID); extern Boolean CFPreferencesGetAppBooleanValue(CFStringRef key, CFStringRef applicationID, Boolean * _Nullable keyExistsAndHasValidFormat); extern CFIndex CFPreferencesGetAppIntegerValue(CFStringRef key, CFStringRef applicationID, Boolean * _Nullable keyExistsAndHasValidFormat); extern void CFPreferencesSetAppValue(CFStringRef key, _Nullable CFPropertyListRef value, CFStringRef applicationID); extern void CFPreferencesAddSuitePreferencesToApp(CFStringRef applicationID, CFStringRef suiteID); extern void CFPreferencesRemoveSuitePreferencesFromApp(CFStringRef applicationID, CFStringRef suiteID); extern Boolean CFPreferencesAppSynchronize(CFStringRef applicationID); extern _Nullable CFPropertyListRef CFPreferencesCopyValue(CFStringRef key, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName); extern CFDictionaryRef CFPreferencesCopyMultiple(_Nullable CFArrayRef keysToFetch, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName); extern void CFPreferencesSetValue(CFStringRef key, _Nullable CFPropertyListRef value, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName); extern void CFPreferencesSetMultiple(_Nullable CFDictionaryRef keysToSet, _Nullable CFArrayRef keysToRemove, CFStringRef applicationID, CFStringRef userName, CFStringRef hostName); extern Boolean CFPreferencesSynchronize(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName); extern _Nullable CFArrayRef CFPreferencesCopyApplicationList(CFStringRef userName, CFStringRef hostName) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Unsupported API"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Unsupported API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Unsupported API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Unsupported API"))); extern _Nullable CFArrayRef CFPreferencesCopyKeyList(CFStringRef applicationID, CFStringRef userName, CFStringRef hostName); extern Boolean CFPreferencesAppValueIsForced(CFStringRef key, CFStringRef applicationID); } #pragma clang assume_nonnull end extern "C" { typedef CFIndex CFURLPathStyle; enum { kCFURLPOSIXPathStyle = 0, kCFURLHFSPathStyle __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Carbon File Manager is deprecated, use kCFURLPOSIXPathStyle where possible"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Carbon File Manager is deprecated, use kCFURLPOSIXPathStyle where possible"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Carbon File Manager is deprecated, use kCFURLPOSIXPathStyle where possible"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Carbon File Manager is deprecated, use kCFURLPOSIXPathStyle where possible"))), kCFURLWindowsPathStyle }; typedef const struct __attribute__((objc_bridge(NSURL))) __CFURL * CFURLRef; extern CFTypeID CFURLGetTypeID(void); extern CFURLRef CFURLCreateWithBytes(CFAllocatorRef allocator, const UInt8 *URLBytes, CFIndex length, CFStringEncoding encoding, CFURLRef baseURL); extern CFDataRef CFURLCreateData(CFAllocatorRef allocator, CFURLRef url, CFStringEncoding encoding, Boolean escapeWhitespace); extern CFURLRef CFURLCreateWithString(CFAllocatorRef allocator, CFStringRef URLString, CFURLRef baseURL); extern CFURLRef CFURLCreateAbsoluteURLWithBytes(CFAllocatorRef alloc, const UInt8 *relativeURLBytes, CFIndex length, CFStringEncoding encoding, CFURLRef baseURL, Boolean useCompatibilityMode); extern CFURLRef CFURLCreateWithFileSystemPath(CFAllocatorRef allocator, CFStringRef filePath, CFURLPathStyle pathStyle, Boolean isDirectory); extern CFURLRef CFURLCreateFromFileSystemRepresentation(CFAllocatorRef allocator, const UInt8 *buffer, CFIndex bufLen, Boolean isDirectory); extern CFURLRef CFURLCreateWithFileSystemPathRelativeToBase(CFAllocatorRef allocator, CFStringRef filePath, CFURLPathStyle pathStyle, Boolean isDirectory, CFURLRef baseURL); extern CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase(CFAllocatorRef allocator, const UInt8 *buffer, CFIndex bufLen, Boolean isDirectory, CFURLRef baseURL); extern Boolean CFURLGetFileSystemRepresentation(CFURLRef url, Boolean resolveAgainstBase, UInt8 *buffer, CFIndex maxBufLen); extern CFURLRef CFURLCopyAbsoluteURL(CFURLRef relativeURL); extern CFStringRef CFURLGetString(CFURLRef anURL); extern CFURLRef CFURLGetBaseURL(CFURLRef anURL); extern Boolean CFURLCanBeDecomposed(CFURLRef anURL); extern CFStringRef CFURLCopyScheme(CFURLRef anURL); extern CFStringRef CFURLCopyNetLocation(CFURLRef anURL); extern CFStringRef CFURLCopyPath(CFURLRef anURL); extern CFStringRef CFURLCopyStrictPath(CFURLRef anURL, Boolean *isAbsolute); extern CFStringRef CFURLCopyFileSystemPath(CFURLRef anURL, CFURLPathStyle pathStyle); extern Boolean CFURLHasDirectoryPath(CFURLRef anURL); extern CFStringRef CFURLCopyResourceSpecifier(CFURLRef anURL); extern CFStringRef CFURLCopyHostName(CFURLRef anURL); extern SInt32 CFURLGetPortNumber(CFURLRef anURL); extern CFStringRef CFURLCopyUserName(CFURLRef anURL); extern CFStringRef CFURLCopyPassword(CFURLRef anURL); extern CFStringRef CFURLCopyParameterString(CFURLRef anURL, CFStringRef charactersToLeaveEscaped) __attribute__((availability(macosx,introduced=10.2,deprecated=10.15,message="The CFURLCopyParameterString function is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, CFURLCopyParameterString will always return NULL, and the CFURLCopyPath(), CFURLCopyStrictPath(), and CFURLCopyFileSystemPath() functions will return the complete path including the semicolon separator and params component if the URL string contains them."))) __attribute__((availability(ios,introduced=2.0,deprecated=13.0,message="The CFURLCopyParameterString function is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, CFURLCopyParameterString will always return NULL, and the CFURLCopyPath(), CFURLCopyStrictPath(), and CFURLCopyFileSystemPath() functions will return the complete path including the semicolon separator and params component if the URL string contains them."))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="The CFURLCopyParameterString function is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, CFURLCopyParameterString will always return NULL, and the CFURLCopyPath(), CFURLCopyStrictPath(), and CFURLCopyFileSystemPath() functions will return the complete path including the semicolon separator and params component if the URL string contains them."))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="The CFURLCopyParameterString function is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, CFURLCopyParameterString will always return NULL, and the CFURLCopyPath(), CFURLCopyStrictPath(), and CFURLCopyFileSystemPath() functions will return the complete path including the semicolon separator and params component if the URL string contains them."))); extern CFStringRef CFURLCopyQueryString(CFURLRef anURL, CFStringRef charactersToLeaveEscaped); extern CFStringRef CFURLCopyFragment(CFURLRef anURL, CFStringRef charactersToLeaveEscaped); extern CFStringRef CFURLCopyLastPathComponent(CFURLRef url); extern CFStringRef CFURLCopyPathExtension(CFURLRef url); extern CFURLRef CFURLCreateCopyAppendingPathComponent(CFAllocatorRef allocator, CFURLRef url, CFStringRef pathComponent, Boolean isDirectory); extern CFURLRef CFURLCreateCopyDeletingLastPathComponent(CFAllocatorRef allocator, CFURLRef url); extern CFURLRef CFURLCreateCopyAppendingPathExtension(CFAllocatorRef allocator, CFURLRef url, CFStringRef extension); extern CFURLRef CFURLCreateCopyDeletingPathExtension(CFAllocatorRef allocator, CFURLRef url); extern CFIndex CFURLGetBytes(CFURLRef url, UInt8 *buffer, CFIndex bufferLength); typedef CFIndex CFURLComponentType; enum { kCFURLComponentScheme = 1, kCFURLComponentNetLocation = 2, kCFURLComponentPath = 3, kCFURLComponentResourceSpecifier = 4, kCFURLComponentUser = 5, kCFURLComponentPassword = 6, kCFURLComponentUserInfo = 7, kCFURLComponentHost = 8, kCFURLComponentPort = 9, kCFURLComponentParameterString = 10, kCFURLComponentQuery = 11, kCFURLComponentFragment = 12 }; extern CFRange CFURLGetByteRangeForComponent(CFURLRef url, CFURLComponentType component, CFRange *rangeIncludingSeparators); extern CFStringRef CFURLCreateStringByReplacingPercentEscapes(CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveEscaped); extern CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding(CFAllocatorRef allocator, CFStringRef origString, CFStringRef charsToLeaveEscaped, CFStringEncoding encoding) __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use [NSString stringByRemovingPercentEncoding] or CFURLCreateStringByReplacingPercentEscapes() instead, which always uses the recommended UTF-8 encoding."))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use [NSString stringByRemovingPercentEncoding] or CFURLCreateStringByReplacingPercentEscapes() instead, which always uses the recommended UTF-8 encoding."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use [NSString stringByRemovingPercentEncoding] or CFURLCreateStringByReplacingPercentEscapes() instead, which always uses the recommended UTF-8 encoding."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use [NSString stringByRemovingPercentEncoding] or CFURLCreateStringByReplacingPercentEscapes() instead, which always uses the recommended UTF-8 encoding."))); extern CFStringRef CFURLCreateStringByAddingPercentEscapes(CFAllocatorRef allocator, CFStringRef originalString, CFStringRef charactersToLeaveUnescaped, CFStringRef legalURLCharactersToBeEscaped, CFStringEncoding encoding) __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid)."))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid)."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid)."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid)."))); extern Boolean CFURLIsFileReferenceURL(CFURLRef url) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFURLRef CFURLCreateFileReferenceURL(CFAllocatorRef allocator, CFURLRef url, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFURLRef CFURLCreateFilePathURL(CFAllocatorRef allocator, CFURLRef url, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); struct FSRef; extern CFURLRef CFURLCreateFromFSRef(CFAllocatorRef allocator, const struct FSRef *fsRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); extern Boolean CFURLGetFSRef(CFURLRef url, struct FSRef *fsRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); extern Boolean CFURLCopyResourcePropertyForKey(CFURLRef url, CFStringRef key, void *propertyValueTypeRefPtr, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDictionaryRef CFURLCopyResourcePropertiesForKeys(CFURLRef url, CFArrayRef keys, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFURLSetResourcePropertyForKey(CFURLRef url, CFStringRef key, CFTypeRef propertyValue, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFURLSetResourcePropertiesForKeys(CFURLRef url, CFDictionaryRef keyedPropertyValues, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLKeysOfUnsetValuesKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFURLClearResourcePropertyCacheForKey(CFURLRef url, CFStringRef key) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFURLClearResourcePropertyCache(CFURLRef url) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFURLSetTemporaryResourcePropertyForKey(CFURLRef url, CFStringRef key, CFTypeRef propertyValue) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFURLResourceIsReachable(CFURLRef url, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLNameKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLLocalizedNameKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsRegularFileKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsDirectoryKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsSymbolicLinkKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsVolumeKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsPackageKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsApplicationKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLApplicationIsScriptableKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFURLIsSystemImmutableKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsUserImmutableKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsHiddenKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLHasHiddenExtensionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLCreationDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLContentAccessDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLContentModificationDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLAttributeModificationDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileContentIdentifierKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern const CFStringRef kCFURLMayShareFileContentKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern const CFStringRef kCFURLMayHaveExtendedAttributesKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern const CFStringRef kCFURLIsPurgeableKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern const CFStringRef kCFURLIsSparseKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern const CFStringRef kCFURLLinkCountKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLParentDirectoryURLKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeURLKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLTypeIdentifierKey __attribute__((availability(macos,introduced=10.6,deprecated=100000,message="Use NSURLContentTypeKey instead"))) __attribute__((availability(ios,introduced=4.0,deprecated=100000,message="Use NSURLContentTypeKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use NSURLContentTypeKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use NSURLContentTypeKey instead"))); extern const CFStringRef kCFURLLocalizedTypeDescriptionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLLabelNumberKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLLabelColorKey __attribute__((availability(macosx,introduced=10.6,deprecated=10.12,message="Use NSURLLabelColorKey"))) __attribute__((availability(ios,introduced=4.0,deprecated=10.0,message="Use NSURLLabelColorKey"))) __attribute__((availability(watchos,introduced=2.0,deprecated=3.0,message="Use NSURLLabelColorKey"))) __attribute__((availability(tvos,introduced=9.0,deprecated=10.0,message="Use NSURLLabelColorKey"))); extern const CFStringRef kCFURLLocalizedLabelKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLEffectiveIconKey __attribute__((availability(macosx,introduced=10.6,deprecated=10.12,message="Use NSURLEffectiveIconKey"))) __attribute__((availability(ios,introduced=4.0,deprecated=10.0,message="Use NSURLEffectiveIconKey"))) __attribute__((availability(watchos,introduced=2.0,deprecated=3.0,message="Use NSURLEffectiveIconKey"))) __attribute__((availability(tvos,introduced=9.0,deprecated=10.0,message="Use NSURLEffectiveIconKey"))); extern const CFStringRef kCFURLCustomIconKey __attribute__((availability(macosx,introduced=10.6,deprecated=10.12,message="Use NSURLCustomIconKey"))) __attribute__((availability(ios,introduced=4.0,deprecated=10.0,message="Use NSURLCustomIconKey"))) __attribute__((availability(watchos,introduced=2.0,deprecated=3.0,message="Use NSURLCustomIconKey"))) __attribute__((availability(tvos,introduced=9.0,deprecated=10.0,message="Use NSURLCustomIconKey"))); extern const CFStringRef kCFURLFileResourceIdentifierKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIdentifierKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLPreferredIOBlockSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsReadableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsWritableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsExecutableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileSecurityKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsExcludedFromBackupKey __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=5.1))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLTagNamesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFURLPathKey __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLCanonicalPathKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLIsMountTriggerKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLGenerationIdentifierKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLDocumentIdentifierKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLAddedToDirectoryDateKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLQuarantinePropertiesKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFURLFileResourceTypeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeNamedPipe __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeCharacterSpecial __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeDirectory __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeBlockSpecial __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeRegular __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeSymbolicLink __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeSocket __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileResourceTypeUnknown __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileSizeKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileAllocatedSizeKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLTotalFileSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLTotalFileAllocatedSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLIsAliasFileKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLFileProtectionKey __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern const CFStringRef kCFURLFileProtectionNone __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern const CFStringRef kCFURLFileProtectionComplete __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern const CFStringRef kCFURLFileProtectionCompleteUnlessOpen __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern const CFStringRef kCFURLFileProtectionCompleteUntilFirstUserAuthentication __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern const CFStringRef kCFURLVolumeLocalizedFormatDescriptionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeTotalCapacityKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeAvailableCapacityKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeAvailableCapacityForImportantUsageKey __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFURLVolumeAvailableCapacityForOpportunisticUsageKey __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFURLVolumeResourceCountKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsPersistentIDsKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsSymbolicLinksKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsHardLinksKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsJournalingKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsJournalingKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsSparseFilesKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsZeroRunsKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsCaseSensitiveNamesKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsCasePreservedNamesKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsRootDirectoryDatesKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsVolumeSizesKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsRenamingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsAdvisoryFileLockingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeSupportsExtendedSecurityKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsBrowsableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeMaximumFileSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsEjectableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsRemovableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsInternalKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsAutomountedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsLocalKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsReadOnlyKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeCreationDateKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeURLForRemountingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeUUIDStringKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeNameKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeLocalizedNameKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLVolumeIsEncryptedKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLVolumeIsRootFileSystemKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLVolumeSupportsCompressionKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLVolumeSupportsFileCloningKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLVolumeSupportsSwapRenamingKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLVolumeSupportsExclusiveRenamingKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern const CFStringRef kCFURLVolumeSupportsImmutableFilesKey __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern const CFStringRef kCFURLVolumeSupportsAccessPermissionsKey __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern const CFStringRef kCFURLVolumeSupportsFileProtectionKey __attribute__((availability(macosx,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern const CFStringRef kCFURLIsUbiquitousItemKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemHasUnresolvedConflictsKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemIsDownloadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.9,message="Use kCFURLUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=7.0,message="Use kCFURLUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use kCFURLUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use kCFURLUbiquitousItemDownloadingStatusKey instead"))); extern const CFStringRef kCFURLUbiquitousItemIsDownloadingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemIsUploadedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemIsUploadingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemPercentDownloadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.8,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=6.0,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead"))); extern const CFStringRef kCFURLUbiquitousItemPercentUploadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.8,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=6.0,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead"))); extern const CFStringRef kCFURLUbiquitousItemDownloadingStatusKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemDownloadingErrorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemUploadingErrorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemIsExcludedFromSyncKey __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); extern const CFStringRef kCFURLUbiquitousItemDownloadingStatusNotDownloaded __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemDownloadingStatusDownloaded __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern const CFStringRef kCFURLUbiquitousItemDownloadingStatusCurrent __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFOptionFlags CFURLBookmarkCreationOptions; enum { kCFURLBookmarkCreationMinimalBookmarkMask = ( 1UL << 9 ), kCFURLBookmarkCreationSuitableForBookmarkFile = ( 1UL << 10 ), kCFURLBookmarkCreationWithSecurityScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(macCatalyst,introduced=13.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = ( 1UL << 11 ), kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(macCatalyst,introduced=13.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = ( 1UL << 12 ), kCFURLBookmarkCreationWithoutImplicitSecurityScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1 << 29), kCFURLBookmarkCreationPreferFileIDResolutionMask __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="kCFURLBookmarkCreationPreferFileIDResolutionMask does nothing and has no effect on bookmark resolution"))) __attribute__((availability(ios,introduced=4.0,deprecated=7.0,message="kCFURLBookmarkCreationPreferFileIDResolutionMask does nothing and has no effect on bookmark resolution"))) = ( 1UL << 8 ), } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFOptionFlags CFURLBookmarkResolutionOptions; enum { kCFURLBookmarkResolutionWithoutUIMask = ( 1UL << 8 ), kCFURLBookmarkResolutionWithoutMountingMask = ( 1UL << 9 ), kCFURLBookmarkResolutionWithSecurityScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(macCatalyst,introduced=13.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = ( 1UL << 10 ), kCFURLBookmarkResolutionWithoutImplicitStartAccessing __attribute__((availability(macos,introduced=11.2))) __attribute__((availability(ios,introduced=14.2))) __attribute__((availability(watchos,introduced=7.2))) __attribute__((availability(tvos,introduced=14.2))) = ( 1 << 15 ), kCFBookmarkResolutionWithoutUIMask = kCFURLBookmarkResolutionWithoutUIMask, kCFBookmarkResolutionWithoutMountingMask = kCFURLBookmarkResolutionWithoutMountingMask, } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFOptionFlags CFURLBookmarkFileCreationOptions; extern CFDataRef CFURLCreateBookmarkData ( CFAllocatorRef allocator, CFURLRef url, CFURLBookmarkCreationOptions options, CFArrayRef resourcePropertiesToInclude, CFURLRef relativeToURL, CFErrorRef* error ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFURLRef CFURLCreateByResolvingBookmarkData ( CFAllocatorRef allocator, CFDataRef bookmark, CFURLBookmarkResolutionOptions options, CFURLRef relativeToURL, CFArrayRef resourcePropertiesToInclude, Boolean* isStale, CFErrorRef* error ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData ( CFAllocatorRef allocator, CFArrayRef resourcePropertiesToReturn, CFDataRef bookmark ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( CFAllocatorRef allocator, CFStringRef resourcePropertyKey, CFDataRef bookmark ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDataRef CFURLCreateBookmarkDataFromFile(CFAllocatorRef allocator, CFURLRef fileURL, CFErrorRef *errorRef ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFURLWriteBookmarkDataToFile( CFDataRef bookmarkRef, CFURLRef fileURL, CFURLBookmarkFileCreationOptions options, CFErrorRef *errorRef ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDataRef CFURLCreateBookmarkDataFromAliasRecord ( CFAllocatorRef allocatorRef, CFDataRef aliasRecordDataRef ) __attribute__((availability(macos,introduced=10.6,deprecated=11.0,message="The Carbon Alias Manager is deprecated. This function should only be used to convert Carbon AliasRecords to bookmark data."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern Boolean CFURLStartAccessingSecurityScopedResource(CFURLRef url) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFURLStopAccessingSecurityScopedResource(CFURLRef url) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } typedef unsigned int boolean_t; typedef __darwin_natural_t natural_t; typedef int integer_t; typedef uintptr_t vm_offset_t ; typedef uintptr_t vm_size_t; typedef uint64_t mach_vm_address_t ; typedef uint64_t mach_vm_offset_t ; typedef uint64_t mach_vm_size_t; typedef uint64_t vm_map_offset_t ; typedef uint64_t vm_map_address_t ; typedef uint64_t vm_map_size_t; typedef mach_vm_address_t mach_port_context_t; typedef natural_t mach_port_name_t; typedef mach_port_name_t *mach_port_name_array_t; typedef __darwin_mach_port_t mach_port_t; typedef mach_port_t *mach_port_array_t; typedef natural_t mach_port_right_t; typedef natural_t mach_port_type_t; typedef mach_port_type_t *mach_port_type_array_t; typedef natural_t mach_port_urefs_t; typedef integer_t mach_port_delta_t; typedef natural_t mach_port_seqno_t; typedef natural_t mach_port_mscount_t; typedef natural_t mach_port_msgcount_t; typedef natural_t mach_port_rights_t; typedef unsigned int mach_port_srights_t; typedef struct mach_port_status { mach_port_rights_t mps_pset; mach_port_seqno_t mps_seqno; mach_port_mscount_t mps_mscount; mach_port_msgcount_t mps_qlimit; mach_port_msgcount_t mps_msgcount; mach_port_rights_t mps_sorights; boolean_t mps_srights; boolean_t mps_pdrequest; boolean_t mps_nsrequest; natural_t mps_flags; } mach_port_status_t; typedef struct mach_port_limits { mach_port_msgcount_t mpl_qlimit; } mach_port_limits_t; typedef struct mach_port_info_ext { mach_port_status_t mpie_status; mach_port_msgcount_t mpie_boost_cnt; uint32_t reserved[6]; } mach_port_info_ext_t; typedef struct mach_port_guard_info { uint64_t mpgi_guard; } mach_port_guard_info_t; typedef integer_t *mach_port_info_t; typedef int mach_port_flavor_t; typedef struct mach_port_qos { unsigned int name:1; unsigned int prealloc:1; boolean_t pad1:30; natural_t len; } mach_port_qos_t; typedef struct mach_service_port_info { char mspi_string_name[255]; uint8_t mspi_domain_type; } mach_service_port_info_data_t; typedef struct mach_service_port_info * mach_service_port_info_t; typedef struct mach_port_options { uint32_t flags; mach_port_limits_t mpl; union { uint64_t reserved[2]; mach_port_name_t work_interval_port; mach_service_port_info_t service_port_info; mach_port_name_t service_port_name; }; }mach_port_options_t; typedef mach_port_options_t *mach_port_options_ptr_t; enum mach_port_guard_exception_codes { kGUARD_EXC_DESTROY = 1u << 0, kGUARD_EXC_MOD_REFS = 1u << 1, kGUARD_EXC_SET_CONTEXT = 1u << 2, kGUARD_EXC_UNGUARDED = 1u << 3, kGUARD_EXC_INCORRECT_GUARD = 1u << 4, kGUARD_EXC_IMMOVABLE = 1u << 5, kGUARD_EXC_STRICT_REPLY = 1u << 6, kGUARD_EXC_MSG_FILTERED = 1u << 7, kGUARD_EXC_INVALID_RIGHT = 1u << 8, kGUARD_EXC_INVALID_NAME = 1u << 9, kGUARD_EXC_INVALID_VALUE = 1u << 10, kGUARD_EXC_INVALID_ARGUMENT = 1u << 11, kGUARD_EXC_RIGHT_EXISTS = 1u << 12, kGUARD_EXC_KERN_NO_SPACE = 1u << 13, kGUARD_EXC_KERN_FAILURE = 1u << 14, kGUARD_EXC_KERN_RESOURCE = 1u << 15, kGUARD_EXC_SEND_INVALID_REPLY = 1u << 16, kGUARD_EXC_SEND_INVALID_VOUCHER = 1u << 17, kGUARD_EXC_SEND_INVALID_RIGHT = 1u << 18, kGUARD_EXC_RCV_INVALID_NAME = 1u << 19, kGUARD_EXC_RCV_GUARDED_DESC = 1u << 20, kGUARD_EXC_MOD_REFS_NON_FATAL = 1u << 21, kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22, }; extern "C" { typedef CFStringRef CFRunLoopMode __attribute__((swift_wrapper(struct))); typedef struct __attribute__((objc_bridge_mutable(id))) __CFRunLoop * CFRunLoopRef; typedef struct __attribute__((objc_bridge_mutable(id))) __CFRunLoopSource * CFRunLoopSourceRef; typedef struct __attribute__((objc_bridge_mutable(id))) __CFRunLoopObserver * CFRunLoopObserverRef; typedef struct __attribute__((objc_bridge_mutable(NSTimer))) __CFRunLoopTimer * CFRunLoopTimerRef; typedef SInt32 CFRunLoopRunResult; enum { kCFRunLoopRunFinished = 1, kCFRunLoopRunStopped = 2, kCFRunLoopRunTimedOut = 3, kCFRunLoopRunHandledSource = 4 }; typedef CFOptionFlags CFRunLoopActivity; enum { kCFRunLoopEntry = (1UL << 0), kCFRunLoopBeforeTimers = (1UL << 1), kCFRunLoopBeforeSources = (1UL << 2), kCFRunLoopBeforeWaiting = (1UL << 5), kCFRunLoopAfterWaiting = (1UL << 6), kCFRunLoopExit = (1UL << 7), kCFRunLoopAllActivities = 0x0FFFFFFFU }; extern const CFRunLoopMode kCFRunLoopDefaultMode; extern const CFRunLoopMode kCFRunLoopCommonModes; extern CFTypeID CFRunLoopGetTypeID(void); extern CFRunLoopRef CFRunLoopGetCurrent(void); extern CFRunLoopRef CFRunLoopGetMain(void); extern CFRunLoopMode CFRunLoopCopyCurrentMode(CFRunLoopRef rl); extern CFArrayRef CFRunLoopCopyAllModes(CFRunLoopRef rl); extern void CFRunLoopAddCommonMode(CFRunLoopRef rl, CFRunLoopMode mode); extern CFAbsoluteTime CFRunLoopGetNextTimerFireDate(CFRunLoopRef rl, CFRunLoopMode mode); extern void CFRunLoopRun(void); extern CFRunLoopRunResult CFRunLoopRunInMode(CFRunLoopMode mode, CFTimeInterval seconds, Boolean returnAfterSourceHandled); extern Boolean CFRunLoopIsWaiting(CFRunLoopRef rl); extern void CFRunLoopWakeUp(CFRunLoopRef rl); extern void CFRunLoopStop(CFRunLoopRef rl); extern void CFRunLoopPerformBlock(CFRunLoopRef rl, CFTypeRef mode, void (*block)(void)) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFRunLoopContainsSource(CFRunLoopRef rl, CFRunLoopSourceRef source, CFRunLoopMode mode); extern void CFRunLoopAddSource(CFRunLoopRef rl, CFRunLoopSourceRef source, CFRunLoopMode mode); extern void CFRunLoopRemoveSource(CFRunLoopRef rl, CFRunLoopSourceRef source, CFRunLoopMode mode); extern Boolean CFRunLoopContainsObserver(CFRunLoopRef rl, CFRunLoopObserverRef observer, CFRunLoopMode mode); extern void CFRunLoopAddObserver(CFRunLoopRef rl, CFRunLoopObserverRef observer, CFRunLoopMode mode); extern void CFRunLoopRemoveObserver(CFRunLoopRef rl, CFRunLoopObserverRef observer, CFRunLoopMode mode); extern Boolean CFRunLoopContainsTimer(CFRunLoopRef rl, CFRunLoopTimerRef timer, CFRunLoopMode mode); extern void CFRunLoopAddTimer(CFRunLoopRef rl, CFRunLoopTimerRef timer, CFRunLoopMode mode); extern void CFRunLoopRemoveTimer(CFRunLoopRef rl, CFRunLoopTimerRef timer, CFRunLoopMode mode); typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); Boolean (*equal)(const void *info1, const void *info2); CFHashCode (*hash)(const void *info); void (*schedule)(void *info, CFRunLoopRef rl, CFRunLoopMode mode); void (*cancel)(void *info, CFRunLoopRef rl, CFRunLoopMode mode); void (*perform)(void *info); } CFRunLoopSourceContext; typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); Boolean (*equal)(const void *info1, const void *info2); CFHashCode (*hash)(const void *info); mach_port_t (*getPort)(void *info); void * (*perform)(void *msg, CFIndex size, CFAllocatorRef allocator, void *info); } CFRunLoopSourceContext1; extern CFTypeID CFRunLoopSourceGetTypeID(void); extern CFRunLoopSourceRef CFRunLoopSourceCreate(CFAllocatorRef allocator, CFIndex order, CFRunLoopSourceContext *context); extern CFIndex CFRunLoopSourceGetOrder(CFRunLoopSourceRef source); extern void CFRunLoopSourceInvalidate(CFRunLoopSourceRef source); extern Boolean CFRunLoopSourceIsValid(CFRunLoopSourceRef source); extern void CFRunLoopSourceGetContext(CFRunLoopSourceRef source, CFRunLoopSourceContext *context); extern void CFRunLoopSourceSignal(CFRunLoopSourceRef source); typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); } CFRunLoopObserverContext; typedef void (*CFRunLoopObserverCallBack)(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *info); extern CFTypeID CFRunLoopObserverGetTypeID(void); extern CFRunLoopObserverRef CFRunLoopObserverCreate(CFAllocatorRef allocator, CFOptionFlags activities, Boolean repeats, CFIndex order, CFRunLoopObserverCallBack callout, CFRunLoopObserverContext *context); extern CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler(CFAllocatorRef allocator, CFOptionFlags activities, Boolean repeats, CFIndex order, void (*block) (CFRunLoopObserverRef observer, CFRunLoopActivity activity)) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFOptionFlags CFRunLoopObserverGetActivities(CFRunLoopObserverRef observer); extern Boolean CFRunLoopObserverDoesRepeat(CFRunLoopObserverRef observer); extern CFIndex CFRunLoopObserverGetOrder(CFRunLoopObserverRef observer); extern void CFRunLoopObserverInvalidate(CFRunLoopObserverRef observer); extern Boolean CFRunLoopObserverIsValid(CFRunLoopObserverRef observer); extern void CFRunLoopObserverGetContext(CFRunLoopObserverRef observer, CFRunLoopObserverContext *context); typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); } CFRunLoopTimerContext; typedef void (*CFRunLoopTimerCallBack)(CFRunLoopTimerRef timer, void *info); extern CFTypeID CFRunLoopTimerGetTypeID(void); extern CFRunLoopTimerRef CFRunLoopTimerCreate(CFAllocatorRef allocator, CFAbsoluteTime fireDate, CFTimeInterval interval, CFOptionFlags flags, CFIndex order, CFRunLoopTimerCallBack callout, CFRunLoopTimerContext *context); extern CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler(CFAllocatorRef allocator, CFAbsoluteTime fireDate, CFTimeInterval interval, CFOptionFlags flags, CFIndex order, void (*block) (CFRunLoopTimerRef timer)) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFAbsoluteTime CFRunLoopTimerGetNextFireDate(CFRunLoopTimerRef timer); extern void CFRunLoopTimerSetNextFireDate(CFRunLoopTimerRef timer, CFAbsoluteTime fireDate); extern CFTimeInterval CFRunLoopTimerGetInterval(CFRunLoopTimerRef timer); extern Boolean CFRunLoopTimerDoesRepeat(CFRunLoopTimerRef timer); extern CFIndex CFRunLoopTimerGetOrder(CFRunLoopTimerRef timer); extern void CFRunLoopTimerInvalidate(CFRunLoopTimerRef timer); extern Boolean CFRunLoopTimerIsValid(CFRunLoopTimerRef timer); extern void CFRunLoopTimerGetContext(CFRunLoopTimerRef timer, CFRunLoopTimerContext *context); extern CFTimeInterval CFRunLoopTimerGetTolerance(CFRunLoopTimerRef timer) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFRunLoopTimerSetTolerance(CFRunLoopTimerRef timer, CFTimeInterval tolerance) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef struct __attribute__((objc_bridge_mutable(id))) __CFSocket * CFSocketRef; typedef CFIndex CFSocketError; enum { kCFSocketSuccess = 0, kCFSocketError = -1L, kCFSocketTimeout = -2L }; typedef struct { SInt32 protocolFamily; SInt32 socketType; SInt32 protocol; CFDataRef address; } CFSocketSignature; typedef CFOptionFlags CFSocketCallBackType; enum { kCFSocketNoCallBack = 0, kCFSocketReadCallBack = 1, kCFSocketAcceptCallBack = 2, kCFSocketDataCallBack = 3, kCFSocketConnectCallBack = 4, kCFSocketWriteCallBack = 8 }; enum { kCFSocketAutomaticallyReenableReadCallBack = 1, kCFSocketAutomaticallyReenableAcceptCallBack = 2, kCFSocketAutomaticallyReenableDataCallBack = 3, kCFSocketAutomaticallyReenableWriteCallBack = 8, kCFSocketLeaveErrors __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 64, kCFSocketCloseOnInvalidate = 128 }; typedef void (*CFSocketCallBack)(CFSocketRef s, CFSocketCallBackType type, CFDataRef address, const void *data, void *info); typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); } CFSocketContext; typedef int CFSocketNativeHandle; extern CFTypeID CFSocketGetTypeID(void); extern CFSocketRef CFSocketCreate(CFAllocatorRef allocator, SInt32 protocolFamily, SInt32 socketType, SInt32 protocol, CFOptionFlags callBackTypes, CFSocketCallBack callout, const CFSocketContext *context); extern CFSocketRef CFSocketCreateWithNative(CFAllocatorRef allocator, CFSocketNativeHandle sock, CFOptionFlags callBackTypes, CFSocketCallBack callout, const CFSocketContext *context); extern CFSocketRef CFSocketCreateWithSocketSignature(CFAllocatorRef allocator, const CFSocketSignature *signature, CFOptionFlags callBackTypes, CFSocketCallBack callout, const CFSocketContext *context); extern CFSocketRef CFSocketCreateConnectedToSocketSignature(CFAllocatorRef allocator, const CFSocketSignature *signature, CFOptionFlags callBackTypes, CFSocketCallBack callout, const CFSocketContext *context, CFTimeInterval timeout); extern CFSocketError CFSocketSetAddress(CFSocketRef s, CFDataRef address); extern CFSocketError CFSocketConnectToAddress(CFSocketRef s, CFDataRef address, CFTimeInterval timeout); extern void CFSocketInvalidate(CFSocketRef s); extern Boolean CFSocketIsValid(CFSocketRef s); extern CFDataRef CFSocketCopyAddress(CFSocketRef s); extern CFDataRef CFSocketCopyPeerAddress(CFSocketRef s); extern void CFSocketGetContext(CFSocketRef s, CFSocketContext *context); extern CFSocketNativeHandle CFSocketGetNative(CFSocketRef s); extern CFRunLoopSourceRef CFSocketCreateRunLoopSource(CFAllocatorRef allocator, CFSocketRef s, CFIndex order); extern CFOptionFlags CFSocketGetSocketFlags(CFSocketRef s); extern void CFSocketSetSocketFlags(CFSocketRef s, CFOptionFlags flags); extern void CFSocketDisableCallBacks(CFSocketRef s, CFOptionFlags callBackTypes); extern void CFSocketEnableCallBacks(CFSocketRef s, CFOptionFlags callBackTypes); extern CFSocketError CFSocketSendData(CFSocketRef s, CFDataRef address, CFDataRef data, CFTimeInterval timeout); extern CFSocketError CFSocketRegisterValue(const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, CFPropertyListRef value); extern CFSocketError CFSocketCopyRegisteredValue(const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, CFPropertyListRef *value, CFDataRef *nameServerAddress); extern CFSocketError CFSocketRegisterSocketSignature(const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, const CFSocketSignature *signature); extern CFSocketError CFSocketCopyRegisteredSocketSignature(const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name, CFSocketSignature *signature, CFDataRef *nameServerAddress); extern CFSocketError CFSocketUnregister(const CFSocketSignature *nameServerSignature, CFTimeInterval timeout, CFStringRef name); extern void CFSocketSetDefaultNameRegistryPortNumber(UInt16 port); extern UInt16 CFSocketGetDefaultNameRegistryPortNumber(void); extern const CFStringRef kCFSocketCommandKey; extern const CFStringRef kCFSocketNameKey; extern const CFStringRef kCFSocketValueKey; extern const CFStringRef kCFSocketResultKey; extern const CFStringRef kCFSocketErrorKey; extern const CFStringRef kCFSocketRegisterCommand; extern const CFStringRef kCFSocketRetrieveCommand; } typedef void (*os_function_t)(void *_Nullable); typedef void (*os_block_t)(void); struct accessx_descriptor { unsigned int ad_name_offset; int ad_flags; int ad_pad[2]; }; extern "C" { int getattrlistbulk(int, void *, void *, size_t, uint64_t) __attribute__((availability(macosx,introduced=10.10))); int getattrlistat(int, const char *, void *, void *, size_t, unsigned long) __attribute__((availability(macosx,introduced=10.10))); int setattrlistat(int, const char *, void *, void *, size_t, uint32_t) __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); } extern "C" { int faccessat(int, const char *, int, int) __attribute__((availability(macosx,introduced=10.10))); int fchownat(int, const char *, uid_t, gid_t, int) __attribute__((availability(macosx,introduced=10.10))); int linkat(int, const char *, int, const char *, int) __attribute__((availability(macosx,introduced=10.10))); ssize_t readlinkat(int, const char *, char *, size_t) __attribute__((availability(macosx,introduced=10.10))); int symlinkat(const char *, int, const char *) __attribute__((availability(macosx,introduced=10.10))); int unlinkat(int, const char *, int) __attribute__((availability(macosx,introduced=10.10))); } extern "C" { void _exit(int) __attribute__((__noreturn__)); int access(const char *, int); unsigned int alarm(unsigned int); int chdir(const char *); int chown(const char *, uid_t, gid_t); int close(int) __asm("_" "close" ); int dup(int); int dup2(int, int); int execl(const char * __path, const char * __arg0, ...) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int execle(const char * __path, const char * __arg0, ...) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int execlp(const char * __file, const char * __arg0, ...) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int execv(const char * __path, char * const * __argv) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int execve(const char * __file, char * const * __argv, char * const * __envp) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int execvp(const char * __file, char * const * __argv) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); pid_t fork(void) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); long fpathconf(int, int); char *getcwd(char *, size_t); gid_t getegid(void); uid_t geteuid(void); gid_t getgid(void); int getgroups(int, gid_t []); char *getlogin(void); pid_t getpgrp(void); pid_t getpid(void); pid_t getppid(void); uid_t getuid(void); int isatty(int); int link(const char *, const char *); off_t lseek(int, off_t, int); long pathconf(const char *, int); int pause(void) __asm("_" "pause" ); int pipe(int [2]); ssize_t read(int, void *, size_t) __asm("_" "read" ); int rmdir(const char *); int setgid(gid_t); int setpgid(pid_t, pid_t); pid_t setsid(void); int setuid(uid_t); unsigned int sleep(unsigned int) __asm("_" "sleep" ); long sysconf(int); pid_t tcgetpgrp(int); int tcsetpgrp(int, pid_t); char *ttyname(int); int ttyname_r(int, char *, size_t) __asm("_" "ttyname_r" ); int unlink(const char *); ssize_t write(int __fd, const void * __buf, size_t __nbyte) __asm("_" "write" ); } extern "C" { size_t confstr(int, char *, size_t) __asm("_" "confstr" ); int getopt(int, char * const [], const char *) __asm("_" "getopt" ); extern char *optarg; extern int optind, opterr, optopt; } extern "C" { __attribute__((__deprecated__)) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) void *brk(const void *); int chroot(const char *) ; char *crypt(const char *, const char *); void encrypt(char *, int) __asm("_" "encrypt" ); int fchdir(int); long gethostid(void); pid_t getpgid(pid_t); pid_t getsid(pid_t); int getdtablesize(void) ; int getpagesize(void) __attribute__((__const__)) ; char *getpass(const char *) ; char *getwd(char *) ; int lchown(const char *, uid_t, gid_t) __asm("_" "lchown" ); int lockf(int, int, off_t) __asm("_" "lockf" ); int nice(int) __asm("_" "nice" ); ssize_t pread(int __fd, void * __buf, size_t __nbyte, off_t __offset) __asm("_" "pread" ); ssize_t pwrite(int __fd, const void * __buf, size_t __nbyte, off_t __offset) __asm("_" "pwrite" ); __attribute__((__deprecated__)) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) void *sbrk(int); pid_t setpgrp(void) __asm("_" "setpgrp" ); int setregid(gid_t, gid_t) __asm("_" "setregid" ); int setreuid(uid_t, uid_t) __asm("_" "setreuid" ); void swab(const void * , void * , ssize_t); void sync(void); int truncate(const char *, off_t); useconds_t ualarm(useconds_t, useconds_t); int usleep(useconds_t) __asm("_" "usleep" ); __attribute__((__deprecated__("Use posix_spawn or fork"))) pid_t vfork(void) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int fsync(int) __asm("_" "fsync" ); int ftruncate(int, off_t); int getlogin_r(char *, size_t); } extern "C" { int fchown(int, uid_t, gid_t); int gethostname(char *, size_t); ssize_t readlink(const char * , char * , size_t); int setegid(gid_t); int seteuid(uid_t); int symlink(const char *, const char *); } extern "C" { int pselect(int, fd_set * , fd_set * , fd_set * , const struct timespec * , const sigset_t * ) __asm("_" "pselect" "$1050") ; int select(int, fd_set * , fd_set * , fd_set * , struct timeval * ) __asm("_" "select" "$1050") ; } typedef __darwin_uuid_t uuid_t; extern "C" { void _Exit(int) __attribute__((__noreturn__)); int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); int acct(const char *); int add_profil(char *, size_t, unsigned long, unsigned int) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); void endusershell(void); int execvP(const char * __file, const char * __searchpath, char * const * __argv) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); char *fflagstostr(unsigned long); int getdomainname(char *, int); int getgrouplist(const char *, int, int *, int *); int gethostuuid(uuid_t, const struct timespec *) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); mode_t getmode(const void *, mode_t); int getpeereid(int, uid_t *, gid_t *); int getsgroups_np(int *, uuid_t); char *getusershell(void); int getwgroups_np(int *, uuid_t); int initgroups(const char *, int); int issetugid(void); char *mkdtemp(char *); int mknod(const char *, mode_t, dev_t); int mkpath_np(const char *path, mode_t omode) __attribute__((availability(macosx,introduced=10.8))); int mkpathat_np(int dfd, const char *path, mode_t omode) __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); int mkstemp(char *); int mkstemps(char *, int); char *mktemp(char *); int mkostemp(char *path, int oflags) __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); int mkostemps(char *path, int slen, int oflags) __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); int mkstemp_dprotected_np(char *path, int dpclass, int dpflags) __attribute__((availability(macosx,unavailable))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); char *mkdtempat_np(int dfd, char *path) __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); int mkstempsat_np(int dfd, char *path, int slen) __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); int mkostempsat_np(int dfd, char *path, int slen, int oflags) __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); int nfssvc(int, void *); int profil(char *, size_t, unsigned long, unsigned int); __attribute__((__deprecated__("Use of per-thread security contexts is error-prone and discouraged."))) int pthread_setugid_np(uid_t, gid_t); int pthread_getugid_np( uid_t *, gid_t *); int reboot(int); int revoke(const char *); __attribute__((__deprecated__)) int rcmd(char **, int, const char *, const char *, const char *, int *); __attribute__((__deprecated__)) int rcmd_af(char **, int, const char *, const char *, const char *, int *, int); __attribute__((__deprecated__)) int rresvport(int *); __attribute__((__deprecated__)) int rresvport_af(int *, int); __attribute__((__deprecated__)) int iruserok(unsigned long, int, const char *, const char *); __attribute__((__deprecated__)) int iruserok_sa(const void *, int, int, const char *, const char *); __attribute__((__deprecated__)) int ruserok(const char *, int, const char *, const char *); int setdomainname(const char *, int); int setgroups(int, const gid_t *); void sethostid(long); int sethostname(const char *, int); void setkey(const char *) __asm("_" "setkey" ); int setlogin(const char *); void *setmode(const char *) __asm("_" "setmode" ); int setrgid(gid_t); int setruid(uid_t); int setsgroups_np(int, const uuid_t); void setusershell(void); int setwgroups_np(int, const uuid_t); int strtofflags(char **, unsigned long *, unsigned long *); int swapon(const char *); int ttyslot(void); int undelete(const char *); int unwhiteout(const char *); void *valloc(size_t); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(ios,deprecated=10.0,message="syscall(2) is unsupported; " "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost()."))) __attribute__((availability(macosx,deprecated=10.12,message="syscall(2) is unsupported; " "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost()."))) int syscall(int, ...); extern char *suboptarg; int getsubopt(char **, char * const *, char **); int fgetattrlist(int,void*,void*,size_t,unsigned int) __attribute__((availability(macosx,introduced=10.6))); int fsetattrlist(int,void*,void*,size_t,unsigned int) __attribute__((availability(macosx,introduced=10.6))); int getattrlist(const char*,void*,void*,size_t,unsigned int) __asm("_" "getattrlist" ); int setattrlist(const char*,void*,void*,size_t,unsigned int) __asm("_" "setattrlist" ); int exchangedata(const char*,const char*,unsigned int) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); struct fssearchblock; struct searchstate; int searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); int fsctl(const char *,unsigned long,void*,unsigned int); int ffsctl(int,unsigned long,void*,unsigned int) __attribute__((availability(macosx,introduced=10.6))); int fsync_volume_np(int, int) __attribute__((availability(macosx,introduced=10.8))); int sync_volume_np(const char *, int) __attribute__((availability(macosx,introduced=10.8))); extern int optreset; } struct flock { off_t l_start; off_t l_len; pid_t l_pid; short l_type; short l_whence; }; struct flocktimeout { struct flock fl; struct timespec timeout; }; struct radvisory { off_t ra_offset; int ra_count; }; typedef struct fsignatures { off_t fs_file_start; void *fs_blob_start; size_t fs_blob_size; size_t fs_fsignatures_size; char fs_cdhash[20]; int fs_hash_type; } fsignatures_t; typedef struct fsupplement { off_t fs_file_start; off_t fs_blob_start; size_t fs_blob_size; int fs_orig_fd; } fsupplement_t; typedef struct fchecklv { off_t lv_file_start; size_t lv_error_message_size; void *lv_error_message; } fchecklv_t; typedef struct fgetsigsinfo { off_t fg_file_start; int fg_info_request; int fg_sig_is_platform; } fgetsigsinfo_t; typedef struct fstore { unsigned int fst_flags; int fst_posmode; off_t fst_offset; off_t fst_length; off_t fst_bytesalloc; } fstore_t; typedef struct fpunchhole { unsigned int fp_flags; unsigned int reserved; off_t fp_offset; off_t fp_length; } fpunchhole_t; typedef struct ftrimactivefile { off_t fta_offset; off_t fta_length; } ftrimactivefile_t; typedef struct fspecread { unsigned int fsr_flags; unsigned int reserved; off_t fsr_offset; off_t fsr_length; } fspecread_t; typedef struct fbootstraptransfer { off_t fbt_offset; size_t fbt_length; void *fbt_buffer; } fbootstraptransfer_t; #pragma pack(4) struct log2phys { unsigned int l2p_flags; off_t l2p_contigbytes; off_t l2p_devoffset; }; #pragma pack() struct _filesec; typedef struct _filesec *filesec_t; typedef enum { FILESEC_OWNER = 1, FILESEC_GROUP = 2, FILESEC_UUID = 3, FILESEC_MODE = 4, FILESEC_ACL = 5, FILESEC_GRPUUID = 6, FILESEC_ACL_RAW = 100, FILESEC_ACL_ALLOCSIZE = 101 } filesec_property_t; extern "C" { int open(const char *, int, ...) __asm("_" "open" ); int openat(int, const char *, int, ...) __asm("_" "openat" ) __attribute__((availability(macosx,introduced=10.10))); int creat(const char *, mode_t) __asm("_" "creat" ); int fcntl(int, int, ...) __asm("_" "fcntl" ); int openx_np(const char *, int, filesec_t); int open_dprotected_np( const char *, int, int, int, ...); int flock(int, int); filesec_t filesec_init(void); filesec_t filesec_dup(filesec_t); void filesec_free(filesec_t); int filesec_get_property(filesec_t, filesec_property_t, void *); int filesec_query_property(filesec_t, filesec_property_t, int *); int filesec_set_property(filesec_t, filesec_property_t, const void *); int filesec_unset_property(filesec_t, filesec_property_t) __attribute__((availability(macosx,introduced=10.6))); } typedef struct objc_class *Class; struct objc_object { Class _Nonnull isa __attribute__((deprecated)); }; typedef struct objc_object *id; typedef struct objc_selector *SEL; typedef void (*IMP)(void ); typedef signed char BOOL; extern "C" __attribute__((visibility("default"))) const char * _Nonnull sel_getName(SEL _Nonnull sel) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern "C" __attribute__((visibility("default"))) SEL _Nonnull sel_registerName(const char * _Nonnull str) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern "C" __attribute__((visibility("default"))) const char * _Nonnull object_getClassName(id _Nullable obj) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern "C" __attribute__((visibility("default"))) void * _Nullable object_getIndexedIvars(id _Nullable obj) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern "C" __attribute__((visibility("default"))) BOOL sel_isMapped(SEL _Nonnull sel) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern "C" __attribute__((visibility("default"))) SEL _Nonnull sel_getUid(const char * _Nonnull str) __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); typedef const void* objc_objectptr_t; extern "C" __attribute__((visibility("default"))) id _Nullable objc_retainedObject(objc_objectptr_t _Nullable obj) __attribute__((unavailable("use CFBridgingRelease() or a (__bridge_transfer id) cast instead"))) ; extern "C" __attribute__((visibility("default"))) id _Nullable objc_unretainedObject(objc_objectptr_t _Nullable obj) __attribute__((unavailable("use a (__bridge id) cast instead"))) ; extern "C" __attribute__((visibility("default"))) objc_objectptr_t _Nullable objc_unretainedPointer(id _Nullable obj) __attribute__((unavailable("use a __bridge cast instead"))) ; typedef long NSInteger; typedef unsigned long NSUInteger; // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSMethodSignature #define _REWRITER_typedef_NSMethodSignature typedef struct objc_object NSMethodSignature; typedef struct {} _objc_exc_NSMethodSignature; #endif #ifndef _REWRITER_typedef_NSInvocation #define _REWRITER_typedef_NSInvocation typedef struct objc_object NSInvocation; typedef struct {} _objc_exc_NSInvocation; #endif // @protocol NSObject // - (BOOL)isEqual:(id)object; // @property (readonly) NSUInteger hash; // @property (readonly) Class superclass; // - (Class)class __attribute__((availability(swift, unavailable, message="use 'type(of: anObject)' instead"))); // - (instancetype)self; // - (id)performSelector:(SEL)aSelector; // - (id)performSelector:(SEL)aSelector withObject:(id)object; // - (id)performSelector:(SEL)aSelector withObject:(id)object1 withObject:(id)object2; // - (BOOL)isProxy; // - (BOOL)isKindOfClass:(Class)aClass; // - (BOOL)isMemberOfClass:(Class)aClass; // - (BOOL)conformsToProtocol:(Protocol *)aProtocol; // - (BOOL)respondsToSelector:(SEL)aSelector; // - (instancetype)retain ; // - (oneway void)release ; // - (instancetype)autorelease ; // - (NSUInteger)retainCount ; // - (struct _NSZone *)zone ; // @property (readonly, copy) NSString *description; /* @optional */ // @property (readonly, copy) NSString *debugDescription; /* @end */ __attribute__((availability(macosx,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))) __attribute__((objc_root_class)) extern "C" __attribute__((visibility("default"))) #ifndef _REWRITER_typedef_NSObject #define _REWRITER_typedef_NSObject typedef struct objc_object NSObject; typedef struct {} _objc_exc_NSObject; #endif struct NSObject_IMPL { Class isa; }; // + (void)load; // + (void)initialize; #if 0 - (instancetype)init __attribute__((objc_designated_initializer)) ; #endif // + (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead"))); // + (instancetype)allocWithZone:(struct _NSZone *)zone __attribute__((availability(swift, unavailable, message="use object initializers instead"))); // + (instancetype)alloc __attribute__((availability(swift, unavailable, message="use object initializers instead"))); // - (void)dealloc __attribute__((availability(swift, unavailable, message="use 'deinit' to define a de-initializer"))); // - (void)finalize __attribute__((deprecated("Objective-C garbage collection is no longer supported"))); // - (id)copy; // - (id)mutableCopy; // + (id)copyWithZone:(struct _NSZone *)zone ; // + (id)mutableCopyWithZone:(struct _NSZone *)zone ; // + (BOOL)instancesRespondToSelector:(SEL)aSelector; // + (BOOL)conformsToProtocol:(Protocol *)protocol; // - (IMP)methodForSelector:(SEL)aSelector; // + (IMP)instanceMethodForSelector:(SEL)aSelector; // - (void)doesNotRecognizeSelector:(SEL)aSelector; // - (id)forwardingTargetForSelector:(SEL)aSelector __attribute__((availability(macosx,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); // - (void)forwardInvocation:(NSInvocation *)anInvocation __attribute__((availability(swift, unavailable, message=""))); // - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector __attribute__((availability(swift, unavailable, message=""))); // + (NSMethodSignature *)instanceMethodSignatureForSelector:(SEL)aSelector __attribute__((availability(swift, unavailable, message=""))); // - (BOOL)allowsWeakReference __attribute__((unavailable)); // - (BOOL)retainWeakReference __attribute__((unavailable)); // + (BOOL)isSubclassOfClass:(Class)aClass; // + (BOOL)resolveClassMethod:(SEL)sel __attribute__((availability(macosx,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); // + (BOOL)resolveInstanceMethod:(SEL)sel __attribute__((availability(macosx,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); // + (NSUInteger)hash; // + (Class)superclass; // + (Class)class __attribute__((availability(swift, unavailable, message="use 'aClass.self' instead"))); // + (NSString *)description; // + (NSString *)debugDescription; /* @end */ extern __attribute__((__visibility__("default"))) #ifndef _REWRITER_typedef_OS_object #define _REWRITER_typedef_OS_object typedef struct objc_object OS_object; typedef struct {} _objc_exc_OS_object; #endif struct OS_object_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)init __attribute__((__availability__(swift, unavailable, message="Unavailable in Swift"))); /* @end */ ; extern "C" { __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((__visibility__("default"))) __attribute__((__availability__(swift, unavailable, message="Can't be used with ARC"))) void* os_retain(void *object); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((__visibility__("default"))) void __attribute__((__availability__(swift, unavailable, message="Can't be used with ARC"))) os_release(void *object); } typedef enum : uint32_t { OS_CLOCK_MACH_ABSOLUTE_TIME = 32, } os_clockid_t; struct __attribute__((__swift_private__)) os_workgroup_attr_opaque_s { uint32_t sig; char opaque[60]; }; struct __attribute__((__swift_private__)) os_workgroup_interval_data_opaque_s { uint32_t sig; char opaque[56]; }; struct __attribute__((__swift_private__)) os_workgroup_join_token_opaque_s { uint32_t sig; char opaque[36]; }; extern "C" { #pragma clang assume_nonnull begin __attribute__((__swift_name__("WorkGroup"))) extern __attribute__((__visibility__("default"))) #ifndef _REWRITER_typedef_OS_os_workgroup #define _REWRITER_typedef_OS_os_workgroup typedef struct objc_object OS_os_workgroup; typedef struct {} _objc_exc_OS_os_workgroup; #endif struct OS_os_workgroup_IMPL { struct OS_object_IMPL OS_object_IVARS; }; // - (instancetype)init __attribute__((__availability__(swift, unavailable, message="Unavailable in Swift"))); /* @end */ typedef OS_os_workgroup * __attribute__((objc_independent_class)) os_workgroup_t; typedef struct os_workgroup_attr_opaque_s os_workgroup_attr_s; typedef struct os_workgroup_attr_opaque_s *os_workgroup_attr_t; __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int os_workgroup_copy_port(os_workgroup_t wg, mach_port_t *mach_port_out); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((__swift_name__("WorkGroup.init(__name:port:)"))) extern __attribute__((__visibility__("default"))) __attribute__((__ns_returns_retained__)) os_workgroup_t _Nullable os_workgroup_create_with_port(const char *_Nullable name, mach_port_t mach_port); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__ns_returns_retained__)) os_workgroup_t _Nullable os_workgroup_create_with_workgroup(const char * _Nullable name, os_workgroup_t wg); __attribute__((__swift_private__)) typedef struct os_workgroup_join_token_opaque_s os_workgroup_join_token_s; __attribute__((__swift_private__)) typedef struct os_workgroup_join_token_opaque_s *os_workgroup_join_token_t; __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int os_workgroup_join(os_workgroup_t wg, os_workgroup_join_token_t token_out); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) void os_workgroup_leave(os_workgroup_t wg, os_workgroup_join_token_t token); typedef uint32_t os_workgroup_index; typedef void (*os_workgroup_working_arena_destructor_t)(void * _Nullable); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int os_workgroup_set_working_arena(os_workgroup_t wg, void * _Nullable arena, uint32_t max_workers, os_workgroup_working_arena_destructor_t destructor); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) void * _Nullable os_workgroup_get_working_arena(os_workgroup_t wg, os_workgroup_index * _Nullable index_out); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) void os_workgroup_cancel(os_workgroup_t wg); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) bool os_workgroup_testcancel(os_workgroup_t wg); __attribute__((__swift_private__)) typedef struct os_workgroup_max_parallel_threads_attr_s os_workgroup_mpt_attr_s; __attribute__((__swift_private__)) typedef struct os_workgroup_max_parallel_threads_attr_s *os_workgroup_mpt_attr_t; __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) int os_workgroup_max_parallel_threads(os_workgroup_t wg, os_workgroup_mpt_attr_t _Nullable attr); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin __attribute__((__swift_name__("Repeatable"))) // @protocol OS_os_workgroup_interval /* @end */ ; __attribute__((__swift_name__("WorkGroupInterval"))) extern __attribute__((__visibility__("default"))) #ifndef _REWRITER_typedef_OS_os_workgroup_interval #define _REWRITER_typedef_OS_os_workgroup_interval typedef struct objc_object OS_os_workgroup_interval; typedef struct {} _objc_exc_OS_os_workgroup_interval; #endif struct OS_os_workgroup_interval_IMPL { struct OS_os_workgroup_IMPL OS_os_workgroup_IVARS; }; // - (instancetype)init __attribute__((__availability__(swift, unavailable, message="Unavailable in Swift"))); /* @end */ ; typedef OS_os_workgroup/*<OS_os_workgroup_interval>*/ * __attribute__((objc_independent_class)) os_workgroup_interval_t; typedef struct os_workgroup_interval_data_opaque_s os_workgroup_interval_data_s; typedef struct os_workgroup_interval_data_opaque_s *os_workgroup_interval_data_t; __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int os_workgroup_interval_start(os_workgroup_interval_t wg, uint64_t start, uint64_t deadline, os_workgroup_interval_data_t _Nullable data); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int os_workgroup_interval_update(os_workgroup_interval_t wg, uint64_t deadline, os_workgroup_interval_data_t _Nullable data); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((__swift_private__)) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int os_workgroup_interval_finish(os_workgroup_interval_t wg, os_workgroup_interval_data_t _Nullable data); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin __attribute__((__swift_name__("Parallelizable"))) // @protocol OS_os_workgroup_parallel /* @end */ ; __attribute__((__swift_name__("WorkGroupParallel"))) extern __attribute__((__visibility__("default"))) #ifndef _REWRITER_typedef_OS_os_workgroup_parallel #define _REWRITER_typedef_OS_os_workgroup_parallel typedef struct objc_object OS_os_workgroup_parallel; typedef struct {} _objc_exc_OS_os_workgroup_parallel; #endif struct OS_os_workgroup_parallel_IMPL { struct OS_os_workgroup_IMPL OS_os_workgroup_IVARS; }; // - (instancetype)init __attribute__((__availability__(swift, unavailable, message="Unavailable in Swift"))); /* @end */ ; typedef OS_os_workgroup/*<OS_os_workgroup_parallel>*/ * __attribute__((objc_independent_class)) os_workgroup_parallel_t; __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) extern __attribute__((__visibility__("default"))) __attribute__((__ns_returns_retained__)) __attribute__((__swift_name__("WorkGroupParallel.init(__name:attr:)"))) os_workgroup_parallel_t _Nullable os_workgroup_parallel_create(const char * _Nullable name, os_workgroup_attr_t _Nullable attr); #pragma clang assume_nonnull end } typedef void (*dispatch_function_t)(void *_Nullable); struct time_value { integer_t seconds; integer_t microseconds; }; typedef struct time_value time_value_t; typedef int alarm_type_t; typedef int sleep_type_t; typedef int clock_id_t; typedef int clock_flavor_t; typedef int *clock_attr_t; typedef int clock_res_t; struct mach_timespec { unsigned int tv_sec; clock_res_t tv_nsec; }; typedef struct mach_timespec mach_timespec_t; #pragma clang assume_nonnull begin extern "C" { struct timespec; typedef uint64_t dispatch_time_t; enum { DISPATCH_WALLTIME_NOW __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) = ~1ull, }; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_time_t dispatch_time(dispatch_time_t when, int64_t delta); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_time_t dispatch_walltime(const struct timespec *_Nullable when, int64_t delta); } #pragma clang assume_nonnull end typedef enum : unsigned int { QOS_CLASS_USER_INTERACTIVE __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x21, QOS_CLASS_USER_INITIATED __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x19, QOS_CLASS_DEFAULT __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x15, QOS_CLASS_UTILITY __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x11, QOS_CLASS_BACKGROUND __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x09, QOS_CLASS_UNSPECIFIED __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x00, } qos_class_t; extern "C" { __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) qos_class_t qos_class_self(void); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) qos_class_t qos_class_main(void); } #pragma clang assume_nonnull begin // @protocol OS_dispatch_object <NSObject> /* @end */ typedef NSObject/*<OS_dispatch_object>*/ * __attribute__((objc_independent_class)) dispatch_object_t; static __inline__ __attribute__((__always_inline__)) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void _dispatch_object_validate(dispatch_object_t object) { void *isa = *(void *volatile*)( void*)object; (void)isa; } typedef void (*dispatch_block_t)(void); extern "C" { typedef qos_class_t dispatch_qos_class_t; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) __attribute__((__availability__(swift, unavailable, message="Can't be used with ARC"))) void dispatch_retain(dispatch_object_t object); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) __attribute__((__availability__(swift, unavailable, message="Can't be used with ARC"))) void dispatch_release(dispatch_object_t object); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__pure__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) void *_Nullable dispatch_get_context(dispatch_object_t object); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nothrow__)) void dispatch_set_context(dispatch_object_t object, void *_Nullable context); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nothrow__)) void dispatch_set_finalizer_f(dispatch_object_t object, dispatch_function_t _Nullable finalizer); __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_activate(dispatch_object_t object); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_suspend(dispatch_object_t object); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_resume(dispatch_object_t object); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nothrow__)) void dispatch_set_qos_class_floor(dispatch_object_t object, dispatch_qos_class_t qos_class, int relative_priority); __attribute__((__unavailable__)) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) intptr_t dispatch_wait(void *object, dispatch_time_t timeout); __attribute__((__unavailable__)) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_notify(void *object, dispatch_object_t queue, dispatch_block_t notification_block); __attribute__((__unavailable__)) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_cancel(void *object); __attribute__((__unavailable__)) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) intptr_t dispatch_testcancel(void *object); __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="unsupported interface"))) __attribute__((availability(ios,introduced=4.0,deprecated=6.0,message="unsupported interface"))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__nothrow__)) __attribute__((__cold__)) __attribute__((__format__(printf,2,3))) void dispatch_debug(dispatch_object_t object, const char *message, ...); __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="unsupported interface"))) __attribute__((availability(ios,introduced=4.0,deprecated=6.0,message="unsupported interface"))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__nothrow__)) __attribute__((__cold__)) __attribute__((__format__(printf,2,0))) void dispatch_debugv(dispatch_object_t object, const char *message, va_list ap); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @protocol OS_dispatch_queue <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_queue>*/ * __attribute__((objc_independent_class)) dispatch_queue_t; // @protocol OS_dispatch_queue_global <OS_dispatch_queue> /* @end */ typedef NSObject/*<OS_dispatch_queue_global>*/ * __attribute__((objc_independent_class)) dispatch_queue_global_t; // @protocol OS_dispatch_queue_serial <OS_dispatch_queue> /* @end */ typedef NSObject/*<OS_dispatch_queue_serial>*/ * __attribute__((objc_independent_class)) dispatch_queue_serial_t; // @protocol OS_dispatch_queue_main <OS_dispatch_queue_serial> /* @end */ typedef NSObject/*<OS_dispatch_queue_main>*/ * __attribute__((objc_independent_class)) dispatch_queue_main_t; // @protocol OS_dispatch_queue_concurrent <OS_dispatch_queue> /* @end */ typedef NSObject/*<OS_dispatch_queue_concurrent>*/ * __attribute__((objc_independent_class)) dispatch_queue_concurrent_t; extern "C" { __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_async(dispatch_queue_t queue, dispatch_block_t block); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_async_f(dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_sync(dispatch_queue_t queue, __attribute__((__noescape__)) dispatch_block_t block); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_sync_f(dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_async_and_wait(dispatch_queue_t queue, __attribute__((__noescape__)) dispatch_block_t block); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_async_and_wait_f(dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_apply(size_t iterations, dispatch_queue_t _Nullable queue, __attribute__((__noescape__)) void (^block)(size_t iteration)); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(4))) __attribute__((__nothrow__)) void dispatch_apply_f(size_t iterations, dispatch_queue_t _Nullable queue, void *_Nullable context, void (*work)(void *_Nullable context, size_t iteration)); __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="unsupported interface"))) __attribute__((availability(ios,introduced=4.0,deprecated=6.0,message="unsupported interface"))) extern __attribute__((visibility("default"))) __attribute__((__pure__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_queue_t dispatch_get_current_queue(void); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) struct dispatch_queue_s _dispatch_main_q; static __inline__ __attribute__((__always_inline__)) __attribute__((__const__)) __attribute__((__nothrow__)) dispatch_queue_main_t dispatch_get_main_queue(void) { return (( dispatch_queue_main_t)&(_dispatch_main_q)); } typedef long dispatch_queue_priority_t; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__const__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_queue_global_t dispatch_get_global_queue(intptr_t identifier, uintptr_t flags); // @protocol OS_dispatch_queue_attr <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_queue_attr>*/ * __attribute__((objc_independent_class)) dispatch_queue_attr_t; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) struct dispatch_queue_attr_s _dispatch_queue_attr_concurrent; __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( dispatch_queue_attr_t _Nullable attr); typedef enum : unsigned long { DISPATCH_AUTORELEASE_FREQUENCY_INHERIT __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 0, DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 1, DISPATCH_AUTORELEASE_FREQUENCY_NEVER __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) = 2, } __attribute__((__enum_extensibility__(open))) dispatch_autorelease_frequency_t; __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( dispatch_queue_attr_t _Nullable attr, dispatch_autorelease_frequency_t frequency); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class(dispatch_queue_attr_t _Nullable attr, dispatch_qos_class_t qos_class, int relative_priority); __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_queue_t dispatch_queue_create_with_target(const char *_Nullable label, dispatch_queue_attr_t _Nullable attr, dispatch_queue_t _Nullable target) __asm__("_" "dispatch_queue_create_with_target" "$V2"); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_queue_t dispatch_queue_create(const char *_Nullable label, dispatch_queue_attr_t _Nullable attr); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__pure__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) const char * dispatch_queue_get_label(dispatch_queue_t _Nullable queue); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) dispatch_qos_class_t dispatch_queue_get_qos_class(dispatch_queue_t queue, int *_Nullable relative_priority_ptr); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nothrow__)) void dispatch_set_target_queue(dispatch_object_t object, dispatch_queue_t _Nullable queue); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nothrow__)) __attribute__((__noreturn__)) void dispatch_main(void); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_after(dispatch_time_t when, dispatch_queue_t queue, dispatch_block_t block); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(4))) __attribute__((__nothrow__)) void dispatch_after_f(dispatch_time_t when, dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_barrier_async(dispatch_queue_t queue, dispatch_block_t block); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_barrier_async_f(dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_barrier_sync(dispatch_queue_t queue, __attribute__((__noescape__)) dispatch_block_t block); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_barrier_sync_f(dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_barrier_async_and_wait(dispatch_queue_t queue, __attribute__((__noescape__)) dispatch_block_t block); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_barrier_async_and_wait_f(dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_queue_set_specific(dispatch_queue_t queue, const void *key, void *_Nullable context, dispatch_function_t _Nullable destructor); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__pure__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) void *_Nullable dispatch_queue_get_specific(dispatch_queue_t queue, const void *key); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__pure__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) void *_Nullable dispatch_get_specific(const void *key); __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void dispatch_assert_queue(dispatch_queue_t queue) __asm__("_" "dispatch_assert_queue" "$V2"); __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void dispatch_assert_queue_barrier(dispatch_queue_t queue); __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void dispatch_assert_queue_not(dispatch_queue_t queue) __asm__("_" "dispatch_assert_queue_not" "$V2"); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" { typedef enum : unsigned long { DISPATCH_BLOCK_BARRIER __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x1, DISPATCH_BLOCK_DETACHED __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x2, DISPATCH_BLOCK_ASSIGN_CURRENT __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x4, DISPATCH_BLOCK_NO_QOS_CLASS __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x8, DISPATCH_BLOCK_INHERIT_QOS_CLASS __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x10, DISPATCH_BLOCK_ENFORCE_QOS_CLASS __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) = 0x20, } __attribute__((__flag_enum__)) __attribute__((__enum_extensibility__(open))) dispatch_block_flags_t; __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_block_t dispatch_block_create(dispatch_block_flags_t flags, dispatch_block_t block); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(4))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_block_t dispatch_block_create_with_qos_class(dispatch_block_flags_t flags, dispatch_qos_class_t qos_class, int relative_priority, dispatch_block_t block); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__nothrow__)) void dispatch_block_perform(dispatch_block_flags_t flags, __attribute__((__noescape__)) dispatch_block_t block); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) intptr_t dispatch_block_wait(dispatch_block_t block, dispatch_time_t timeout); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_block_notify(dispatch_block_t block, dispatch_queue_t queue, dispatch_block_t notification_block); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_block_cancel(dispatch_block_t block); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) intptr_t dispatch_block_testcancel(dispatch_block_t block); } #pragma clang assume_nonnull end typedef int kern_return_t; typedef natural_t mach_msg_timeout_t; typedef unsigned int mach_msg_bits_t; typedef natural_t mach_msg_size_t; typedef integer_t mach_msg_id_t; typedef unsigned int mach_msg_priority_t; typedef unsigned int mach_msg_type_name_t; typedef unsigned int mach_msg_copy_options_t; typedef unsigned int mach_msg_guard_flags_t; typedef unsigned int mach_msg_descriptor_type_t; #pragma pack(push, 4) typedef struct{ natural_t pad1; mach_msg_size_t pad2; unsigned int pad3 : 24; mach_msg_descriptor_type_t type : 8; } mach_msg_type_descriptor_t; typedef struct{ mach_port_t name; mach_msg_size_t pad1; unsigned int pad2 : 16; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; } mach_msg_port_descriptor_t; typedef struct{ uint32_t address; mach_msg_size_t size; boolean_t deallocate: 8; mach_msg_copy_options_t copy: 8; unsigned int pad1: 8; mach_msg_descriptor_type_t type: 8; } mach_msg_ool_descriptor32_t; typedef struct{ uint64_t address; boolean_t deallocate: 8; mach_msg_copy_options_t copy: 8; unsigned int pad1: 8; mach_msg_descriptor_type_t type: 8; mach_msg_size_t size; } mach_msg_ool_descriptor64_t; typedef struct{ void* address; boolean_t deallocate: 8; mach_msg_copy_options_t copy: 8; unsigned int pad1: 8; mach_msg_descriptor_type_t type: 8; mach_msg_size_t size; } mach_msg_ool_descriptor_t; typedef struct{ uint32_t address; mach_msg_size_t count; boolean_t deallocate: 8; mach_msg_copy_options_t copy: 8; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; } mach_msg_ool_ports_descriptor32_t; typedef struct{ uint64_t address; boolean_t deallocate: 8; mach_msg_copy_options_t copy: 8; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; mach_msg_size_t count; } mach_msg_ool_ports_descriptor64_t; typedef struct{ void* address; boolean_t deallocate: 8; mach_msg_copy_options_t copy: 8; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; mach_msg_size_t count; } mach_msg_ool_ports_descriptor_t; typedef struct{ uint32_t context; mach_port_name_t name; mach_msg_guard_flags_t flags : 16; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; } mach_msg_guarded_port_descriptor32_t; typedef struct{ uint64_t context; mach_msg_guard_flags_t flags : 16; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; mach_port_name_t name; } mach_msg_guarded_port_descriptor64_t; typedef struct{ mach_port_context_t context; mach_msg_guard_flags_t flags : 16; mach_msg_type_name_t disposition : 8; mach_msg_descriptor_type_t type : 8; mach_port_name_t name; } mach_msg_guarded_port_descriptor_t; typedef union{ mach_msg_port_descriptor_t port; mach_msg_ool_descriptor_t out_of_line; mach_msg_ool_ports_descriptor_t ool_ports; mach_msg_type_descriptor_t type; mach_msg_guarded_port_descriptor_t guarded_port; } mach_msg_descriptor_t; typedef struct{ mach_msg_size_t msgh_descriptor_count; } mach_msg_body_t; typedef struct{ mach_msg_bits_t msgh_bits; mach_msg_size_t msgh_size; mach_port_t msgh_remote_port; mach_port_t msgh_local_port; mach_port_name_t msgh_voucher_port; mach_msg_id_t msgh_id; } mach_msg_header_t; typedef struct{ mach_msg_header_t header; mach_msg_body_t body; } mach_msg_base_t; typedef unsigned int mach_msg_trailer_type_t; typedef unsigned int mach_msg_trailer_size_t; typedef char *mach_msg_trailer_info_t; typedef struct{ mach_msg_trailer_type_t msgh_trailer_type; mach_msg_trailer_size_t msgh_trailer_size; } mach_msg_trailer_t; typedef struct{ mach_msg_trailer_type_t msgh_trailer_type; mach_msg_trailer_size_t msgh_trailer_size; mach_port_seqno_t msgh_seqno; } mach_msg_seqno_trailer_t; typedef struct{ unsigned int val[2]; } security_token_t; typedef struct{ mach_msg_trailer_type_t msgh_trailer_type; mach_msg_trailer_size_t msgh_trailer_size; mach_port_seqno_t msgh_seqno; security_token_t msgh_sender; } mach_msg_security_trailer_t; typedef struct{ unsigned int val[8]; } audit_token_t; typedef struct{ mach_msg_trailer_type_t msgh_trailer_type; mach_msg_trailer_size_t msgh_trailer_size; mach_port_seqno_t msgh_seqno; security_token_t msgh_sender; audit_token_t msgh_audit; } mach_msg_audit_trailer_t; typedef struct{ mach_msg_trailer_type_t msgh_trailer_type; mach_msg_trailer_size_t msgh_trailer_size; mach_port_seqno_t msgh_seqno; security_token_t msgh_sender; audit_token_t msgh_audit; mach_port_context_t msgh_context; } mach_msg_context_trailer_t; typedef struct{ mach_port_name_t sender; } msg_labels_t; typedef int mach_msg_filter_id; typedef struct{ mach_msg_trailer_type_t msgh_trailer_type; mach_msg_trailer_size_t msgh_trailer_size; mach_port_seqno_t msgh_seqno; security_token_t msgh_sender; audit_token_t msgh_audit; mach_port_context_t msgh_context; mach_msg_filter_id msgh_ad; msg_labels_t msgh_labels; } mach_msg_mac_trailer_t; typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t; typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t; extern const security_token_t KERNEL_SECURITY_TOKEN; extern const audit_token_t KERNEL_AUDIT_TOKEN; typedef integer_t mach_msg_options_t; typedef struct{ mach_msg_header_t header; } mach_msg_empty_send_t; typedef struct{ mach_msg_header_t header; mach_msg_trailer_t trailer; } mach_msg_empty_rcv_t; typedef union{ mach_msg_empty_send_t send; mach_msg_empty_rcv_t rcv; } mach_msg_empty_t; #pragma pack(pop) typedef natural_t mach_msg_type_size_t; typedef natural_t mach_msg_type_number_t; typedef integer_t mach_msg_option_t; typedef kern_return_t mach_msg_return_t; extern "C" { __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg_overwrite( mach_msg_header_t *msg, mach_msg_option_t option, mach_msg_size_t send_size, mach_msg_size_t rcv_size, mach_port_name_t rcv_name, mach_msg_timeout_t timeout, mach_port_name_t notify, mach_msg_header_t *rcv_msg, mach_msg_size_t rcv_limit); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg( mach_msg_header_t *msg, mach_msg_option_t option, mach_msg_size_t send_size, mach_msg_size_t rcv_size, mach_port_name_t rcv_name, mach_msg_timeout_t timeout, mach_port_name_t notify); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern kern_return_t mach_voucher_deallocate( mach_port_name_t voucher); } #pragma clang assume_nonnull begin // @protocol OS_dispatch_source <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_source>*/ * __attribute__((objc_independent_class)) dispatch_source_t;; extern "C" { typedef const struct dispatch_source_type_s *dispatch_source_type_t; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_data_add; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_data_or; __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_data_replace; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_mach_send; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_mach_recv; __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_memorypressure; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_proc; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_read; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_signal; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_timer; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_vnode; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) const struct dispatch_source_type_s _dispatch_source_type_write; typedef unsigned long dispatch_source_mach_send_flags_t; typedef unsigned long dispatch_source_mach_recv_flags_t; typedef unsigned long dispatch_source_memorypressure_flags_t; typedef unsigned long dispatch_source_proc_flags_t; typedef unsigned long dispatch_source_vnode_flags_t; typedef unsigned long dispatch_source_timer_flags_t; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_source_t dispatch_source_create(dispatch_source_type_t type, uintptr_t handle, uintptr_t mask, dispatch_queue_t _Nullable queue); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_source_set_event_handler(dispatch_source_t source, dispatch_block_t _Nullable handler); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_source_set_event_handler_f(dispatch_source_t source, dispatch_function_t _Nullable handler); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_source_set_cancel_handler(dispatch_source_t source, dispatch_block_t _Nullable handler); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_source_set_cancel_handler_f(dispatch_source_t source, dispatch_function_t _Nullable handler); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_source_cancel(dispatch_source_t source); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) intptr_t dispatch_source_testcancel(dispatch_source_t source); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) uintptr_t dispatch_source_get_handle(dispatch_source_t source); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) uintptr_t dispatch_source_get_mask(dispatch_source_t source); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__pure__)) __attribute__((__nothrow__)) uintptr_t dispatch_source_get_data(dispatch_source_t source); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_source_merge_data(dispatch_source_t source, uintptr_t value); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_source_set_timer(dispatch_source_t source, dispatch_time_t start, uint64_t interval, uint64_t leeway); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_source_set_registration_handler(dispatch_source_t source, dispatch_block_t _Nullable handler); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.3))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_source_set_registration_handler_f(dispatch_source_t source, dispatch_function_t _Nullable handler); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @protocol OS_dispatch_group <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_group>*/ * __attribute__((objc_independent_class)) dispatch_group_t; extern "C" { __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_group_t dispatch_group_create(void); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_group_async(dispatch_group_t group, dispatch_queue_t queue, dispatch_block_t block); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(4))) __attribute__((__nothrow__)) void dispatch_group_async_f(dispatch_group_t group, dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) intptr_t dispatch_group_wait(dispatch_group_t group, dispatch_time_t timeout); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_group_notify(dispatch_group_t group, dispatch_queue_t queue, dispatch_block_t block); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(4))) __attribute__((__nothrow__)) void dispatch_group_notify_f(dispatch_group_t group, dispatch_queue_t queue, void *_Nullable context, dispatch_function_t work); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_group_enter(dispatch_group_t group); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_group_leave(dispatch_group_t group); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @protocol OS_dispatch_semaphore <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_semaphore>*/ * __attribute__((objc_independent_class)) dispatch_semaphore_t; extern "C" { __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_semaphore_t dispatch_semaphore_create(intptr_t value); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) intptr_t dispatch_semaphore_wait(dispatch_semaphore_t dsema, dispatch_time_t timeout); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) intptr_t dispatch_semaphore_signal(dispatch_semaphore_t dsema); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" { typedef intptr_t dispatch_once_t; __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_once(dispatch_once_t *predicate, __attribute__((__noescape__)) dispatch_block_t block); static __inline__ __attribute__((__always_inline__)) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void _dispatch_once(dispatch_once_t *predicate, __attribute__((__noescape__)) dispatch_block_t block) { if (__builtin_expect((*predicate), (~0l)) != ~0l) { dispatch_once(predicate, block); } else { __asm__ __volatile__("" ::: "memory"); } __builtin_assume(*predicate == ~0l); } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void dispatch_once_f(dispatch_once_t *predicate, void *_Nullable context, dispatch_function_t function); static __inline__ __attribute__((__always_inline__)) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nothrow__)) void _dispatch_once_f(dispatch_once_t *predicate, void *_Nullable context, dispatch_function_t function) { if (__builtin_expect((*predicate), (~0l)) != ~0l) { dispatch_once_f(predicate, context, function); } else { __asm__ __volatile__("" ::: "memory"); } __builtin_assume(*predicate == ~0l); } } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" { // @protocol OS_dispatch_data <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_data>*/ * __attribute__((objc_independent_class)) dispatch_data_t; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) struct dispatch_data_s _dispatch_data_empty; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) const dispatch_block_t _dispatch_data_destructor_free; __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) extern __attribute__((visibility("default"))) const dispatch_block_t _dispatch_data_destructor_munmap; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_data_t dispatch_data_create(const void *buffer, size_t size, dispatch_queue_t _Nullable queue, dispatch_block_t _Nullable destructor); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__pure__)) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) size_t dispatch_data_get_size(dispatch_data_t data); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_data_t dispatch_data_create_map(dispatch_data_t data, const void *_Nullable *_Nullable buffer_ptr, size_t *_Nullable size_ptr); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_data_t dispatch_data_create_concat(dispatch_data_t data1, dispatch_data_t data2); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_data_t dispatch_data_create_subrange(dispatch_data_t data, size_t offset, size_t length); typedef bool (*dispatch_data_applier_t)(dispatch_data_t region, size_t offset, const void *buffer, size_t size); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) bool dispatch_data_apply(dispatch_data_t data, __attribute__((__noescape__)) dispatch_data_applier_t applier); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_data_t dispatch_data_copy_region(dispatch_data_t data, size_t location, size_t *offset_ptr); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" { typedef int dispatch_fd_t; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(3))) __attribute__((__nonnull__(4))) __attribute__((__nothrow__)) void dispatch_read(dispatch_fd_t fd, size_t length, dispatch_queue_t queue, void (^handler)(dispatch_data_t data, int error)); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) __attribute__((__nonnull__(4))) __attribute__((__nothrow__)) void dispatch_write(dispatch_fd_t fd, dispatch_data_t data, dispatch_queue_t queue, void (^handler)(dispatch_data_t _Nullable data, int error)); // @protocol OS_dispatch_io <OS_dispatch_object> /* @end */ typedef NSObject/*<OS_dispatch_io>*/ * __attribute__((objc_independent_class)) dispatch_io_t; typedef unsigned long dispatch_io_type_t; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_io_t dispatch_io_create(dispatch_io_type_t type, dispatch_fd_t fd, dispatch_queue_t queue, void (^cleanup_handler)(int error)); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_io_t dispatch_io_create_with_path(dispatch_io_type_t type, const char *path, int oflag, mode_t mode, dispatch_queue_t queue, void (^cleanup_handler)(int error)); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(2))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_io_t dispatch_io_create_with_io(dispatch_io_type_t type, dispatch_io_t io, dispatch_queue_t queue, void (^cleanup_handler)(int error)); typedef void (*dispatch_io_handler_t)(bool done, dispatch_data_t _Nullable data, int error); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(4))) __attribute__((__nonnull__(5))) __attribute__((__nothrow__)) void dispatch_io_read(dispatch_io_t channel, off_t offset, size_t length, dispatch_queue_t queue, dispatch_io_handler_t io_handler); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) __attribute__((__nonnull__(4))) __attribute__((__nonnull__(5))) __attribute__((__nothrow__)) void dispatch_io_write(dispatch_io_t channel, off_t offset, dispatch_data_t data, dispatch_queue_t queue, dispatch_io_handler_t io_handler); typedef unsigned long dispatch_io_close_flags_t; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_io_close(dispatch_io_t channel, dispatch_io_close_flags_t flags); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_io_barrier(dispatch_io_t channel, dispatch_block_t barrier); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_fd_t dispatch_io_get_descriptor(dispatch_io_t channel); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_io_set_high_water(dispatch_io_t channel, size_t high_water); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_io_set_low_water(dispatch_io_t channel, size_t low_water); typedef unsigned long dispatch_io_interval_flags_t; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nothrow__)) void dispatch_io_set_interval(dispatch_io_t channel, uint64_t interval, dispatch_io_interval_flags_t flags); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" { // @protocol OS_dispatch_workloop <OS_dispatch_queue> /* @end */ typedef NSObject/*<OS_dispatch_workloop>*/ * __attribute__((objc_independent_class)) dispatch_workloop_t; __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_workloop_t dispatch_workloop_create(const char *_Nullable label); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nothrow__)) dispatch_workloop_t dispatch_workloop_create_inactive(const char *_Nullable label); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_workloop_set_autorelease_frequency(dispatch_workloop_t workloop, dispatch_autorelease_frequency_t frequency); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__nothrow__)) void dispatch_workloop_set_os_workgroup(dispatch_workloop_t workloop, os_workgroup_t workgroup); } #pragma clang assume_nonnull end extern "C" { typedef struct { CFIndex domain; SInt32 error; } CFStreamError; typedef CFStringRef CFStreamPropertyKey __attribute__((swift_wrapper(struct))); typedef CFIndex CFStreamStatus; enum { kCFStreamStatusNotOpen = 0, kCFStreamStatusOpening, kCFStreamStatusOpen, kCFStreamStatusReading, kCFStreamStatusWriting, kCFStreamStatusAtEnd, kCFStreamStatusClosed, kCFStreamStatusError }; typedef CFOptionFlags CFStreamEventType; enum { kCFStreamEventNone = 0, kCFStreamEventOpenCompleted = 1, kCFStreamEventHasBytesAvailable = 2, kCFStreamEventCanAcceptBytes = 4, kCFStreamEventErrorOccurred = 8, kCFStreamEventEndEncountered = 16 }; typedef struct { CFIndex version; void * _Null_unspecified info; void *_Null_unspecified(* _Null_unspecified retain)(void * _Null_unspecified info); void (* _Null_unspecified release)(void * _Null_unspecified info); CFStringRef _Null_unspecified (* _Null_unspecified copyDescription)(void * _Null_unspecified info); } CFStreamClientContext; typedef struct __attribute__((objc_bridge_mutable(NSInputStream))) __CFReadStream * CFReadStreamRef; typedef struct __attribute__((objc_bridge_mutable(NSOutputStream))) __CFWriteStream * CFWriteStreamRef; typedef void (*CFReadStreamClientCallBack)(CFReadStreamRef _Null_unspecified stream, CFStreamEventType type, void * _Null_unspecified clientCallBackInfo); typedef void (*CFWriteStreamClientCallBack)(CFWriteStreamRef _Null_unspecified stream, CFStreamEventType type, void * _Null_unspecified clientCallBackInfo); extern CFTypeID CFReadStreamGetTypeID(void); extern CFTypeID CFWriteStreamGetTypeID(void); extern const CFStreamPropertyKey _Null_unspecified kCFStreamPropertyDataWritten; extern CFReadStreamRef _Null_unspecified CFReadStreamCreateWithBytesNoCopy(CFAllocatorRef _Null_unspecified alloc, const UInt8 * _Null_unspecified bytes, CFIndex length, CFAllocatorRef _Null_unspecified bytesDeallocator); extern CFWriteStreamRef _Null_unspecified CFWriteStreamCreateWithBuffer(CFAllocatorRef _Null_unspecified alloc, UInt8 * _Null_unspecified buffer, CFIndex bufferCapacity); extern CFWriteStreamRef _Null_unspecified CFWriteStreamCreateWithAllocatedBuffers(CFAllocatorRef _Null_unspecified alloc, CFAllocatorRef _Null_unspecified bufferAllocator); extern CFReadStreamRef _Null_unspecified CFReadStreamCreateWithFile(CFAllocatorRef _Null_unspecified alloc, CFURLRef _Null_unspecified fileURL); extern CFWriteStreamRef _Null_unspecified CFWriteStreamCreateWithFile(CFAllocatorRef _Null_unspecified alloc, CFURLRef _Null_unspecified fileURL); extern void CFStreamCreateBoundPair(CFAllocatorRef _Null_unspecified alloc, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream, CFIndex transferBufferSize); extern const CFStreamPropertyKey _Null_unspecified kCFStreamPropertyAppendToFile; extern const CFStreamPropertyKey _Null_unspecified kCFStreamPropertyFileCurrentOffset; extern const CFStreamPropertyKey _Null_unspecified kCFStreamPropertySocketNativeHandle; extern const CFStreamPropertyKey _Null_unspecified kCFStreamPropertySocketRemoteHostName; extern const CFStreamPropertyKey _Null_unspecified kCFStreamPropertySocketRemotePortNumber; extern const int kCFStreamErrorDomainSOCKS __attribute__((availability(macosx,introduced=10_0))); extern const CFStringRef _Nonnull kCFStreamPropertySOCKSProxy __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertySOCKSProxyHost __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertySOCKSProxyPort __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertySOCKSVersion __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamSocketSOCKSVersion4 __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamSocketSOCKSVersion5 __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertySOCKSUser __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertySOCKSPassword __attribute__((availability(macosx,introduced=10_2))); extern const int kCFStreamErrorDomainSSL __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertySocketSecurityLevel __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamSocketSecurityLevelNone __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamSocketSecurityLevelSSLv2 __attribute__((availability(macosx,introduced=10_2,deprecated=10_12,message="" ))); extern const CFStringRef _Nonnull kCFStreamSocketSecurityLevelSSLv3 __attribute__((availability(macosx,introduced=10_2,deprecated=10_12,message="" ))); extern const CFStringRef _Nonnull kCFStreamSocketSecurityLevelTLSv1 __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamSocketSecurityLevelNegotiatedSSL __attribute__((availability(macosx,introduced=10_2))); extern const CFStringRef _Nonnull kCFStreamPropertyShouldCloseNativeSocket __attribute__((availability(macosx,introduced=10_2))); extern void CFStreamCreatePairWithSocket(CFAllocatorRef _Null_unspecified alloc, CFSocketNativeHandle sock, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream) __attribute__((availability(macos,introduced=10.1,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))); extern void CFStreamCreatePairWithSocketToHost(CFAllocatorRef _Null_unspecified alloc, CFStringRef _Null_unspecified host, UInt32 port, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream) __attribute__((availability(macos,introduced=10.1,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))); extern void CFStreamCreatePairWithPeerSocketSignature(CFAllocatorRef _Null_unspecified alloc, const CFSocketSignature * _Null_unspecified signature, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream) __attribute__((availability(macos,introduced=10.1,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))); extern CFStreamStatus CFReadStreamGetStatus(CFReadStreamRef _Null_unspecified stream); extern CFStreamStatus CFWriteStreamGetStatus(CFWriteStreamRef _Null_unspecified stream); extern CFErrorRef _Null_unspecified CFReadStreamCopyError(CFReadStreamRef _Null_unspecified stream) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFErrorRef _Null_unspecified CFWriteStreamCopyError(CFWriteStreamRef _Null_unspecified stream) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFReadStreamOpen(CFReadStreamRef _Null_unspecified stream); extern Boolean CFWriteStreamOpen(CFWriteStreamRef _Null_unspecified stream); extern void CFReadStreamClose(CFReadStreamRef _Null_unspecified stream); extern void CFWriteStreamClose(CFWriteStreamRef _Null_unspecified stream); extern Boolean CFReadStreamHasBytesAvailable(CFReadStreamRef _Null_unspecified stream); extern CFIndex CFReadStreamRead(CFReadStreamRef _Null_unspecified stream, UInt8 * _Null_unspecified buffer, CFIndex bufferLength); extern const UInt8 * _Null_unspecified CFReadStreamGetBuffer(CFReadStreamRef _Null_unspecified stream, CFIndex maxBytesToRead, CFIndex * _Null_unspecified numBytesRead); extern Boolean CFWriteStreamCanAcceptBytes(CFWriteStreamRef _Null_unspecified stream); extern CFIndex CFWriteStreamWrite(CFWriteStreamRef _Null_unspecified stream, const UInt8 * _Null_unspecified buffer, CFIndex bufferLength); extern CFTypeRef _Null_unspecified CFReadStreamCopyProperty(CFReadStreamRef _Null_unspecified stream, CFStreamPropertyKey _Null_unspecified propertyName); extern CFTypeRef _Null_unspecified CFWriteStreamCopyProperty(CFWriteStreamRef _Null_unspecified stream, CFStreamPropertyKey _Null_unspecified propertyName); extern Boolean CFReadStreamSetProperty(CFReadStreamRef _Null_unspecified stream, CFStreamPropertyKey _Null_unspecified propertyName, CFTypeRef _Null_unspecified propertyValue); extern Boolean CFWriteStreamSetProperty(CFWriteStreamRef _Null_unspecified stream, CFStreamPropertyKey _Null_unspecified propertyName, CFTypeRef _Null_unspecified propertyValue); extern Boolean CFReadStreamSetClient(CFReadStreamRef _Null_unspecified stream, CFOptionFlags streamEvents, CFReadStreamClientCallBack _Null_unspecified clientCB, CFStreamClientContext * _Null_unspecified clientContext); extern Boolean CFWriteStreamSetClient(CFWriteStreamRef _Null_unspecified stream, CFOptionFlags streamEvents, CFWriteStreamClientCallBack _Null_unspecified clientCB, CFStreamClientContext * _Null_unspecified clientContext); extern void CFReadStreamScheduleWithRunLoop(CFReadStreamRef _Null_unspecified stream, CFRunLoopRef _Null_unspecified runLoop, CFRunLoopMode _Null_unspecified runLoopMode); extern void CFWriteStreamScheduleWithRunLoop(CFWriteStreamRef _Null_unspecified stream, CFRunLoopRef _Null_unspecified runLoop, _Null_unspecified CFRunLoopMode runLoopMode); extern void CFReadStreamUnscheduleFromRunLoop(CFReadStreamRef _Null_unspecified stream, CFRunLoopRef _Null_unspecified runLoop, CFRunLoopMode _Null_unspecified runLoopMode); extern void CFWriteStreamUnscheduleFromRunLoop(CFWriteStreamRef _Null_unspecified stream, CFRunLoopRef _Null_unspecified runLoop, CFRunLoopMode _Null_unspecified runLoopMode); extern void CFReadStreamSetDispatchQueue(CFReadStreamRef _Null_unspecified stream, dispatch_queue_t _Null_unspecified q) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFWriteStreamSetDispatchQueue(CFWriteStreamRef _Null_unspecified stream, dispatch_queue_t _Null_unspecified q) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern dispatch_queue_t _Null_unspecified CFReadStreamCopyDispatchQueue(CFReadStreamRef _Null_unspecified stream) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern dispatch_queue_t _Null_unspecified CFWriteStreamCopyDispatchQueue(CFWriteStreamRef _Null_unspecified stream) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFIndex CFStreamErrorDomain; enum { kCFStreamErrorDomainCustom = -1L, kCFStreamErrorDomainPOSIX = 1, kCFStreamErrorDomainMacOSStatus }; extern CFStreamError CFReadStreamGetError(CFReadStreamRef _Null_unspecified stream); extern CFStreamError CFWriteStreamGetError(CFWriteStreamRef _Null_unspecified stream); } extern "C" { typedef CFOptionFlags CFPropertyListMutabilityOptions; enum { kCFPropertyListImmutable = 0, kCFPropertyListMutableContainers = 1 << 0, kCFPropertyListMutableContainersAndLeaves = 1 << 1, }; extern CFPropertyListRef CFPropertyListCreateFromXMLData(CFAllocatorRef allocator, CFDataRef xmlData, CFOptionFlags mutabilityOption, CFStringRef *errorString) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use CFPropertyListCreateWithData instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFPropertyListCreateWithData instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFPropertyListCreateWithData instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFPropertyListCreateWithData instead."))); extern CFDataRef CFPropertyListCreateXMLData(CFAllocatorRef allocator, CFPropertyListRef propertyList) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use CFPropertyListCreateData instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFPropertyListCreateData instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFPropertyListCreateData instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFPropertyListCreateData instead."))); extern CFPropertyListRef CFPropertyListCreateDeepCopy(CFAllocatorRef allocator, CFPropertyListRef propertyList, CFOptionFlags mutabilityOption); typedef CFIndex CFPropertyListFormat; enum { kCFPropertyListOpenStepFormat = 1, kCFPropertyListXMLFormat_v1_0 = 100, kCFPropertyListBinaryFormat_v1_0 = 200 }; extern Boolean CFPropertyListIsValid(CFPropertyListRef plist, CFPropertyListFormat format); extern CFIndex CFPropertyListWriteToStream(CFPropertyListRef propertyList, CFWriteStreamRef stream, CFPropertyListFormat format, CFStringRef *errorString) __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use CFPropertyListWrite instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFPropertyListWrite instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFPropertyListWrite instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFPropertyListWrite instead."))); extern CFPropertyListRef CFPropertyListCreateFromStream(CFAllocatorRef allocator, CFReadStreamRef stream, CFIndex streamLength, CFOptionFlags mutabilityOption, CFPropertyListFormat *format, CFStringRef *errorString) __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use CFPropertyListCreateWithStream instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use CFPropertyListCreateWithStream instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFPropertyListCreateWithStream instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFPropertyListCreateWithStream instead."))); enum { kCFPropertyListReadCorruptError = 3840, kCFPropertyListReadUnknownVersionError = 3841, kCFPropertyListReadStreamError = 3842, kCFPropertyListWriteStreamError = 3851, } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFPropertyListRef CFPropertyListCreateWithData(CFAllocatorRef allocator, CFDataRef data, CFOptionFlags options, CFPropertyListFormat *format, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFPropertyListRef CFPropertyListCreateWithStream(CFAllocatorRef allocator, CFReadStreamRef stream, CFIndex streamLength, CFOptionFlags options, CFPropertyListFormat *format, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFIndex CFPropertyListWrite(CFPropertyListRef propertyList, CFWriteStreamRef stream, CFPropertyListFormat format, CFOptionFlags options, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFDataRef CFPropertyListCreateData(CFAllocatorRef allocator, CFPropertyListRef propertyList, CFPropertyListFormat format, CFOptionFlags options, CFErrorRef *error) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef const void * (*CFSetRetainCallBack)(CFAllocatorRef allocator, const void *value); typedef void (*CFSetReleaseCallBack)(CFAllocatorRef allocator, const void *value); typedef CFStringRef (*CFSetCopyDescriptionCallBack)(const void *value); typedef Boolean (*CFSetEqualCallBack)(const void *value1, const void *value2); typedef CFHashCode (*CFSetHashCallBack)(const void *value); typedef struct { CFIndex version; CFSetRetainCallBack retain; CFSetReleaseCallBack release; CFSetCopyDescriptionCallBack copyDescription; CFSetEqualCallBack equal; CFSetHashCallBack hash; } CFSetCallBacks; extern const CFSetCallBacks kCFTypeSetCallBacks; extern const CFSetCallBacks kCFCopyStringSetCallBacks; typedef void (*CFSetApplierFunction)(const void *value, void *context); typedef const struct __attribute__((objc_bridge(NSSet))) __CFSet * CFSetRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableSet))) __CFSet * CFMutableSetRef; extern CFTypeID CFSetGetTypeID(void); extern CFSetRef CFSetCreate(CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFSetCallBacks *callBacks); extern CFSetRef CFSetCreateCopy(CFAllocatorRef allocator, CFSetRef theSet); extern CFMutableSetRef CFSetCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFSetCallBacks *callBacks); extern CFMutableSetRef CFSetCreateMutableCopy(CFAllocatorRef allocator, CFIndex capacity, CFSetRef theSet); extern CFIndex CFSetGetCount(CFSetRef theSet); extern CFIndex CFSetGetCountOfValue(CFSetRef theSet, const void *value); extern Boolean CFSetContainsValue(CFSetRef theSet, const void *value); extern const void *CFSetGetValue(CFSetRef theSet, const void *value); extern Boolean CFSetGetValueIfPresent(CFSetRef theSet, const void *candidate, const void **value); extern void CFSetGetValues(CFSetRef theSet, const void **values); extern void CFSetApplyFunction(CFSetRef theSet, CFSetApplierFunction __attribute__((noescape)) applier, void *context); extern void CFSetAddValue(CFMutableSetRef theSet, const void *value); extern void CFSetReplaceValue(CFMutableSetRef theSet, const void *value); extern void CFSetSetValue(CFMutableSetRef theSet, const void *value); extern void CFSetRemoveValue(CFMutableSetRef theSet, const void *value); extern void CFSetRemoveAllValues(CFMutableSetRef theSet); } extern "C" { typedef CFIndex CFStringEncodings; enum { kCFStringEncodingMacJapanese = 1, kCFStringEncodingMacChineseTrad = 2, kCFStringEncodingMacKorean = 3, kCFStringEncodingMacArabic = 4, kCFStringEncodingMacHebrew = 5, kCFStringEncodingMacGreek = 6, kCFStringEncodingMacCyrillic = 7, kCFStringEncodingMacDevanagari = 9, kCFStringEncodingMacGurmukhi = 10, kCFStringEncodingMacGujarati = 11, kCFStringEncodingMacOriya = 12, kCFStringEncodingMacBengali = 13, kCFStringEncodingMacTamil = 14, kCFStringEncodingMacTelugu = 15, kCFStringEncodingMacKannada = 16, kCFStringEncodingMacMalayalam = 17, kCFStringEncodingMacSinhalese = 18, kCFStringEncodingMacBurmese = 19, kCFStringEncodingMacKhmer = 20, kCFStringEncodingMacThai = 21, kCFStringEncodingMacLaotian = 22, kCFStringEncodingMacGeorgian = 23, kCFStringEncodingMacArmenian = 24, kCFStringEncodingMacChineseSimp = 25, kCFStringEncodingMacTibetan = 26, kCFStringEncodingMacMongolian = 27, kCFStringEncodingMacEthiopic = 28, kCFStringEncodingMacCentralEurRoman = 29, kCFStringEncodingMacVietnamese = 30, kCFStringEncodingMacExtArabic = 31, kCFStringEncodingMacSymbol = 33, kCFStringEncodingMacDingbats = 34, kCFStringEncodingMacTurkish = 35, kCFStringEncodingMacCroatian = 36, kCFStringEncodingMacIcelandic = 37, kCFStringEncodingMacRomanian = 38, kCFStringEncodingMacCeltic = 39, kCFStringEncodingMacGaelic = 40, kCFStringEncodingMacFarsi = 0x8C, kCFStringEncodingMacUkrainian = 0x98, kCFStringEncodingMacInuit = 0xEC, kCFStringEncodingMacVT100 = 0xFC, kCFStringEncodingMacHFS = 0xFF, kCFStringEncodingISOLatin2 = 0x0202, kCFStringEncodingISOLatin3 = 0x0203, kCFStringEncodingISOLatin4 = 0x0204, kCFStringEncodingISOLatinCyrillic = 0x0205, kCFStringEncodingISOLatinArabic = 0x0206, kCFStringEncodingISOLatinGreek = 0x0207, kCFStringEncodingISOLatinHebrew = 0x0208, kCFStringEncodingISOLatin5 = 0x0209, kCFStringEncodingISOLatin6 = 0x020A, kCFStringEncodingISOLatinThai = 0x020B, kCFStringEncodingISOLatin7 = 0x020D, kCFStringEncodingISOLatin8 = 0x020E, kCFStringEncodingISOLatin9 = 0x020F, kCFStringEncodingISOLatin10 = 0x0210, kCFStringEncodingDOSLatinUS = 0x0400, kCFStringEncodingDOSGreek = 0x0405, kCFStringEncodingDOSBalticRim = 0x0406, kCFStringEncodingDOSLatin1 = 0x0410, kCFStringEncodingDOSGreek1 = 0x0411, kCFStringEncodingDOSLatin2 = 0x0412, kCFStringEncodingDOSCyrillic = 0x0413, kCFStringEncodingDOSTurkish = 0x0414, kCFStringEncodingDOSPortuguese = 0x0415, kCFStringEncodingDOSIcelandic = 0x0416, kCFStringEncodingDOSHebrew = 0x0417, kCFStringEncodingDOSCanadianFrench = 0x0418, kCFStringEncodingDOSArabic = 0x0419, kCFStringEncodingDOSNordic = 0x041A, kCFStringEncodingDOSRussian = 0x041B, kCFStringEncodingDOSGreek2 = 0x041C, kCFStringEncodingDOSThai = 0x041D, kCFStringEncodingDOSJapanese = 0x0420, kCFStringEncodingDOSChineseSimplif = 0x0421, kCFStringEncodingDOSKorean = 0x0422, kCFStringEncodingDOSChineseTrad = 0x0423, kCFStringEncodingWindowsLatin2 = 0x0501, kCFStringEncodingWindowsCyrillic = 0x0502, kCFStringEncodingWindowsGreek = 0x0503, kCFStringEncodingWindowsLatin5 = 0x0504, kCFStringEncodingWindowsHebrew = 0x0505, kCFStringEncodingWindowsArabic = 0x0506, kCFStringEncodingWindowsBalticRim = 0x0507, kCFStringEncodingWindowsVietnamese = 0x0508, kCFStringEncodingWindowsKoreanJohab = 0x0510, kCFStringEncodingANSEL = 0x0601, kCFStringEncodingJIS_X0201_76 = 0x0620, kCFStringEncodingJIS_X0208_83 = 0x0621, kCFStringEncodingJIS_X0208_90 = 0x0622, kCFStringEncodingJIS_X0212_90 = 0x0623, kCFStringEncodingJIS_C6226_78 = 0x0624, kCFStringEncodingShiftJIS_X0213 __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x0628, kCFStringEncodingShiftJIS_X0213_MenKuTen = 0x0629, kCFStringEncodingGB_2312_80 = 0x0630, kCFStringEncodingGBK_95 = 0x0631, kCFStringEncodingGB_18030_2000 = 0x0632, kCFStringEncodingKSC_5601_87 = 0x0640, kCFStringEncodingKSC_5601_92_Johab = 0x0641, kCFStringEncodingCNS_11643_92_P1 = 0x0651, kCFStringEncodingCNS_11643_92_P2 = 0x0652, kCFStringEncodingCNS_11643_92_P3 = 0x0653, kCFStringEncodingISO_2022_JP = 0x0820, kCFStringEncodingISO_2022_JP_2 = 0x0821, kCFStringEncodingISO_2022_JP_1 = 0x0822, kCFStringEncodingISO_2022_JP_3 = 0x0823, kCFStringEncodingISO_2022_CN = 0x0830, kCFStringEncodingISO_2022_CN_EXT = 0x0831, kCFStringEncodingISO_2022_KR = 0x0840, kCFStringEncodingEUC_JP = 0x0920, kCFStringEncodingEUC_CN = 0x0930, kCFStringEncodingEUC_TW = 0x0931, kCFStringEncodingEUC_KR = 0x0940, kCFStringEncodingShiftJIS = 0x0A01, kCFStringEncodingKOI8_R = 0x0A02, kCFStringEncodingBig5 = 0x0A03, kCFStringEncodingMacRomanLatin1 = 0x0A04, kCFStringEncodingHZ_GB_2312 = 0x0A05, kCFStringEncodingBig5_HKSCS_1999 = 0x0A06, kCFStringEncodingVISCII = 0x0A07, kCFStringEncodingKOI8_U = 0x0A08, kCFStringEncodingBig5_E = 0x0A09, kCFStringEncodingNextStepJapanese = 0x0B02, kCFStringEncodingEBCDIC_US = 0x0C01, kCFStringEncodingEBCDIC_CP037 = 0x0C02, kCFStringEncodingUTF7 __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x04000100, kCFStringEncodingUTF7_IMAP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x0A10, kCFStringEncodingShiftJIS_X0213_00 = 0x0628 }; } extern "C" { typedef const void * (*CFTreeRetainCallBack)(const void *info); typedef void (*CFTreeReleaseCallBack)(const void *info); typedef CFStringRef (*CFTreeCopyDescriptionCallBack)(const void *info); typedef struct { CFIndex version; void * info; CFTreeRetainCallBack retain; CFTreeReleaseCallBack release; CFTreeCopyDescriptionCallBack copyDescription; } CFTreeContext; typedef void (*CFTreeApplierFunction)(const void *value, void *context); typedef struct __attribute__((objc_bridge_mutable(id))) __CFTree * CFTreeRef; extern CFTypeID CFTreeGetTypeID(void); extern CFTreeRef CFTreeCreate(CFAllocatorRef allocator, const CFTreeContext *context); extern CFTreeRef CFTreeGetParent(CFTreeRef tree); extern CFTreeRef CFTreeGetNextSibling(CFTreeRef tree); extern CFTreeRef CFTreeGetFirstChild(CFTreeRef tree); extern void CFTreeGetContext(CFTreeRef tree, CFTreeContext *context); extern CFIndex CFTreeGetChildCount(CFTreeRef tree); extern CFTreeRef CFTreeGetChildAtIndex(CFTreeRef tree, CFIndex idx); extern void CFTreeGetChildren(CFTreeRef tree, CFTreeRef *children); extern void CFTreeApplyFunctionToChildren(CFTreeRef tree, CFTreeApplierFunction __attribute__((noescape)) applier, void *context); extern CFTreeRef CFTreeFindRoot(CFTreeRef tree); extern void CFTreeSetContext(CFTreeRef tree, const CFTreeContext *context); extern void CFTreePrependChild(CFTreeRef tree, CFTreeRef newChild); extern void CFTreeAppendChild(CFTreeRef tree, CFTreeRef newChild); extern void CFTreeInsertSibling(CFTreeRef tree, CFTreeRef newSibling); extern void CFTreeRemove(CFTreeRef tree); extern void CFTreeRemoveAllChildren(CFTreeRef tree); extern void CFTreeSortChildren(CFTreeRef tree, CFComparatorFunction comparator, void *context); } extern "C" { extern Boolean CFURLCreateDataAndPropertiesFromResource(CFAllocatorRef alloc, CFURLRef url, CFDataRef *resourceData, CFDictionaryRef *properties, CFArrayRef desiredProperties, SInt32 *errorCode) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="For resource data, use the CFReadStream API. For file resource properties, use CFURLCopyResourcePropertiesForKeys."))); extern Boolean CFURLWriteDataAndPropertiesToResource(CFURLRef url, CFDataRef dataToWrite, CFDictionaryRef propertiesToWrite, SInt32 *errorCode) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="For resource data, use the CFWriteStream API. For file resource properties, use CFURLSetResourcePropertiesForKeys."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="For resource data, use the CFWriteStream API. For file resource properties, use CFURLSetResourcePropertiesForKeys."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="For resource data, use the CFWriteStream API. For file resource properties, use CFURLSetResourcePropertiesForKeys."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="For resource data, use the CFWriteStream API. For file resource properties, use CFURLSetResourcePropertiesForKeys."))); extern Boolean CFURLDestroyResource(CFURLRef url, SInt32 *errorCode) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFURLGetFileSystemRepresentation and removefile(3) instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFURLGetFileSystemRepresentation and removefile(3) instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFURLGetFileSystemRepresentation and removefile(3) instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLGetFileSystemRepresentation and removefile(3) instead."))); extern CFTypeRef CFURLCreatePropertyFromResource(CFAllocatorRef alloc, CFURLRef url, CFStringRef property, SInt32 *errorCode) __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="For file resource properties, use CFURLCopyResourcePropertyForKey."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="For file resource properties, use CFURLCopyResourcePropertyForKey."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="For file resource properties, use CFURLCopyResourcePropertyForKey."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="For file resource properties, use CFURLCopyResourcePropertyForKey."))); typedef CFIndex CFURLError; enum { kCFURLUnknownError = -10L, kCFURLUnknownSchemeError = -11L, kCFURLResourceNotFoundError = -12L, kCFURLResourceAccessViolationError = -13L, kCFURLRemoteHostUnavailableError = -14L, kCFURLImproperArgumentsError = -15L, kCFURLUnknownPropertyKeyError = -16L, kCFURLPropertyKeyUnavailableError = -17L, kCFURLTimeoutError = -18L } __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFError codes instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFError codes instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFError codes instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFError codes instead"))); extern const CFStringRef kCFURLFileExists __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFURLResourceIsReachable instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFURLResourceIsReachable instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFURLResourceIsReachable instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLResourceIsReachable instead."))); extern const CFStringRef kCFURLFileDirectoryContents __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use the CFURLEnumerator API instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use the CFURLEnumerator API instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use the CFURLEnumerator API instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the CFURLEnumerator API instead."))); extern const CFStringRef kCFURLFileLength __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSizeKey instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSizeKey instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSizeKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSizeKey instead."))); extern const CFStringRef kCFURLFileLastModificationTime __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFURLCopyResourcePropertyForKey with kCFURLContentModificationDateKey instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLContentModificationDateKey instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLContentModificationDateKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLContentModificationDateKey instead."))); extern const CFStringRef kCFURLFilePOSIXMode __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))); extern const CFStringRef kCFURLFileOwnerID __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLCopyResourcePropertyForKey with kCFURLFileSecurityKey and then the CFFileSecurity API instead."))); extern const CFStringRef kCFURLHTTPStatusCode __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use NSHTTPURLResponse methods instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use NSHTTPURLResponse methods instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSHTTPURLResponse methods instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSHTTPURLResponse methods instead."))); extern const CFStringRef kCFURLHTTPStatusLine __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use NSHTTPURLResponse methods instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use NSHTTPURLResponse methods instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSHTTPURLResponse methods instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSHTTPURLResponse methods instead."))); } extern "C" { typedef const struct __attribute__((objc_bridge(id))) __CFUUID * CFUUIDRef; typedef struct { UInt8 byte0; UInt8 byte1; UInt8 byte2; UInt8 byte3; UInt8 byte4; UInt8 byte5; UInt8 byte6; UInt8 byte7; UInt8 byte8; UInt8 byte9; UInt8 byte10; UInt8 byte11; UInt8 byte12; UInt8 byte13; UInt8 byte14; UInt8 byte15; } CFUUIDBytes; extern CFTypeID CFUUIDGetTypeID(void); extern CFUUIDRef CFUUIDCreate(CFAllocatorRef alloc); extern CFUUIDRef CFUUIDCreateWithBytes(CFAllocatorRef alloc, UInt8 byte0, UInt8 byte1, UInt8 byte2, UInt8 byte3, UInt8 byte4, UInt8 byte5, UInt8 byte6, UInt8 byte7, UInt8 byte8, UInt8 byte9, UInt8 byte10, UInt8 byte11, UInt8 byte12, UInt8 byte13, UInt8 byte14, UInt8 byte15); extern CFUUIDRef CFUUIDCreateFromString(CFAllocatorRef alloc, CFStringRef uuidStr); extern CFStringRef CFUUIDCreateString(CFAllocatorRef alloc, CFUUIDRef uuid); extern CFUUIDRef CFUUIDGetConstantUUIDWithBytes(CFAllocatorRef alloc, UInt8 byte0, UInt8 byte1, UInt8 byte2, UInt8 byte3, UInt8 byte4, UInt8 byte5, UInt8 byte6, UInt8 byte7, UInt8 byte8, UInt8 byte9, UInt8 byte10, UInt8 byte11, UInt8 byte12, UInt8 byte13, UInt8 byte14, UInt8 byte15); extern CFUUIDBytes CFUUIDGetUUIDBytes(CFUUIDRef uuid); extern CFUUIDRef CFUUIDCreateFromUUIDBytes(CFAllocatorRef alloc, CFUUIDBytes bytes); } extern "C" { extern CFURLRef CFCopyHomeDirectoryURL(void) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); } typedef integer_t cpu_type_t; typedef integer_t cpu_subtype_t; typedef integer_t cpu_threadtype_t; extern "C" { typedef struct __attribute__((objc_bridge(id))) __CFBundle *CFBundleRef; typedef struct __attribute__((objc_bridge(id))) __CFBundle *CFPlugInRef; extern const CFStringRef kCFBundleInfoDictionaryVersionKey; extern const CFStringRef kCFBundleExecutableKey; extern const CFStringRef kCFBundleIdentifierKey; extern const CFStringRef kCFBundleVersionKey; extern const CFStringRef kCFBundleDevelopmentRegionKey; extern const CFStringRef kCFBundleNameKey; extern const CFStringRef kCFBundleLocalizationsKey; extern CFBundleRef CFBundleGetMainBundle(void); extern CFBundleRef CFBundleGetBundleWithIdentifier(CFStringRef bundleID); extern CFArrayRef CFBundleGetAllBundles(void); extern CFTypeID CFBundleGetTypeID(void); extern CFBundleRef CFBundleCreate(CFAllocatorRef allocator, CFURLRef bundleURL); extern CFArrayRef CFBundleCreateBundlesFromDirectory(CFAllocatorRef allocator, CFURLRef directoryURL, CFStringRef bundleType); extern CFURLRef CFBundleCopyBundleURL(CFBundleRef bundle); extern CFTypeRef CFBundleGetValueForInfoDictionaryKey(CFBundleRef bundle, CFStringRef key); extern CFDictionaryRef CFBundleGetInfoDictionary(CFBundleRef bundle); extern CFDictionaryRef CFBundleGetLocalInfoDictionary(CFBundleRef bundle); extern void CFBundleGetPackageInfo(CFBundleRef bundle, UInt32 *packageType, UInt32 *packageCreator); extern CFStringRef CFBundleGetIdentifier(CFBundleRef bundle); extern UInt32 CFBundleGetVersionNumber(CFBundleRef bundle); extern CFStringRef CFBundleGetDevelopmentRegion(CFBundleRef bundle); extern CFURLRef CFBundleCopySupportFilesDirectoryURL(CFBundleRef bundle); extern CFURLRef CFBundleCopyResourcesDirectoryURL(CFBundleRef bundle); extern CFURLRef CFBundleCopyPrivateFrameworksURL(CFBundleRef bundle); extern CFURLRef CFBundleCopySharedFrameworksURL(CFBundleRef bundle); extern CFURLRef CFBundleCopySharedSupportURL(CFBundleRef bundle); extern CFURLRef CFBundleCopyBuiltInPlugInsURL(CFBundleRef bundle); extern CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory(CFURLRef bundleURL); extern Boolean CFBundleGetPackageInfoInDirectory(CFURLRef url, UInt32 *packageType, UInt32 *packageCreator); extern CFURLRef CFBundleCopyResourceURL(CFBundleRef bundle, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName); extern CFArrayRef CFBundleCopyResourceURLsOfType(CFBundleRef bundle, CFStringRef resourceType, CFStringRef subDirName); extern CFStringRef CFBundleCopyLocalizedString(CFBundleRef bundle, CFStringRef key, CFStringRef value, CFStringRef tableName) __attribute__((format_arg(2))); extern CFURLRef CFBundleCopyResourceURLInDirectory(CFURLRef bundleURL, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName); extern CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory(CFURLRef bundleURL, CFStringRef resourceType, CFStringRef subDirName); extern CFArrayRef CFBundleCopyBundleLocalizations(CFBundleRef bundle); extern CFArrayRef CFBundleCopyPreferredLocalizationsFromArray(CFArrayRef locArray); extern CFArrayRef CFBundleCopyLocalizationsForPreferences(CFArrayRef locArray, CFArrayRef prefArray); extern CFURLRef CFBundleCopyResourceURLForLocalization(CFBundleRef bundle, CFStringRef resourceName, CFStringRef resourceType, CFStringRef subDirName, CFStringRef localizationName); extern CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization(CFBundleRef bundle, CFStringRef resourceType, CFStringRef subDirName, CFStringRef localizationName); extern CFDictionaryRef CFBundleCopyInfoDictionaryForURL(CFURLRef url); extern CFArrayRef CFBundleCopyLocalizationsForURL(CFURLRef url); extern CFArrayRef CFBundleCopyExecutableArchitecturesForURL(CFURLRef url) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFURLRef CFBundleCopyExecutableURL(CFBundleRef bundle); enum { kCFBundleExecutableArchitectureI386 = 0x00000007, kCFBundleExecutableArchitecturePPC = 0x00000012, kCFBundleExecutableArchitectureX86_64 = 0x01000007, kCFBundleExecutableArchitecturePPC64 = 0x01000012, kCFBundleExecutableArchitectureARM64 __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) = 0x0100000c, } __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFArrayRef CFBundleCopyExecutableArchitectures(CFBundleRef bundle) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFBundlePreflightExecutable(CFBundleRef bundle, CFErrorRef *error) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFBundleLoadExecutableAndReturnError(CFBundleRef bundle, CFErrorRef *error) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFBundleLoadExecutable(CFBundleRef bundle); extern Boolean CFBundleIsExecutableLoaded(CFBundleRef bundle); extern void CFBundleUnloadExecutable(CFBundleRef bundle); extern void *CFBundleGetFunctionPointerForName(CFBundleRef bundle, CFStringRef functionName); extern void CFBundleGetFunctionPointersForNames(CFBundleRef bundle, CFArrayRef functionNames, void *ftbl[]); extern void *CFBundleGetDataPointerForName(CFBundleRef bundle, CFStringRef symbolName); extern void CFBundleGetDataPointersForNames(CFBundleRef bundle, CFArrayRef symbolNames, void *stbl[]); extern CFURLRef CFBundleCopyAuxiliaryExecutableURL(CFBundleRef bundle, CFStringRef executableName); extern Boolean CFBundleIsExecutableLoadable(CFBundleRef bundle) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern Boolean CFBundleIsExecutableLoadableForURL(CFURLRef url) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern Boolean CFBundleIsArchitectureLoadable(cpu_type_t arch) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern CFPlugInRef CFBundleGetPlugIn(CFBundleRef bundle); typedef int CFBundleRefNum; extern CFBundleRefNum CFBundleOpenBundleResourceMap(CFBundleRef bundle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.15,message="The Carbon Resource Manager is deprecated. This should only be used to access Resource Manager-style resources in old bundles."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern SInt32 CFBundleOpenBundleResourceFiles(CFBundleRef bundle, CFBundleRefNum *refNum, CFBundleRefNum *localizedRefNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.15,message="The Carbon Resource Manager is deprecated. This should only be used to access Resource Manager-style resources in old bundles."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void CFBundleCloseBundleResourceMap(CFBundleRef bundle, CFBundleRefNum refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.15,message="The Carbon Resource Manager is deprecated. This should only be used to access Resource Manager-style resources in old bundles."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); } extern "C" { typedef struct __attribute__((objc_bridge_mutable(NSMessagePort))) __CFMessagePort * CFMessagePortRef; enum { kCFMessagePortSuccess = 0, kCFMessagePortSendTimeout = -1, kCFMessagePortReceiveTimeout = -2, kCFMessagePortIsInvalid = -3, kCFMessagePortTransportError = -4, kCFMessagePortBecameInvalidError = -5 }; typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); } CFMessagePortContext; typedef CFDataRef (*CFMessagePortCallBack)(CFMessagePortRef local, SInt32 msgid, CFDataRef data, void *info); typedef void (*CFMessagePortInvalidationCallBack)(CFMessagePortRef ms, void *info); extern CFTypeID CFMessagePortGetTypeID(void); extern CFMessagePortRef CFMessagePortCreateLocal(CFAllocatorRef allocator, CFStringRef name, CFMessagePortCallBack callout, CFMessagePortContext *context, Boolean *shouldFreeInfo); extern CFMessagePortRef CFMessagePortCreateRemote(CFAllocatorRef allocator, CFStringRef name); extern Boolean CFMessagePortIsRemote(CFMessagePortRef ms); extern CFStringRef CFMessagePortGetName(CFMessagePortRef ms); extern Boolean CFMessagePortSetName(CFMessagePortRef ms, CFStringRef newName); extern void CFMessagePortGetContext(CFMessagePortRef ms, CFMessagePortContext *context); extern void CFMessagePortInvalidate(CFMessagePortRef ms); extern Boolean CFMessagePortIsValid(CFMessagePortRef ms); extern CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack(CFMessagePortRef ms); extern void CFMessagePortSetInvalidationCallBack(CFMessagePortRef ms, CFMessagePortInvalidationCallBack callout); extern SInt32 CFMessagePortSendRequest(CFMessagePortRef remote, SInt32 msgid, CFDataRef data, CFTimeInterval sendTimeout, CFTimeInterval rcvTimeout, CFStringRef replyMode, CFDataRef *returnData); extern CFRunLoopSourceRef CFMessagePortCreateRunLoopSource(CFAllocatorRef allocator, CFMessagePortRef local, CFIndex order); extern void CFMessagePortSetDispatchQueue(CFMessagePortRef ms, dispatch_queue_t queue) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { extern const CFStringRef kCFPlugInDynamicRegistrationKey; extern const CFStringRef kCFPlugInDynamicRegisterFunctionKey; extern const CFStringRef kCFPlugInUnloadFunctionKey; extern const CFStringRef kCFPlugInFactoriesKey; extern const CFStringRef kCFPlugInTypesKey; typedef void (*CFPlugInDynamicRegisterFunction)(CFPlugInRef plugIn); typedef void (*CFPlugInUnloadFunction)(CFPlugInRef plugIn); typedef void *(*CFPlugInFactoryFunction)(CFAllocatorRef allocator, CFUUIDRef typeUUID); extern CFTypeID CFPlugInGetTypeID(void); extern CFPlugInRef CFPlugInCreate(CFAllocatorRef allocator, CFURLRef plugInURL); extern CFBundleRef CFPlugInGetBundle(CFPlugInRef plugIn); extern void CFPlugInSetLoadOnDemand(CFPlugInRef plugIn, Boolean flag); extern Boolean CFPlugInIsLoadOnDemand(CFPlugInRef plugIn); extern CFArrayRef CFPlugInFindFactoriesForPlugInType(CFUUIDRef typeUUID) __attribute__((cf_returns_retained)); extern CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn(CFUUIDRef typeUUID, CFPlugInRef plugIn) __attribute__((cf_returns_retained)); extern void *CFPlugInInstanceCreate(CFAllocatorRef allocator, CFUUIDRef factoryUUID, CFUUIDRef typeUUID); extern Boolean CFPlugInRegisterFactoryFunction(CFUUIDRef factoryUUID, CFPlugInFactoryFunction func); extern Boolean CFPlugInRegisterFactoryFunctionByName(CFUUIDRef factoryUUID, CFPlugInRef plugIn, CFStringRef functionName); extern Boolean CFPlugInUnregisterFactory(CFUUIDRef factoryUUID); extern Boolean CFPlugInRegisterPlugInType(CFUUIDRef factoryUUID, CFUUIDRef typeUUID); extern Boolean CFPlugInUnregisterPlugInType(CFUUIDRef factoryUUID, CFUUIDRef typeUUID); extern void CFPlugInAddInstanceForFactory(CFUUIDRef factoryID); extern void CFPlugInRemoveInstanceForFactory(CFUUIDRef factoryID); typedef struct __attribute__((objc_bridge(id))) __CFPlugInInstance *CFPlugInInstanceRef; typedef Boolean (*CFPlugInInstanceGetInterfaceFunction)(CFPlugInInstanceRef instance, CFStringRef interfaceName, void **ftbl); typedef void (*CFPlugInInstanceDeallocateInstanceDataFunction)(void *instanceData); extern Boolean CFPlugInInstanceGetInterfaceFunctionTable(CFPlugInInstanceRef instance, CFStringRef interfaceName, void **ftbl); extern CFStringRef CFPlugInInstanceGetFactoryName(CFPlugInInstanceRef instance) __attribute__((cf_returns_retained)); extern void *CFPlugInInstanceGetInstanceData(CFPlugInInstanceRef instance); extern CFTypeID CFPlugInInstanceGetTypeID(void); extern CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize(CFAllocatorRef allocator, CFIndex instanceDataSize, CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, CFStringRef factoryName, CFPlugInInstanceGetInterfaceFunction getInterfaceFunction); } extern "C" { typedef struct __attribute__((objc_bridge_mutable(NSMachPort))) __CFMachPort * CFMachPortRef; typedef struct { CFIndex version; void * info; const void *(*retain)(const void *info); void (*release)(const void *info); CFStringRef (*copyDescription)(const void *info); } CFMachPortContext; typedef void (*CFMachPortCallBack)(CFMachPortRef port, void *msg, CFIndex size, void *info); typedef void (*CFMachPortInvalidationCallBack)(CFMachPortRef port, void *info); extern CFTypeID CFMachPortGetTypeID(void); extern CFMachPortRef CFMachPortCreate(CFAllocatorRef allocator, CFMachPortCallBack callout, CFMachPortContext *context, Boolean *shouldFreeInfo); extern CFMachPortRef CFMachPortCreateWithPort(CFAllocatorRef allocator, mach_port_t portNum, CFMachPortCallBack callout, CFMachPortContext *context, Boolean *shouldFreeInfo); extern mach_port_t CFMachPortGetPort(CFMachPortRef port); extern void CFMachPortGetContext(CFMachPortRef port, CFMachPortContext *context); extern void CFMachPortInvalidate(CFMachPortRef port); extern Boolean CFMachPortIsValid(CFMachPortRef port); extern CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack(CFMachPortRef port); extern void CFMachPortSetInvalidationCallBack(CFMachPortRef port, CFMachPortInvalidationCallBack callout); extern CFRunLoopSourceRef CFMachPortCreateRunLoopSource(CFAllocatorRef allocator, CFMachPortRef port, CFIndex order); } extern "C" { typedef const struct __attribute__((objc_bridge(NSAttributedString))) __CFAttributedString *CFAttributedStringRef; typedef struct __attribute__((objc_bridge_mutable(NSMutableAttributedString))) __CFAttributedString *CFMutableAttributedStringRef; extern CFTypeID CFAttributedStringGetTypeID(void); extern CFAttributedStringRef CFAttributedStringCreate(CFAllocatorRef alloc, CFStringRef str, CFDictionaryRef attributes); extern CFAttributedStringRef CFAttributedStringCreateWithSubstring(CFAllocatorRef alloc, CFAttributedStringRef aStr, CFRange range); extern CFAttributedStringRef CFAttributedStringCreateCopy(CFAllocatorRef alloc, CFAttributedStringRef aStr); extern CFStringRef CFAttributedStringGetString(CFAttributedStringRef aStr); extern CFIndex CFAttributedStringGetLength(CFAttributedStringRef aStr); extern CFDictionaryRef CFAttributedStringGetAttributes(CFAttributedStringRef aStr, CFIndex loc, CFRange *effectiveRange); extern CFTypeRef CFAttributedStringGetAttribute(CFAttributedStringRef aStr, CFIndex loc, CFStringRef attrName, CFRange *effectiveRange); extern CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange(CFAttributedStringRef aStr, CFIndex loc, CFRange inRange, CFRange *longestEffectiveRange); extern CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange(CFAttributedStringRef aStr, CFIndex loc, CFStringRef attrName, CFRange inRange, CFRange *longestEffectiveRange); extern CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy(CFAllocatorRef alloc, CFIndex maxLength, CFAttributedStringRef aStr); extern CFMutableAttributedStringRef CFAttributedStringCreateMutable(CFAllocatorRef alloc, CFIndex maxLength); extern void CFAttributedStringReplaceString(CFMutableAttributedStringRef aStr, CFRange range, CFStringRef replacement); extern CFMutableStringRef CFAttributedStringGetMutableString(CFMutableAttributedStringRef aStr); extern void CFAttributedStringSetAttributes(CFMutableAttributedStringRef aStr, CFRange range, CFDictionaryRef replacement, Boolean clearOtherAttributes); extern void CFAttributedStringSetAttribute(CFMutableAttributedStringRef aStr, CFRange range, CFStringRef attrName, CFTypeRef value); extern void CFAttributedStringRemoveAttribute(CFMutableAttributedStringRef aStr, CFRange range, CFStringRef attrName); extern void CFAttributedStringReplaceAttributedString(CFMutableAttributedStringRef aStr, CFRange range, CFAttributedStringRef replacement); extern void CFAttributedStringBeginEditing(CFMutableAttributedStringRef aStr); extern void CFAttributedStringEndEditing(CFMutableAttributedStringRef aStr); } extern "C" { typedef const struct __attribute__((objc_bridge_mutable(id))) __CFURLEnumerator *CFURLEnumeratorRef; extern CFTypeID CFURLEnumeratorGetTypeID( void ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFOptionFlags CFURLEnumeratorOptions; enum { kCFURLEnumeratorDefaultBehavior = 0, kCFURLEnumeratorDescendRecursively = 1UL << 0, kCFURLEnumeratorSkipInvisibles = 1UL << 1, kCFURLEnumeratorGenerateFileReferenceURLs = 1UL << 2, kCFURLEnumeratorSkipPackageContents = 1UL << 3, kCFURLEnumeratorIncludeDirectoriesPreOrder = 1UL << 4, kCFURLEnumeratorIncludeDirectoriesPostOrder = 1UL << 5, kCFURLEnumeratorGenerateRelativePathURLs __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 1UL << 6, }; extern CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( CFAllocatorRef alloc, CFURLRef directoryURL, CFURLEnumeratorOptions option, CFArrayRef propertyKeys ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( CFAllocatorRef alloc, CFURLEnumeratorOptions option, CFArrayRef propertyKeys ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFIndex CFURLEnumeratorResult; enum { kCFURLEnumeratorSuccess = 1, kCFURLEnumeratorEnd = 2, kCFURLEnumeratorError = 3, kCFURLEnumeratorDirectoryPostOrderSuccess = 4, }; extern CFURLEnumeratorResult CFURLEnumeratorGetNextURL( CFURLEnumeratorRef enumerator, CFURLRef *url, CFErrorRef *error ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFURLEnumeratorSkipDescendents( CFURLEnumeratorRef enumerator ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFIndex CFURLEnumeratorGetDescendentLevel( CFURLEnumeratorRef enumerator ) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFURLEnumeratorGetSourceDidChange( CFURLEnumeratorRef enumerator ) __attribute__((availability(macos,introduced=10.6,deprecated=10.7,message="Use File System Events API instead"))) __attribute__((availability(ios,introduced=4.0,deprecated=5.0,message="Use File System Events API instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use File System Events API instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use File System Events API instead"))); } typedef union { unsigned char g_guid[16]; unsigned int g_guid_asint[16 / sizeof(unsigned int)]; } guid_t; #pragma pack(1) typedef struct { u_int8_t sid_kind; u_int8_t sid_authcount; u_int8_t sid_authority[6]; u_int32_t sid_authorities[16]; } ntsid_t; #pragma pack() struct kauth_identity_extlookup { u_int32_t el_seqno; u_int32_t el_result; u_int32_t el_flags; __darwin_pid_t el_info_pid; u_int64_t el_extend; u_int32_t el_info_reserved_1; uid_t el_uid; guid_t el_uguid; u_int32_t el_uguid_valid; ntsid_t el_usid; u_int32_t el_usid_valid; gid_t el_gid; guid_t el_gguid; u_int32_t el_gguid_valid; ntsid_t el_gsid; u_int32_t el_gsid_valid; u_int32_t el_member_valid; u_int32_t el_sup_grp_cnt; gid_t el_sup_groups[16]; }; struct kauth_cache_sizes { u_int32_t kcs_group_size; u_int32_t kcs_id_size; }; typedef u_int32_t kauth_ace_rights_t; struct kauth_ace { guid_t ace_applicable; u_int32_t ace_flags; kauth_ace_rights_t ace_rights; }; typedef struct kauth_ace *kauth_ace_t; struct kauth_acl { u_int32_t acl_entrycount; u_int32_t acl_flags; struct kauth_ace acl_ace[1]; }; typedef struct kauth_acl *kauth_acl_t; struct kauth_filesec { u_int32_t fsec_magic; guid_t fsec_owner; guid_t fsec_group; struct kauth_acl fsec_acl; }; typedef struct kauth_filesec *kauth_filesec_t; typedef enum { ACL_READ_DATA = (1<<1), ACL_LIST_DIRECTORY = (1<<1), ACL_WRITE_DATA = (1<<2), ACL_ADD_FILE = (1<<2), ACL_EXECUTE = (1<<3), ACL_SEARCH = (1<<3), ACL_DELETE = (1<<4), ACL_APPEND_DATA = (1<<5), ACL_ADD_SUBDIRECTORY = (1<<5), ACL_DELETE_CHILD = (1<<6), ACL_READ_ATTRIBUTES = (1<<7), ACL_WRITE_ATTRIBUTES = (1<<8), ACL_READ_EXTATTRIBUTES = (1<<9), ACL_WRITE_EXTATTRIBUTES = (1<<10), ACL_READ_SECURITY = (1<<11), ACL_WRITE_SECURITY = (1<<12), ACL_CHANGE_OWNER = (1<<13), ACL_SYNCHRONIZE = (1<<20), } acl_perm_t; typedef enum { ACL_UNDEFINED_TAG = 0, ACL_EXTENDED_ALLOW = 1, ACL_EXTENDED_DENY = 2 } acl_tag_t; typedef enum { ACL_TYPE_EXTENDED = 0x00000100, ACL_TYPE_ACCESS = 0x00000000, ACL_TYPE_DEFAULT = 0x00000001, ACL_TYPE_AFS = 0x00000002, ACL_TYPE_CODA = 0x00000003, ACL_TYPE_NTFS = 0x00000004, ACL_TYPE_NWFS = 0x00000005 } acl_type_t; typedef enum { ACL_FIRST_ENTRY = 0, ACL_NEXT_ENTRY = -1, ACL_LAST_ENTRY = -2 } acl_entry_id_t; typedef enum { ACL_FLAG_DEFER_INHERIT = (1 << 0), ACL_FLAG_NO_INHERIT = (1<<17), ACL_ENTRY_INHERITED = (1<<4), ACL_ENTRY_FILE_INHERIT = (1<<5), ACL_ENTRY_DIRECTORY_INHERIT = (1<<6), ACL_ENTRY_LIMIT_INHERIT = (1<<7), ACL_ENTRY_ONLY_INHERIT = (1<<8) } acl_flag_t; struct _acl; struct _acl_entry; struct _acl_permset; struct _acl_flagset; typedef struct _acl *acl_t; typedef struct _acl_entry *acl_entry_t; typedef struct _acl_permset *acl_permset_t; typedef struct _acl_flagset *acl_flagset_t; typedef u_int64_t acl_permset_mask_t; extern "C" { extern acl_t acl_dup(acl_t acl); extern int acl_free(void *obj_p); extern acl_t acl_init(int count); extern int acl_copy_entry(acl_entry_t dest_d, acl_entry_t src_d); extern int acl_create_entry(acl_t *acl_p, acl_entry_t *entry_p); extern int acl_create_entry_np(acl_t *acl_p, acl_entry_t *entry_p, int entry_index); extern int acl_delete_entry(acl_t acl, acl_entry_t entry_d); extern int acl_get_entry(acl_t acl, int entry_id, acl_entry_t *entry_p); extern int acl_valid(acl_t acl); extern int acl_valid_fd_np(int fd, acl_type_t type, acl_t acl); extern int acl_valid_file_np(const char *path, acl_type_t type, acl_t acl); extern int acl_valid_link_np(const char *path, acl_type_t type, acl_t acl); extern int acl_add_perm(acl_permset_t permset_d, acl_perm_t perm); extern int acl_calc_mask(acl_t *acl_p); extern int acl_clear_perms(acl_permset_t permset_d); extern int acl_delete_perm(acl_permset_t permset_d, acl_perm_t perm); extern int acl_get_perm_np(acl_permset_t permset_d, acl_perm_t perm); extern int acl_get_permset(acl_entry_t entry_d, acl_permset_t *permset_p); extern int acl_set_permset(acl_entry_t entry_d, acl_permset_t permset_d); extern int acl_maximal_permset_mask_np(acl_permset_mask_t * mask_p) __attribute__((availability(macosx,introduced=10.7))); extern int acl_get_permset_mask_np(acl_entry_t entry_d, acl_permset_mask_t * mask_p) __attribute__((availability(macosx,introduced=10.7))); extern int acl_set_permset_mask_np(acl_entry_t entry_d, acl_permset_mask_t mask) __attribute__((availability(macosx,introduced=10.7))); extern int acl_add_flag_np(acl_flagset_t flagset_d, acl_flag_t flag); extern int acl_clear_flags_np(acl_flagset_t flagset_d); extern int acl_delete_flag_np(acl_flagset_t flagset_d, acl_flag_t flag); extern int acl_get_flag_np(acl_flagset_t flagset_d, acl_flag_t flag); extern int acl_get_flagset_np(void *obj_p, acl_flagset_t *flagset_p); extern int acl_set_flagset_np(void *obj_p, acl_flagset_t flagset_d); extern void *acl_get_qualifier(acl_entry_t entry_d); extern int acl_get_tag_type(acl_entry_t entry_d, acl_tag_t *tag_type_p); extern int acl_set_qualifier(acl_entry_t entry_d, const void *tag_qualifier_p); extern int acl_set_tag_type(acl_entry_t entry_d, acl_tag_t tag_type); extern int acl_delete_def_file(const char *path_p); extern acl_t acl_get_fd(int fd); extern acl_t acl_get_fd_np(int fd, acl_type_t type); extern acl_t acl_get_file(const char *path_p, acl_type_t type); extern acl_t acl_get_link_np(const char *path_p, acl_type_t type); extern int acl_set_fd(int fd, acl_t acl); extern int acl_set_fd_np(int fd, acl_t acl, acl_type_t acl_type); extern int acl_set_file(const char *path_p, acl_type_t type, acl_t acl); extern int acl_set_link_np(const char *path_p, acl_type_t type, acl_t acl); extern ssize_t acl_copy_ext(void *buf_p, acl_t acl, ssize_t size); extern ssize_t acl_copy_ext_native(void *buf_p, acl_t acl, ssize_t size); extern acl_t acl_copy_int(const void *buf_p); extern acl_t acl_copy_int_native(const void *buf_p); extern acl_t acl_from_text(const char *buf_p); extern ssize_t acl_size(acl_t acl); extern char *acl_to_text(acl_t acl, ssize_t *len_p); } extern "C" { typedef struct __attribute__((objc_bridge_mutable(NSFileSecurity))) __CFFileSecurity* CFFileSecurityRef; extern CFTypeID CFFileSecurityGetTypeID(void) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFFileSecurityRef CFFileSecurityCreate(CFAllocatorRef allocator) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFFileSecurityRef CFFileSecurityCreateCopy(CFAllocatorRef allocator, CFFileSecurityRef fileSec) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityCopyOwnerUUID(CFFileSecurityRef fileSec, CFUUIDRef *ownerUUID) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecuritySetOwnerUUID(CFFileSecurityRef fileSec, CFUUIDRef ownerUUID) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityCopyGroupUUID(CFFileSecurityRef fileSec, CFUUIDRef *groupUUID) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecuritySetGroupUUID(CFFileSecurityRef fileSec, CFUUIDRef groupUUID) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityCopyAccessControlList(CFFileSecurityRef fileSec, acl_t *accessControlList) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecuritySetAccessControlList(CFFileSecurityRef fileSec, acl_t accessControlList) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityGetOwner(CFFileSecurityRef fileSec, uid_t *owner) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecuritySetOwner(CFFileSecurityRef fileSec, uid_t owner) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityGetGroup(CFFileSecurityRef fileSec, gid_t *group) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecuritySetGroup(CFFileSecurityRef fileSec, gid_t group) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityGetMode(CFFileSecurityRef fileSec, mode_t *mode) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecuritySetMode(CFFileSecurityRef fileSec, mode_t mode) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef CFOptionFlags CFFileSecurityClearOptions; enum { kCFFileSecurityClearOwner = 1UL << 0, kCFFileSecurityClearGroup = 1UL << 1, kCFFileSecurityClearMode = 1UL << 2, kCFFileSecurityClearOwnerUUID = 1UL << 3, kCFFileSecurityClearGroupUUID = 1UL << 4, kCFFileSecurityClearAccessControlList = 1UL << 5 } __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileSecurityClearProperties(CFFileSecurityRef fileSec, CFFileSecurityClearOptions clearPropertyMask) __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { extern CFStringRef CFStringTokenizerCopyBestStringLanguage(CFStringRef string, CFRange range) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef struct __attribute__((objc_bridge_mutable(id))) __CFStringTokenizer * CFStringTokenizerRef; enum { kCFStringTokenizerUnitWord = 0, kCFStringTokenizerUnitSentence = 1, kCFStringTokenizerUnitParagraph = 2, kCFStringTokenizerUnitLineBreak = 3, kCFStringTokenizerUnitWordBoundary = 4, kCFStringTokenizerAttributeLatinTranscription = 1UL << 16, kCFStringTokenizerAttributeLanguage = 1UL << 17, }; typedef CFOptionFlags CFStringTokenizerTokenType; enum { kCFStringTokenizerTokenNone = 0, kCFStringTokenizerTokenNormal = 1UL << 0, kCFStringTokenizerTokenHasSubTokensMask = 1UL << 1, kCFStringTokenizerTokenHasDerivedSubTokensMask = 1UL << 2, kCFStringTokenizerTokenHasHasNumbersMask = 1UL << 3, kCFStringTokenizerTokenHasNonLettersMask = 1UL << 4, kCFStringTokenizerTokenIsCJWordMask = 1UL << 5 }; extern CFTypeID CFStringTokenizerGetTypeID(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringTokenizerRef CFStringTokenizerCreate(CFAllocatorRef alloc, CFStringRef string, CFRange range, CFOptionFlags options, CFLocaleRef locale) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFStringTokenizerSetString(CFStringTokenizerRef tokenizer, CFStringRef string, CFRange range) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringTokenizerTokenType CFStringTokenizerGoToTokenAtIndex(CFStringTokenizerRef tokenizer, CFIndex index) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFStringTokenizerTokenType CFStringTokenizerAdvanceToNextToken(CFStringTokenizerRef tokenizer) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFRange CFStringTokenizerGetCurrentTokenRange(CFStringTokenizerRef tokenizer) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute(CFStringTokenizerRef tokenizer, CFOptionFlags attribute) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFIndex CFStringTokenizerGetCurrentSubTokens(CFStringTokenizerRef tokenizer, CFRange *ranges, CFIndex maxRangeLength, CFMutableArrayRef derivedSubTokens) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef int CFFileDescriptorNativeDescriptor; typedef struct __attribute__((objc_bridge_mutable(id))) __CFFileDescriptor * CFFileDescriptorRef; enum { kCFFileDescriptorReadCallBack = 1UL << 0, kCFFileDescriptorWriteCallBack = 1UL << 1 }; typedef void (*CFFileDescriptorCallBack)(CFFileDescriptorRef f, CFOptionFlags callBackTypes, void *info); typedef struct { CFIndex version; void * info; void * (*retain)(void *info); void (*release)(void *info); CFStringRef (*copyDescription)(void *info); } CFFileDescriptorContext; extern CFTypeID CFFileDescriptorGetTypeID(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFFileDescriptorRef CFFileDescriptorCreate(CFAllocatorRef allocator, CFFileDescriptorNativeDescriptor fd, Boolean closeOnInvalidate, CFFileDescriptorCallBack callout, const CFFileDescriptorContext *context) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFFileDescriptorNativeDescriptor CFFileDescriptorGetNativeDescriptor(CFFileDescriptorRef f) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFFileDescriptorGetContext(CFFileDescriptorRef f, CFFileDescriptorContext *context) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFFileDescriptorEnableCallBacks(CFFileDescriptorRef f, CFOptionFlags callBackTypes) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFFileDescriptorDisableCallBacks(CFFileDescriptorRef f, CFOptionFlags callBackTypes) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern void CFFileDescriptorInvalidate(CFFileDescriptorRef f) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern Boolean CFFileDescriptorIsValid(CFFileDescriptorRef f) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource(CFAllocatorRef allocator, CFFileDescriptorRef f, CFIndex order) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); } extern "C" { typedef struct __attribute__((objc_bridge_mutable(id))) __CFUserNotification * CFUserNotificationRef; typedef void (*CFUserNotificationCallBack)(CFUserNotificationRef userNotification, CFOptionFlags responseFlags); extern CFTypeID CFUserNotificationGetTypeID(void) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern CFUserNotificationRef CFUserNotificationCreate(CFAllocatorRef allocator, CFTimeInterval timeout, CFOptionFlags flags, SInt32 *error, CFDictionaryRef dictionary) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern SInt32 CFUserNotificationReceiveResponse(CFUserNotificationRef userNotification, CFTimeInterval timeout, CFOptionFlags *responseFlags) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern CFStringRef CFUserNotificationGetResponseValue(CFUserNotificationRef userNotification, CFStringRef key, CFIndex idx) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern CFDictionaryRef CFUserNotificationGetResponseDictionary(CFUserNotificationRef userNotification) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern SInt32 CFUserNotificationUpdate(CFUserNotificationRef userNotification, CFTimeInterval timeout, CFOptionFlags flags, CFDictionaryRef dictionary) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern SInt32 CFUserNotificationCancel(CFUserNotificationRef userNotification) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource(CFAllocatorRef allocator, CFUserNotificationRef userNotification, CFUserNotificationCallBack callout, CFIndex order) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern SInt32 CFUserNotificationDisplayNotice(CFTimeInterval timeout, CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef localizationURL, CFStringRef alertHeader, CFStringRef alertMessage, CFStringRef defaultButtonTitle) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern SInt32 CFUserNotificationDisplayAlert(CFTimeInterval timeout, CFOptionFlags flags, CFURLRef iconURL, CFURLRef soundURL, CFURLRef localizationURL, CFStringRef alertHeader, CFStringRef alertMessage, CFStringRef defaultButtonTitle, CFStringRef alternateButtonTitle, CFStringRef otherButtonTitle, CFOptionFlags *responseFlags) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); enum { kCFUserNotificationStopAlertLevel __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 0, kCFUserNotificationNoteAlertLevel __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 1, kCFUserNotificationCautionAlertLevel __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 2, kCFUserNotificationPlainAlertLevel __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 3 }; enum { kCFUserNotificationDefaultResponse __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 0, kCFUserNotificationAlternateResponse __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 1, kCFUserNotificationOtherResponse __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 2, kCFUserNotificationCancelResponse __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 3 }; enum { kCFUserNotificationNoDefaultButtonFlag __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = (1UL << 5), kCFUserNotificationUseRadioButtonsFlag __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = (1UL << 6) }; static __inline__ __attribute__((always_inline)) CFOptionFlags CFUserNotificationCheckBoxChecked(CFIndex i) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) {return ((CFOptionFlags)(1UL << (8 + i)));} static __inline__ __attribute__((always_inline)) CFOptionFlags CFUserNotificationSecureTextField(CFIndex i) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) {return ((CFOptionFlags)(1UL << (16 + i)));} static __inline__ __attribute__((always_inline)) CFOptionFlags CFUserNotificationPopUpSelection(CFIndex n) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) {return ((CFOptionFlags)(n << 24));} extern const CFStringRef kCFUserNotificationIconURLKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationSoundURLKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationLocalizationURLKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationAlertHeaderKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationAlertMessageKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationDefaultButtonTitleKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationAlternateButtonTitleKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationOtherButtonTitleKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationProgressIndicatorValueKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationPopUpTitlesKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationTextFieldTitlesKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationCheckBoxTitlesKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationTextFieldValuesKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationPopUpSelectionKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationAlertTopMostKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern const CFStringRef kCFUserNotificationKeyboardTypesKey __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); } extern "C" { enum { kCFXMLNodeCurrentVersion = 1 }; typedef const struct __CFXMLNode * CFXMLNodeRef; typedef CFTreeRef CFXMLTreeRef; typedef CFIndex CFXMLNodeTypeCode; enum { kCFXMLNodeTypeDocument = 1, kCFXMLNodeTypeElement = 2, kCFXMLNodeTypeAttribute = 3, kCFXMLNodeTypeProcessingInstruction = 4, kCFXMLNodeTypeComment = 5, kCFXMLNodeTypeText = 6, kCFXMLNodeTypeCDATASection = 7, kCFXMLNodeTypeDocumentFragment = 8, kCFXMLNodeTypeEntity = 9, kCFXMLNodeTypeEntityReference = 10, kCFXMLNodeTypeDocumentType = 11, kCFXMLNodeTypeWhitespace = 12, kCFXMLNodeTypeNotation = 13, kCFXMLNodeTypeElementTypeDeclaration = 14, kCFXMLNodeTypeAttributeListDeclaration = 15 }; typedef struct { CFDictionaryRef attributes; CFArrayRef attributeOrder; Boolean isEmpty; char _reserved[3]; } CFXMLElementInfo; typedef struct { CFStringRef dataString; } CFXMLProcessingInstructionInfo; typedef struct { CFURLRef sourceURL; CFStringEncoding encoding; } CFXMLDocumentInfo; typedef struct { CFURLRef systemID; CFStringRef publicID; } CFXMLExternalID; typedef struct { CFXMLExternalID externalID; } CFXMLDocumentTypeInfo; typedef struct { CFXMLExternalID externalID; } CFXMLNotationInfo; typedef struct { CFStringRef contentDescription; } CFXMLElementTypeDeclarationInfo; typedef struct { CFStringRef attributeName; CFStringRef typeString; CFStringRef defaultString; } CFXMLAttributeDeclarationInfo; typedef struct { CFIndex numberOfAttributes; CFXMLAttributeDeclarationInfo *attributes; } CFXMLAttributeListDeclarationInfo; typedef CFIndex CFXMLEntityTypeCode; enum { kCFXMLEntityTypeParameter, kCFXMLEntityTypeParsedInternal, kCFXMLEntityTypeParsedExternal, kCFXMLEntityTypeUnparsed, kCFXMLEntityTypeCharacter }; typedef struct { CFXMLEntityTypeCode entityType; CFStringRef replacementText; CFXMLExternalID entityID; CFStringRef notationName; } CFXMLEntityInfo; typedef struct { CFXMLEntityTypeCode entityType; } CFXMLEntityReferenceInfo; extern CFTypeID CFXMLNodeGetTypeID(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLNodeRef CFXMLNodeCreate(CFAllocatorRef alloc, CFXMLNodeTypeCode xmlType, CFStringRef dataString, const void *additionalInfoPtr, CFIndex version) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLNodeRef CFXMLNodeCreateCopy(CFAllocatorRef alloc, CFXMLNodeRef origNode) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLNodeTypeCode CFXMLNodeGetTypeCode(CFXMLNodeRef node) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFStringRef CFXMLNodeGetString(CFXMLNodeRef node) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern const void *CFXMLNodeGetInfoPtr(CFXMLNodeRef node) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFIndex CFXMLNodeGetVersion(CFXMLNodeRef node) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLTreeRef CFXMLTreeCreateWithNode(CFAllocatorRef allocator, CFXMLNodeRef node) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLNodeRef CFXMLTreeGetNode(CFXMLTreeRef xmlTree) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLNode is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); } extern "C" { typedef struct __CFXMLParser * CFXMLParserRef; typedef CFOptionFlags CFXMLParserOptions; enum { kCFXMLParserValidateDocument = (1UL << 0), kCFXMLParserSkipMetaData = (1UL << 1), kCFXMLParserReplacePhysicalEntities = (1UL << 2), kCFXMLParserSkipWhitespace = (1UL << 3), kCFXMLParserResolveExternalEntities = (1UL << 4), kCFXMLParserAddImpliedAttributes = (1UL << 5), kCFXMLParserAllOptions = 0x00FFFFFF, kCFXMLParserNoOptions = 0 }; typedef CFIndex CFXMLParserStatusCode; enum { kCFXMLStatusParseNotBegun = -2, kCFXMLStatusParseInProgress = -1, kCFXMLStatusParseSuccessful = 0, kCFXMLErrorUnexpectedEOF = 1, kCFXMLErrorUnknownEncoding, kCFXMLErrorEncodingConversionFailure, kCFXMLErrorMalformedProcessingInstruction, kCFXMLErrorMalformedDTD, kCFXMLErrorMalformedName, kCFXMLErrorMalformedCDSect, kCFXMLErrorMalformedCloseTag, kCFXMLErrorMalformedStartTag, kCFXMLErrorMalformedDocument, kCFXMLErrorElementlessDocument, kCFXMLErrorMalformedComment, kCFXMLErrorMalformedCharacterReference, kCFXMLErrorMalformedParsedCharacterData, kCFXMLErrorNoData }; typedef void * (*CFXMLParserCreateXMLStructureCallBack)(CFXMLParserRef parser, CFXMLNodeRef nodeDesc, void *info); typedef void (*CFXMLParserAddChildCallBack)(CFXMLParserRef parser, void *parent, void *child, void *info); typedef void (*CFXMLParserEndXMLStructureCallBack)(CFXMLParserRef parser, void *xmlType, void *info); typedef CFDataRef (*CFXMLParserResolveExternalEntityCallBack)(CFXMLParserRef parser, CFXMLExternalID *extID, void *info); typedef Boolean (*CFXMLParserHandleErrorCallBack)(CFXMLParserRef parser, CFXMLParserStatusCode error, void *info); typedef struct { CFIndex version; CFXMLParserCreateXMLStructureCallBack createXMLStructure; CFXMLParserAddChildCallBack addChild; CFXMLParserEndXMLStructureCallBack endXMLStructure; CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; CFXMLParserHandleErrorCallBack handleError; } CFXMLParserCallBacks; typedef const void * (*CFXMLParserRetainCallBack)(const void *info); typedef void (*CFXMLParserReleaseCallBack)(const void *info); typedef CFStringRef (*CFXMLParserCopyDescriptionCallBack)(const void *info); typedef struct { CFIndex version; void * info; CFXMLParserRetainCallBack retain; CFXMLParserReleaseCallBack release; CFXMLParserCopyDescriptionCallBack copyDescription; } CFXMLParserContext; extern CFTypeID CFXMLParserGetTypeID(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLParserRef CFXMLParserCreate(CFAllocatorRef allocator, CFDataRef xmlData, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes, CFXMLParserCallBacks *callBacks, CFXMLParserContext *context) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLParserRef CFXMLParserCreateWithDataFromURL(CFAllocatorRef allocator, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes, CFXMLParserCallBacks *callBacks, CFXMLParserContext *context) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern void CFXMLParserGetContext(CFXMLParserRef parser, CFXMLParserContext *context) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern void CFXMLParserGetCallBacks(CFXMLParserRef parser, CFXMLParserCallBacks *callBacks) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFURLRef CFXMLParserGetSourceURL(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFIndex CFXMLParserGetLocation(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFIndex CFXMLParserGetLineNumber(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern void *CFXMLParserGetDocument(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLParserStatusCode CFXMLParserGetStatusCode(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFStringRef CFXMLParserCopyErrorDescription(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern void CFXMLParserAbort(CFXMLParserRef parser, CFXMLParserStatusCode errorCode, CFStringRef errorDescription) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern Boolean CFXMLParserParse(CFXMLParserRef parser) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLTreeRef CFXMLTreeCreateFromData(CFAllocatorRef allocator, CFDataRef xmlData, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLTreeRef CFXMLTreeCreateFromDataWithError(CFAllocatorRef allocator, CFDataRef xmlData, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes, CFDictionaryRef *errorDict) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFXMLTreeRef CFXMLTreeCreateWithDataFromURL(CFAllocatorRef allocator, CFURLRef dataSource, CFOptionFlags parseOptions, CFIndex versionOfNodes) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFDataRef CFXMLTreeCreateXMLData(CFAllocatorRef allocator, CFXMLTreeRef xmlTree) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="CFXMLParser is deprecated, use NSXMLParser, NSXMLDocument or libxml2 library instead"))); extern CFStringRef CFXMLCreateStringByEscapingEntities(CFAllocatorRef allocator, CFStringRef string, CFDictionaryRef entitiesDictionary); extern CFStringRef CFXMLCreateStringByUnescapingEntities(CFAllocatorRef allocator, CFStringRef string, CFDictionaryRef entitiesDictionary); extern const CFStringRef kCFXMLTreeErrorDescription; extern const CFStringRef kCFXMLTreeErrorLineNumber; extern const CFStringRef kCFXMLTreeErrorLocation; extern const CFStringRef kCFXMLTreeErrorStatusCode; } #pragma clang assume_nonnull begin extern "C" double NSFoundationVersionNumber; // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_Protocol #define _REWRITER_typedef_Protocol typedef struct objc_object Protocol; typedef struct {} _objc_exc_Protocol; #endif typedef NSString * NSExceptionName __attribute__((swift_wrapper(struct))); typedef NSString * NSRunLoopMode __attribute__((swift_wrapper(struct))); extern "C" NSString *NSStringFromSelector(SEL aSelector); extern "C" SEL NSSelectorFromString(NSString *aSelectorName); extern "C" NSString *NSStringFromClass(Class aClass); extern "C" Class _Nullable NSClassFromString(NSString *aClassName); extern "C" NSString *NSStringFromProtocol(Protocol *proto) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" Protocol * _Nullable NSProtocolFromString(NSString *namestr) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" const char *NSGetSizeAndAlignment(const char *typePtr, NSUInteger * _Nullable sizep, NSUInteger * _Nullable alignp); extern "C" void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2))) __attribute__((not_tail_called)); extern "C" void NSLogv(NSString *format, va_list args) __attribute__((format(__NSString__, 1, 0))) __attribute__((not_tail_called)); typedef NSInteger NSComparisonResult; enum { NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending }; typedef NSComparisonResult (*NSComparator)(id obj1, id obj2); typedef NSUInteger NSEnumerationOptions; enum { NSEnumerationConcurrent = (1UL << 0), NSEnumerationReverse = (1UL << 1), }; typedef NSUInteger NSSortOptions; enum { NSSortConcurrent = (1UL << 0), NSSortStable = (1UL << 4), }; typedef NSInteger NSQualityOfService; enum { NSQualityOfServiceUserInteractive = 0x21, NSQualityOfServiceUserInitiated = 0x19, NSQualityOfServiceUtility = 0x11, NSQualityOfServiceBackground = 0x09, NSQualityOfServiceDefault = -1 } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); static const NSInteger NSNotFound = 9223372036854775807L; #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef struct _NSZone NSZone; extern "C" NSZone *NSDefaultMallocZone(void) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" NSZone *NSCreateZone(NSUInteger startSize, NSUInteger granularity, BOOL canFree) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" void NSRecycleZone(NSZone *zone)__attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" void NSSetZoneName(NSZone * _Nullable zone, NSString *name)__attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" NSString *NSZoneName(NSZone * _Nullable zone) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" NSZone * _Nullable NSZoneFromPointer(void *ptr) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" void *NSZoneMalloc(NSZone * _Nullable zone, NSUInteger size) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" void *NSZoneCalloc(NSZone * _Nullable zone, NSUInteger numElems, NSUInteger byteSize) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" void *NSZoneRealloc(NSZone * _Nullable zone, void * _Nullable ptr, NSUInteger size) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); extern "C" void NSZoneFree(NSZone * _Nullable zone, void *ptr) __attribute__((availability(swift, unavailable, message="Zone-based memory management is unavailable"))); enum { NSScannedOption = (1UL << 0), NSCollectorDisabledOption = (1UL << 1), }; extern "C" void *NSAllocateCollectable(NSUInteger size, NSUInteger options) __attribute__((availability(swift, unavailable, message="Garbage Collection is not supported"))); extern "C" void *NSReallocateCollectable(void * _Nullable ptr, NSUInteger size, NSUInteger options) __attribute__((availability(swift, unavailable, message="Garbage Collection is not supported"))); static __inline__ __attribute__((always_inline)) __attribute__((ns_returns_retained)) id _Nullable NSMakeCollectable(CFTypeRef _Nullable __attribute__((cf_consumed)) cf) __attribute__((availability(swift, unavailable, message="Garbage Collection is not supported"))); static __inline__ __attribute__((always_inline)) __attribute__((ns_returns_retained)) id _Nullable NSMakeCollectable(CFTypeRef _Nullable __attribute__((cf_consumed)) cf) { return (id)cf; } extern "C" NSUInteger NSPageSize(void); extern "C" NSUInteger NSLogPageSize(void); extern "C" NSUInteger NSRoundUpToMultipleOfPageSize(NSUInteger bytes); extern "C" NSUInteger NSRoundDownToMultipleOfPageSize(NSUInteger bytes); extern "C" void *NSAllocateMemoryPages(NSUInteger bytes); extern "C" void NSDeallocateMemoryPages(void *ptr, NSUInteger bytes); extern "C" void NSCopyMemoryPages(const void *source, void *dest, NSUInteger bytes); extern "C" NSUInteger NSRealMemoryAvailable(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="Use NSProcessInfo instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="Use NSProcessInfo instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSProcessInfo instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSProcessInfo instead"))); #pragma clang assume_nonnull end // @class NSInvocation; #ifndef _REWRITER_typedef_NSInvocation #define _REWRITER_typedef_NSInvocation typedef struct objc_object NSInvocation; typedef struct {} _objc_exc_NSInvocation; #endif #ifndef _REWRITER_typedef_NSMethodSignature #define _REWRITER_typedef_NSMethodSignature typedef struct objc_object NSMethodSignature; typedef struct {} _objc_exc_NSMethodSignature; #endif #ifndef _REWRITER_typedef_NSCoder #define _REWRITER_typedef_NSCoder typedef struct objc_object NSCoder; typedef struct {} _objc_exc_NSCoder; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSEnumerator #define _REWRITER_typedef_NSEnumerator typedef struct objc_object NSEnumerator; typedef struct {} _objc_exc_NSEnumerator; #endif // @class Protocol; #ifndef _REWRITER_typedef_Protocol #define _REWRITER_typedef_Protocol typedef struct objc_object Protocol; typedef struct {} _objc_exc_Protocol; #endif #pragma clang assume_nonnull begin // @protocol NSCopying // - (id)copyWithZone:(nullable NSZone *)zone; /* @end */ // @protocol NSMutableCopying // - (id)mutableCopyWithZone:(nullable NSZone *)zone; /* @end */ // @protocol NSCoding // - (void)encodeWithCoder:(NSCoder *)coder; // - (nullable instancetype)initWithCoder:(NSCoder *)coder; /* @end */ // @protocol NSSecureCoding <NSCoding> /* @required */ @property (class, readonly) BOOL supportsSecureCoding; /* @end */ // @interface NSObject (NSCoderMethods) // + (NSInteger)version; // + (void)setVersion:(NSInteger)aVersion; // @property (readonly) Class classForCoder; // - (nullable id)replacementObjectForCoder:(NSCoder *)coder; // - (nullable id)awakeAfterUsingCoder:(NSCoder *)coder __attribute__((ns_consumes_self)) __attribute__((ns_returns_retained)); /* @end */ // @interface NSObject (NSDeprecatedMethods) #if 0 + (void)poseAsClass:(Class)aClass __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Posing no longer supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Posing no longer supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Posing no longer supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Posing no longer supported"))) __attribute__((unavailable)) ; #endif /* @end */ // @protocol NSDiscardableContent /* @required */ // - (BOOL)beginContentAccess; // - (void)endContentAccess; // - (void)discardContentIfPossible; // - (BOOL)isContentDiscarded; /* @end */ // @interface NSObject (NSDiscardableContentProxy) // @property (readonly, retain) id autoContentAccessingProxy __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone * _Nullable zone) ; extern "C" void NSDeallocateObject(id object) ; extern "C" id NSCopyObject(id object, NSUInteger extraBytes, NSZone * _Nullable zone) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); extern "C" BOOL NSShouldRetainWithZone(id anObject, NSZone * _Nullable requestedZone) ; extern "C" void NSIncrementExtraRefCount(id object) ; extern "C" BOOL NSDecrementExtraRefCountWasZero(id object) ; extern "C" NSUInteger NSExtraRefCount(id object) ; static __inline__ __attribute__((always_inline)) __attribute__((cf_returns_retained)) CFTypeRef _Nullable CFBridgingRetain(id _Nullable X) { return X ? CFRetain((CFTypeRef)X) : __null; } static __inline__ __attribute__((always_inline)) id _Nullable CFBridgingRelease(CFTypeRef __attribute__((cf_consumed)) _Nullable X) __attribute__((ns_returns_retained)) { return ((id (*)(id, SEL))(void *)objc_msgSend)((id)CFMakeCollectable(X), sel_registerName("autorelease")); } #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef struct { unsigned long state; id __attribute__((objc_ownership(none))) _Nullable * _Nullable itemsPtr; unsigned long * _Nullable mutationsPtr; unsigned long extra[5]; } NSFastEnumerationState; // @protocol NSFastEnumeration // - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __attribute__((objc_ownership(none))) _Nullable [_Nonnull])buffer count:(NSUInteger)len; /* @end */ #ifndef _REWRITER_typedef_NSEnumerator #define _REWRITER_typedef_NSEnumerator typedef struct objc_object NSEnumerator; typedef struct {} _objc_exc_NSEnumerator; #endif struct NSEnumerator_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (nullable ObjectType)nextObject; /* @end */ // @interface NSEnumerator<ObjectType> (NSExtendedEnumerator) // @property (readonly, copy) NSArray<ObjectType> *allObjects; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSValue #define _REWRITER_typedef_NSValue typedef struct objc_object NSValue; typedef struct {} _objc_exc_NSValue; #endif struct NSValue_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (void)getValue:(void *)value size:(NSUInteger)size __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (readonly) const char *objCType __attribute__((objc_returns_inner_pointer)); // - (instancetype)initWithBytes:(const void *)value objCType:(const char *)type __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSValue (NSValueCreation) // + (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type; // + (NSValue *)value:(const void *)value withObjCType:(const char *)type; /* @end */ // @interface NSValue (NSValueExtensionMethods) // + (NSValue *)valueWithNonretainedObject:(nullable id)anObject; // @property (nullable, readonly) id nonretainedObjectValue; // + (NSValue *)valueWithPointer:(nullable const void *)pointer; // @property (nullable, readonly) void *pointerValue; // - (BOOL)isEqualToValue:(NSValue *)value; /* @end */ #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif struct NSNumber_IMPL { struct NSValue_IMPL NSValue_IVARS; }; // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithChar:(char)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithUnsignedChar:(unsigned char)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithShort:(short)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithUnsignedShort:(unsigned short)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithInt:(int)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithUnsignedInt:(unsigned int)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithLong:(long)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithUnsignedLong:(unsigned long)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithLongLong:(long long)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithUnsignedLongLong:(unsigned long long)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithFloat:(float)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithDouble:(double)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithBool:(BOOL)value __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithInteger:(NSInteger)value __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (NSNumber *)initWithUnsignedInteger:(NSUInteger)value __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // @property (readonly) char charValue; // @property (readonly) unsigned char unsignedCharValue; // @property (readonly) short shortValue; // @property (readonly) unsigned short unsignedShortValue; // @property (readonly) int intValue; // @property (readonly) unsigned int unsignedIntValue; // @property (readonly) long longValue; // @property (readonly) unsigned long unsignedLongValue; // @property (readonly) long long longLongValue; // @property (readonly) unsigned long long unsignedLongLongValue; // @property (readonly) float floatValue; // @property (readonly) double doubleValue; // @property (readonly) BOOL boolValue; // @property (readonly) NSInteger integerValue __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSUInteger unsignedIntegerValue __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *stringValue; // - (NSComparisonResult)compare:(NSNumber *)otherNumber; // - (BOOL)isEqualToNumber:(NSNumber *)number; // - (NSString *)descriptionWithLocale:(nullable id)locale; /* @end */ // @interface NSNumber (NSNumberCreation) // + (NSNumber *)numberWithChar:(char)value; // + (NSNumber *)numberWithUnsignedChar:(unsigned char)value; // + (NSNumber *)numberWithShort:(short)value; // + (NSNumber *)numberWithUnsignedShort:(unsigned short)value; // + (NSNumber *)numberWithInt:(int)value; // + (NSNumber *)numberWithUnsignedInt:(unsigned int)value; // + (NSNumber *)numberWithLong:(long)value; // + (NSNumber *)numberWithUnsignedLong:(unsigned long)value; // + (NSNumber *)numberWithLongLong:(long long)value; // + (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value; // + (NSNumber *)numberWithFloat:(float)value; // + (NSNumber *)numberWithDouble:(double)value; // + (NSNumber *)numberWithBool:(BOOL)value; // + (NSNumber *)numberWithInteger:(NSInteger)value __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSValue (NSDeprecated) // - (void)getValue:(void *)value __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="getValue:size:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getValue:size:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="getValue:size:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="getValue:size:"))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef struct _NSRange { NSUInteger location; NSUInteger length; } NSRange; typedef NSRange *NSRangePointer; static __inline__ __attribute__((always_inline)) NSRange NSMakeRange(NSUInteger loc, NSUInteger len) { NSRange r; r.location = loc; r.length = len; return r; } static __inline__ __attribute__((always_inline)) NSUInteger NSMaxRange(NSRange range) { return (range.location + range.length); } static __inline__ __attribute__((always_inline)) BOOL NSLocationInRange(NSUInteger loc, NSRange range) { return (!(loc < range.location) && (loc - range.location) < range.length) ? ((bool)1) : ((bool)0); } static __inline__ __attribute__((always_inline)) BOOL NSEqualRanges(NSRange range1, NSRange range2) { return (range1.location == range2.location && range1.length == range2.length); } extern "C" NSRange NSUnionRange(NSRange range1, NSRange range2); extern "C" NSRange NSIntersectionRange(NSRange range1, NSRange range2); extern "C" NSString *NSStringFromRange(NSRange range); extern "C" NSRange NSRangeFromString(NSString *aString); // @interface NSValue (NSValueRangeExtensions) // + (NSValue *)valueWithRange:(NSRange)range; // @property (readonly) NSRange rangeValue; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef NSInteger NSCollectionChangeType; enum { NSCollectionChangeInsert, NSCollectionChangeRemove } __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) #ifndef _REWRITER_typedef_NSOrderedCollectionChange #define _REWRITER_typedef_NSOrderedCollectionChange typedef struct objc_object NSOrderedCollectionChange; typedef struct {} _objc_exc_NSOrderedCollectionChange; #endif struct NSOrderedCollectionChange_IMPL { struct NSObject_IMPL NSObject_IVARS; }; #if 0 + (NSOrderedCollectionChange<ObjectType> *)changeWithObject:(nullable ObjectType)anObject type:(NSCollectionChangeType)type index:(NSUInteger)index; #endif #if 0 + (NSOrderedCollectionChange<ObjectType> *)changeWithObject:(nullable ObjectType)anObject type:(NSCollectionChangeType)type index:(NSUInteger)index associatedIndex:(NSUInteger)associatedIndex; #endif // @property (readonly, strong, nullable) ObjectType object; // @property (readonly) NSCollectionChangeType changeType; // @property (readonly) NSUInteger index; // @property (readonly) NSUInteger associatedIndex; // - (id)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #if 0 - (instancetype)initWithObject:(nullable ObjectType)anObject type:(NSCollectionChangeType)type index:(NSUInteger)index; #endif #if 0 - (instancetype)initWithObject:(nullable ObjectType)anObject type:(NSCollectionChangeType)type index:(NSUInteger)index associatedIndex:(NSUInteger)associatedIndex __attribute__((objc_designated_initializer)); #endif /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSIndexSet #define _REWRITER_typedef_NSIndexSet typedef struct objc_object NSIndexSet; typedef struct {} _objc_exc_NSIndexSet; #endif struct NSIndexSet_IMPL { struct NSObject_IMPL NSObject_IVARS; struct { NSUInteger _isEmpty : 1; NSUInteger _hasSingleRange : 1; NSUInteger _cacheValid : 1; NSUInteger _reservedArrayBinderController : 29; } _indexSetFlags; union { struct { NSRange _range; } _singleRange; struct { void * _Nonnull _data; void * _Nonnull _reserved; } _multipleRanges; } _internal; }; // + (instancetype)indexSet; // + (instancetype)indexSetWithIndex:(NSUInteger)value; // + (instancetype)indexSetWithIndexesInRange:(NSRange)range; // - (instancetype)initWithIndexesInRange:(NSRange)range __attribute__((objc_designated_initializer)); // - (instancetype)initWithIndexSet:(NSIndexSet *)indexSet __attribute__((objc_designated_initializer)); // - (instancetype)initWithIndex:(NSUInteger)value; // - (BOOL)isEqualToIndexSet:(NSIndexSet *)indexSet; // @property (readonly) NSUInteger count; // @property (readonly) NSUInteger firstIndex; // @property (readonly) NSUInteger lastIndex; // - (NSUInteger)indexGreaterThanIndex:(NSUInteger)value; // - (NSUInteger)indexLessThanIndex:(NSUInteger)value; // - (NSUInteger)indexGreaterThanOrEqualToIndex:(NSUInteger)value; // - (NSUInteger)indexLessThanOrEqualToIndex:(NSUInteger)value; // - (NSUInteger)getIndexes:(NSUInteger *)indexBuffer maxCount:(NSUInteger)bufferSize inIndexRange:(nullable NSRangePointer)range; // - (NSUInteger)countOfIndexesInRange:(NSRange)range __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)containsIndex:(NSUInteger)value; // - (BOOL)containsIndexesInRange:(NSRange)range; // - (BOOL)containsIndexes:(NSIndexSet *)indexSet; // - (BOOL)intersectsIndexesInRange:(NSRange)range; // - (void)enumerateIndexesUsingBlock:(void (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateIndexesWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateIndexesInRange:(NSRange)range options:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSUInteger)indexPassingTest:(BOOL (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSUInteger)indexWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSUInteger)indexInRange:(NSRange)range options:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSIndexSet *)indexesPassingTest:(BOOL (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSIndexSet *)indexesWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSIndexSet *)indexesInRange:(NSRange)range options:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateRangesUsingBlock:(void (__attribute__((noescape)) ^)(NSRange range, BOOL *stop))block __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateRangesWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSRange range, BOOL *stop))block __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateRangesInRange:(NSRange)range options:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSRange range, BOOL *stop))block __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #ifndef _REWRITER_typedef_NSMutableIndexSet #define _REWRITER_typedef_NSMutableIndexSet typedef struct objc_object NSMutableIndexSet; typedef struct {} _objc_exc_NSMutableIndexSet; #endif struct NSMutableIndexSet_IMPL { struct NSIndexSet_IMPL NSIndexSet_IVARS; void *_reserved; }; // - (void)addIndexes:(NSIndexSet *)indexSet; // - (void)removeIndexes:(NSIndexSet *)indexSet; // - (void)removeAllIndexes; // - (void)addIndex:(NSUInteger)value; // - (void)removeIndex:(NSUInteger)value; // - (void)addIndexesInRange:(NSRange)range; // - (void)removeIndexesInRange:(NSRange)range; // - (void)shiftIndexesStartingAtIndex:(NSUInteger)index by:(NSInteger)delta; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSUInteger NSOrderedCollectionDifferenceCalculationOptions; enum { NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = (1 << 0UL), NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = (1 << 1UL), NSOrderedCollectionDifferenceCalculationInferMoves = (1 << 2UL) } __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) #ifndef _REWRITER_typedef_NSOrderedCollectionDifference #define _REWRITER_typedef_NSOrderedCollectionDifference typedef struct objc_object NSOrderedCollectionDifference; typedef struct {} _objc_exc_NSOrderedCollectionDifference; #endif struct NSOrderedCollectionDifference_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithChanges:(NSArray<NSOrderedCollectionChange<ObjectType> *> *)changes; #if 0 - (instancetype)initWithInsertIndexes:(NSIndexSet *)inserts insertedObjects:(nullable NSArray<ObjectType> *)insertedObjects removeIndexes:(NSIndexSet *)removes removedObjects:(nullable NSArray<ObjectType> *)removedObjects additionalChanges:(NSArray<NSOrderedCollectionChange<ObjectType> *> *)changes __attribute__((objc_designated_initializer)); #endif #if 0 - (instancetype)initWithInsertIndexes:(NSIndexSet *)inserts insertedObjects:(nullable NSArray<ObjectType> *)insertedObjects removeIndexes:(NSIndexSet *)removes removedObjects:(nullable NSArray<ObjectType> *)removedObjects; #endif // @property (strong, readonly) NSArray<NSOrderedCollectionChange<ObjectType> *> *insertions __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (strong, readonly) NSArray<NSOrderedCollectionChange<ObjectType> *> *removals __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (assign, readonly) BOOL hasChanges; // - (NSOrderedCollectionDifference<id> *)differenceByTransformingChangesWithBlock:(NSOrderedCollectionChange<id> *(__attribute__((noescape)) ^)(NSOrderedCollectionChange<ObjectType> *))block; // - (instancetype)inverseDifference __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSIndexSet #define _REWRITER_typedef_NSIndexSet typedef struct objc_object NSIndexSet; typedef struct {} _objc_exc_NSIndexSet; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif struct NSArray_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger count; // - (ObjectType)objectAtIndex:(NSUInteger)index; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSArray<ObjectType> (NSExtendedArray) // - (NSArray<ObjectType> *)arrayByAddingObject:(ObjectType)anObject; // - (NSArray<ObjectType> *)arrayByAddingObjectsFromArray:(NSArray<ObjectType> *)otherArray; // - (NSString *)componentsJoinedByString:(NSString *)separator; // - (BOOL)containsObject:(ObjectType)anObject; // @property (readonly, copy) NSString *description; // - (NSString *)descriptionWithLocale:(nullable id)locale; // - (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level; // - (nullable ObjectType)firstObjectCommonWithArray:(NSArray<ObjectType> *)otherArray; // - (void)getObjects:(ObjectType _Nonnull __attribute__((objc_ownership(none))) [_Nonnull])objects range:(NSRange)range __attribute__((availability(swift, unavailable, message="Use 'subarrayWithRange()' instead"))); // - (NSUInteger)indexOfObject:(ObjectType)anObject; // - (NSUInteger)indexOfObject:(ObjectType)anObject inRange:(NSRange)range; // - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject; // - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range; // - (BOOL)isEqualToArray:(NSArray<ObjectType> *)otherArray; // @property (nullable, nonatomic, readonly) ObjectType firstObject __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, nonatomic, readonly) ObjectType lastObject; // - (NSEnumerator<ObjectType> *)objectEnumerator; // - (NSEnumerator<ObjectType> *)reverseObjectEnumerator; // @property (readonly, copy) NSData *sortedArrayHint; // - (NSArray<ObjectType> *)sortedArrayUsingFunction:(NSInteger (__attribute__((noescape)) *)(ObjectType, ObjectType, void * _Nullable))comparator context:(nullable void *)context; // - (NSArray<ObjectType> *)sortedArrayUsingFunction:(NSInteger (__attribute__((noescape)) *)(ObjectType, ObjectType, void * _Nullable))comparator context:(nullable void *)context hint:(nullable NSData *)hint; // - (NSArray<ObjectType> *)sortedArrayUsingSelector:(SEL)comparator; // - (NSArray<ObjectType> *)subarrayWithRange:(NSRange)range; // - (BOOL)writeToURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (void)makeObjectsPerformSelector:(SEL)aSelector __attribute__((availability(swift, unavailable, message="Use enumerateObjectsUsingBlock: or a for loop instead"))); // - (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument __attribute__((availability(swift, unavailable, message="Use enumerateObjectsUsingBlock: or a for loop instead"))); // - (NSArray<ObjectType> *)objectsAtIndexes:(NSIndexSet *)indexes; // - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateObjectsUsingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSUInteger)indexOfObjectPassingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSUInteger)indexOfObjectWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSUInteger)indexOfObjectAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape))^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator __attribute__((noescape)))cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSArray<ObjectType> *)sortedArrayWithOptions:(NSSortOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSBinarySearchingOptions; enum { NSBinarySearchingFirstEqual = (1UL << 8), NSBinarySearchingLastEqual = (1UL << 9), NSBinarySearchingInsertionIndex = (1UL << 10), }; // - (NSUInteger)indexOfObject:(ObjectType)obj inSortedRange:(NSRange)r options:(NSBinarySearchingOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmp __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSArray<ObjectType> (NSArrayCreation) // + (instancetype)array; // + (instancetype)arrayWithObject:(ObjectType)anObject; // + (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt; // + (instancetype)arrayWithObjects:(ObjectType)firstObj, ... __attribute__((sentinel(0,1))); // + (instancetype)arrayWithArray:(NSArray<ObjectType> *)array; // - (instancetype)initWithObjects:(ObjectType)firstObj, ... __attribute__((sentinel(0,1))); // - (instancetype)initWithArray:(NSArray<ObjectType> *)array; // - (instancetype)initWithArray:(NSArray<ObjectType> *)array copyItems:(BOOL)flag; // - (nullable NSArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // + (nullable NSArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(swift, unavailable, message="Use initializer instead"))); /* @end */ __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(swift, unavailable, message="NSArray diffing methods are not available in Swift, use Collection.difference(from:) instead"))) // @interface NSArray<ObjectType> (NSArrayDiffing) // - (NSOrderedCollectionDifference<ObjectType> *)differenceFromArray:(NSArray<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options usingEquivalenceTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj1, ObjectType obj2))block; // - (NSOrderedCollectionDifference<ObjectType> *)differenceFromArray:(NSArray<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options; // - (NSOrderedCollectionDifference<ObjectType> *)differenceFromArray:(NSArray<ObjectType> *)other; // - (nullable NSArray<ObjectType> *)arrayByApplyingDifference:(NSOrderedCollectionDifference<ObjectType> *)difference; /* @end */ // @interface NSArray<ObjectType> (NSDeprecated) // - (void)getObjects:(ObjectType _Nonnull __attribute__((objc_ownership(none))) [_Nonnull])objects __attribute__((availability(swift, unavailable, message="Use 'as [AnyObject]' instead"))) __attribute__((availability(macos,introduced=10.0,deprecated=10.13,message="Use -getObjects:range: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use -getObjects:range: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use -getObjects:range: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use -getObjects:range: instead"))); // + (nullable NSArray<ObjectType> *)arrayWithContentsOfFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))); // + (nullable NSArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="arrayWithContentsOfURL:error:"))); // - (nullable NSArray<ObjectType> *)initWithContentsOfFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))); // - (nullable NSArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))); // - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="writeToURL:error:"))); // - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="writeToURL:error:"))); /* @end */ #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif struct NSMutableArray_IMPL { struct NSArray_IMPL NSArray_IVARS; }; // - (void)addObject:(ObjectType)anObject; // - (void)insertObject:(ObjectType)anObject atIndex:(NSUInteger)index; // - (void)removeLastObject; // - (void)removeObjectAtIndex:(NSUInteger)index; // - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(ObjectType)anObject; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithCapacity:(NSUInteger)numItems __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSMutableArray<ObjectType> (NSExtendedMutableArray) // - (void)addObjectsFromArray:(NSArray<ObjectType> *)otherArray; // - (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2; // - (void)removeAllObjects; // - (void)removeObject:(ObjectType)anObject inRange:(NSRange)range; // - (void)removeObject:(ObjectType)anObject; // - (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range; // - (void)removeObjectIdenticalTo:(ObjectType)anObject; // - (void)removeObjectsFromIndices:(NSUInteger *)indices numIndices:(NSUInteger)cnt __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=4.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (void)removeObjectsInArray:(NSArray<ObjectType> *)otherArray; // - (void)removeObjectsInRange:(NSRange)range; // - (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray<ObjectType> *)otherArray range:(NSRange)otherRange; // - (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray<ObjectType> *)otherArray; // - (void)setArray:(NSArray<ObjectType> *)otherArray; // - (void)sortUsingFunction:(NSInteger (__attribute__((noescape)) *)(ObjectType, ObjectType, void * _Nullable))compare context:(nullable void *)context; // - (void)sortUsingSelector:(SEL)comparator; // - (void)insertObjects:(NSArray<ObjectType> *)objects atIndexes:(NSIndexSet *)indexes; // - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes; // - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withObjects:(NSArray<ObjectType> *)objects; // - (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)sortUsingComparator:(NSComparator __attribute__((noescape)))cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)sortWithOptions:(NSSortOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableArray<ObjectType> (NSMutableArrayCreation) // + (instancetype)arrayWithCapacity:(NSUInteger)numItems; // + (nullable NSMutableArray<ObjectType> *)arrayWithContentsOfFile:(NSString *)path; // + (nullable NSMutableArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url; // - (nullable NSMutableArray<ObjectType> *)initWithContentsOfFile:(NSString *)path; // - (nullable NSMutableArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url; /* @end */ __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(swift, unavailable, message="NSMutableArray diffing methods are not available in Swift"))) // @interface NSMutableArray<ObjectType> (NSMutableArrayDiffing) // - (void)applyDifference:(NSOrderedCollectionDifference<ObjectType> *)difference; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSAutoreleasePool #define _REWRITER_typedef_NSAutoreleasePool typedef struct objc_object NSAutoreleasePool; typedef struct {} _objc_exc_NSAutoreleasePool; #endif struct NSAutoreleasePool_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_token; void *_reserved3; void *_reserved2; void *_reserved; }; // + (void)addObject:(id)anObject; // - (void)addObject:(id)anObject; // - (void)drain; /* @end */ #pragma clang assume_nonnull end typedef unsigned short unichar; #pragma clang assume_nonnull begin // @class NSItemProvider; #ifndef _REWRITER_typedef_NSItemProvider #define _REWRITER_typedef_NSItemProvider typedef struct objc_object NSItemProvider; typedef struct {} _objc_exc_NSItemProvider; #endif #ifndef _REWRITER_typedef_NSProgress #define _REWRITER_typedef_NSProgress typedef struct objc_object NSProgress; typedef struct {} _objc_exc_NSProgress; #endif typedef NSInteger NSItemProviderRepresentationVisibility; enum { NSItemProviderRepresentationVisibilityAll = 0, NSItemProviderRepresentationVisibilityTeam __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(macos,unavailable))) = 1, NSItemProviderRepresentationVisibilityGroup __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 2 , NSItemProviderRepresentationVisibilityOwnProcess = 3, } __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); typedef NSInteger NSItemProviderFileOptions; enum { NSItemProviderFileOptionOpenInPlace = 1, } __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) // @protocol NSItemProviderWriting <NSObject> @property (class, atomic, readonly, copy) NSArray<NSString *> *writableTypeIdentifiersForItemProvider; /* @optional */ // @property (atomic, readonly, copy) NSArray<NSString *> *writableTypeIdentifiersForItemProvider; // + (NSItemProviderRepresentationVisibility)itemProviderVisibilityForRepresentationWithTypeIdentifier:(NSString *)typeIdentifier; // - (NSItemProviderRepresentationVisibility)itemProviderVisibilityForRepresentationWithTypeIdentifier:(NSString *)typeIdentifier; /* @required */ #if 0 - (nullable NSProgress *)loadDataWithTypeIdentifier:(NSString *)typeIdentifier forItemProviderCompletionHandler:(void (^)(NSData * _Nullable data, NSError * _Nullable error))completionHandler; #endif /* @end */ __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) // @protocol NSItemProviderReading <NSObject> @property (class, atomic, readonly, copy) NSArray<NSString *> *readableTypeIdentifiersForItemProvider; #if 0 + (nullable instancetype)objectWithItemProviderData:(NSData *)data typeIdentifier:(NSString *)typeIdentifier error:(NSError **)outError; #endif /* @end */ typedef void (*NSItemProviderCompletionHandler)(_Nullable __kindof id /*<NSSecureCoding>*/ item, NSError * _Null_unspecified error); typedef void (*NSItemProviderLoadHandler)(_Null_unspecified NSItemProviderCompletionHandler completionHandler, _Null_unspecified Class expectedValueClass, NSDictionary * _Null_unspecified options); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSItemProvider #define _REWRITER_typedef_NSItemProvider typedef struct objc_object NSItemProvider; typedef struct {} _objc_exc_NSItemProvider; #endif struct NSItemProvider_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)init __attribute__((objc_designated_initializer)); #if 0 - (void)registerDataRepresentationForTypeIdentifier:(NSString *)typeIdentifier visibility:(NSItemProviderRepresentationVisibility)visibility loadHandler:(NSProgress * _Nullable (^)(void (^completionHandler)(NSData * _Nullable data, NSError * _Nullable error)))loadHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif #if 0 - (void)registerFileRepresentationForTypeIdentifier:(NSString *)typeIdentifier fileOptions:(NSItemProviderFileOptions)fileOptions visibility:(NSItemProviderRepresentationVisibility)visibility loadHandler:(NSProgress * _Nullable (^)(void (^completionHandler)(NSURL * _Nullable url, BOOL coordinated, NSError * _Nullable error)))loadHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif // @property (copy, readonly, atomic) NSArray<NSString *> *registeredTypeIdentifiers; // - (NSArray<NSString *> *)registeredTypeIdentifiersWithFileOptions:(NSItemProviderFileOptions)fileOptions __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (BOOL)hasItemConformingToTypeIdentifier:(NSString *)typeIdentifier; #if 0 - (BOOL)hasRepresentationConformingToTypeIdentifier:(NSString *)typeIdentifier fileOptions:(NSItemProviderFileOptions)fileOptions __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif #if 0 - (NSProgress *)loadDataRepresentationForTypeIdentifier:(NSString *)typeIdentifier completionHandler:(void(^)(NSData * _Nullable data, NSError * _Nullable error))completionHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif #if 0 - (NSProgress *)loadFileRepresentationForTypeIdentifier:(NSString *)typeIdentifier completionHandler:(void(^)(NSURL * _Nullable url, NSError * _Nullable error))completionHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif #if 0 - (NSProgress *)loadInPlaceFileRepresentationForTypeIdentifier:(NSString *)typeIdentifier completionHandler:(void (^)(NSURL * _Nullable url, BOOL isInPlace, NSError * _Nullable error))completionHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif // @property (atomic, copy, nullable) NSString *suggestedName __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithObject:(id<NSItemProviderWriting>)object __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (void)registerObject:(id<NSItemProviderWriting>)object visibility:(NSItemProviderRepresentationVisibility)visibility __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #if 0 - (void)registerObjectOfClass:(Class<NSItemProviderWriting>)aClass visibility:(NSItemProviderRepresentationVisibility)visibility loadHandler:(NSProgress * _Nullable (^)(void (^completionHandler)(__kindof id<NSItemProviderWriting> _Nullable object, NSError * _Nullable error)))loadHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif // - (BOOL)canLoadObjectOfClass:(Class<NSItemProviderReading>)aClass __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #if 0 - (NSProgress *)loadObjectOfClass:(Class<NSItemProviderReading>)aClass completionHandler:(void (^)(__kindof id<NSItemProviderReading> _Nullable object, NSError * _Nullable error))completionHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif // - (instancetype)initWithItem:(nullable id<NSSecureCoding>)item typeIdentifier:(nullable NSString *)typeIdentifier __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithContentsOfURL:(null_unspecified NSURL *)fileURL; // - (void)registerItemForTypeIdentifier:(NSString *)typeIdentifier loadHandler:(NSItemProviderLoadHandler)loadHandler; // - (void)loadItemForTypeIdentifier:(NSString *)typeIdentifier options:(nullable NSDictionary *)options completionHandler:(nullable NSItemProviderCompletionHandler)completionHandler; /* @end */ extern "C" NSString * const NSItemProviderPreferredImageSizeKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @interface NSItemProvider(NSPreviewSupport) // @property (nullable, copy, atomic) NSItemProviderLoadHandler previewImageHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)loadPreviewImageWithOptions:(null_unspecified NSDictionary *)options completionHandler:(null_unspecified NSItemProviderCompletionHandler)completionHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSString * _Null_unspecified const NSExtensionJavaScriptPreprocessingResultsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * _Null_unspecified const NSExtensionJavaScriptFinalizeArgumentKey __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSString * const NSItemProviderErrorDomain __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSInteger NSItemProviderErrorCode; enum { NSItemProviderUnknownError = -1, NSItemProviderItemUnavailableError = -1000, NSItemProviderUnexpectedValueClassError = -1100, NSItemProviderUnavailableCoercionError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1200 } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSCharacterSet #define _REWRITER_typedef_NSCharacterSet typedef struct objc_object NSCharacterSet; typedef struct {} _objc_exc_NSCharacterSet; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSStringCompareOptions; enum { NSCaseInsensitiveSearch = 1, NSLiteralSearch = 2, NSBackwardsSearch = 4, NSAnchoredSearch = 8, NSNumericSearch = 64, NSDiacriticInsensitiveSearch __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 128, NSWidthInsensitiveSearch __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 256, NSForcedOrderingSearch __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 512, NSRegularExpressionSearch __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=3.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1024 }; typedef NSUInteger NSStringEncoding; enum { NSASCIIStringEncoding = 1, NSNEXTSTEPStringEncoding = 2, NSJapaneseEUCStringEncoding = 3, NSUTF8StringEncoding = 4, NSISOLatin1StringEncoding = 5, NSSymbolStringEncoding = 6, NSNonLossyASCIIStringEncoding = 7, NSShiftJISStringEncoding = 8, NSISOLatin2StringEncoding = 9, NSUnicodeStringEncoding = 10, NSWindowsCP1251StringEncoding = 11, NSWindowsCP1252StringEncoding = 12, NSWindowsCP1253StringEncoding = 13, NSWindowsCP1254StringEncoding = 14, NSWindowsCP1250StringEncoding = 15, NSISO2022JPStringEncoding = 21, NSMacOSRomanStringEncoding = 30, NSUTF16StringEncoding = NSUnicodeStringEncoding, NSUTF16BigEndianStringEncoding = 0x90000100, NSUTF16LittleEndianStringEncoding = 0x94000100, NSUTF32StringEncoding = 0x8c000100, NSUTF32BigEndianStringEncoding = 0x98000100, NSUTF32LittleEndianStringEncoding = 0x9c000100 }; typedef NSUInteger NSStringEncodingConversionOptions; enum { NSStringEncodingConversionAllowLossy = 1, NSStringEncodingConversionExternalRepresentation = 2 }; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif struct NSString_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger length; // - (unichar)characterAtIndex:(NSUInteger)index; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSString (NSStringExtensionMethods) // - (NSString *)substringFromIndex:(NSUInteger)from; // - (NSString *)substringToIndex:(NSUInteger)to; // - (NSString *)substringWithRange:(NSRange)range; // - (void)getCharacters:(unichar *)buffer range:(NSRange)range; // - (NSComparisonResult)compare:(NSString *)string; // - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask; // - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare; // - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare locale:(nullable id)locale; // - (NSComparisonResult)caseInsensitiveCompare:(NSString *)string; // - (NSComparisonResult)localizedCompare:(NSString *)string; // - (NSComparisonResult)localizedCaseInsensitiveCompare:(NSString *)string; // - (NSComparisonResult)localizedStandardCompare:(NSString *)string __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isEqualToString:(NSString *)aString; // - (BOOL)hasPrefix:(NSString *)str; // - (BOOL)hasSuffix:(NSString *)str; // - (NSString *)commonPrefixWithString:(NSString *)str options:(NSStringCompareOptions)mask; // - (BOOL)containsString:(NSString *)str __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)localizedCaseInsensitiveContainsString:(NSString *)str __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)localizedStandardContainsString:(NSString *)str __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSRange)localizedStandardRangeOfString:(NSString *)str __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSRange)rangeOfString:(NSString *)searchString; // - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask; // - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch; // - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch locale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet; // - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask; // - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch; // - (NSRange)rangeOfComposedCharacterSequenceAtIndex:(NSUInteger)index; // - (NSRange)rangeOfComposedCharacterSequencesForRange:(NSRange)range __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)stringByAppendingString:(NSString *)aString; // - (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2))); // @property (readonly) double doubleValue; // @property (readonly) float floatValue; // @property (readonly) int intValue; // @property (readonly) NSInteger integerValue __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) long long longLongValue __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL boolValue __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *uppercaseString; // @property (readonly, copy) NSString *lowercaseString; // @property (readonly, copy) NSString *capitalizedString; // @property (readonly, copy) NSString *localizedUppercaseString __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *localizedLowercaseString __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *localizedCapitalizedString __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)uppercaseStringWithLocale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)lowercaseStringWithLocale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)capitalizedStringWithLocale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getLineStart:(nullable NSUInteger *)startPtr end:(nullable NSUInteger *)lineEndPtr contentsEnd:(nullable NSUInteger *)contentsEndPtr forRange:(NSRange)range; // - (NSRange)lineRangeForRange:(NSRange)range; // - (void)getParagraphStart:(nullable NSUInteger *)startPtr end:(nullable NSUInteger *)parEndPtr contentsEnd:(nullable NSUInteger *)contentsEndPtr forRange:(NSRange)range; // - (NSRange)paragraphRangeForRange:(NSRange)range; typedef NSUInteger NSStringEnumerationOptions; enum { NSStringEnumerationByLines = 0, NSStringEnumerationByParagraphs = 1, NSStringEnumerationByComposedCharacterSequences = 2, NSStringEnumerationByWords = 3, NSStringEnumerationBySentences = 4, NSStringEnumerationByCaretPositions __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) = 5, NSStringEnumerationByDeletionClusters __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) = 6, NSStringEnumerationReverse = 1UL << 8, NSStringEnumerationSubstringNotRequired = 1UL << 9, NSStringEnumerationLocalized = 1UL << 10 }; // - (void)enumerateSubstringsInRange:(NSRange)range options:(NSStringEnumerationOptions)opts usingBlock:(void (^)(NSString * _Nullable substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateLinesUsingBlock:(void (^)(NSString *line, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly) const char *UTF8String __attribute__((objc_returns_inner_pointer)); // @property (readonly) NSStringEncoding fastestEncoding; // @property (readonly) NSStringEncoding smallestEncoding; // - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding allowLossyConversion:(BOOL)lossy; // - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding; // - (BOOL)canBeConvertedToEncoding:(NSStringEncoding)encoding; // - (nullable const char *)cStringUsingEncoding:(NSStringEncoding)encoding __attribute__((objc_returns_inner_pointer)); // - (BOOL)getCString:(char *)buffer maxLength:(NSUInteger)maxBufferCount encoding:(NSStringEncoding)encoding; // - (BOOL)getBytes:(nullable void *)buffer maxLength:(NSUInteger)maxBufferCount usedLength:(nullable NSUInteger *)usedBufferCount encoding:(NSStringEncoding)encoding options:(NSStringEncodingConversionOptions)options range:(NSRange)range remainingRange:(nullable NSRangePointer)leftover; // - (NSUInteger)maximumLengthOfBytesUsingEncoding:(NSStringEncoding)enc; // - (NSUInteger)lengthOfBytesUsingEncoding:(NSStringEncoding)enc; @property (class, readonly) const NSStringEncoding *availableStringEncodings; // + (NSString *)localizedNameOfStringEncoding:(NSStringEncoding)encoding; @property (class, readonly) NSStringEncoding defaultCStringEncoding; // @property (readonly, copy) NSString *decomposedStringWithCanonicalMapping; // @property (readonly, copy) NSString *precomposedStringWithCanonicalMapping; // @property (readonly, copy) NSString *decomposedStringWithCompatibilityMapping; // @property (readonly, copy) NSString *precomposedStringWithCompatibilityMapping; // - (NSArray<NSString *> *)componentsSeparatedByString:(NSString *)separator; // - (NSArray<NSString *> *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)separator __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)stringByTrimmingCharactersInSet:(NSCharacterSet *)set; // - (NSString *)stringByPaddingToLength:(NSUInteger)newLength withString:(NSString *)padString startingAtIndex:(NSUInteger)padIndex; // - (NSString *)stringByFoldingWithOptions:(NSStringCompareOptions)options locale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)stringByReplacingCharactersInRange:(NSRange)range withString:(NSString *)replacement __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString *NSStringTransform __attribute__((swift_wrapper(struct))); // - (nullable NSString *)stringByApplyingTransform:(NSStringTransform)transform reverse:(BOOL)reverse __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToKatakana __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToHiragana __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToHangul __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToArabic __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToHebrew __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToThai __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToCyrillic __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformLatinToGreek __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformToLatin __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformMandarinToLatin __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformHiraganaToKatakana __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformFullwidthToHalfwidth __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformToXMLHex __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformToUnicodeName __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformStripCombiningMarks __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringTransform const NSStringTransformStripDiacritics __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error; // - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error; // @property (readonly, copy) NSString *description; // @property (readonly) NSUInteger hash; // - (instancetype)initWithCharactersNoCopy:(unichar *)characters length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer; // - (instancetype)initWithCharactersNoCopy:(unichar *)chars length:(NSUInteger)len deallocator:(void(^_Nullable)(unichar *, NSUInteger))deallocator; // - (instancetype)initWithCharacters:(const unichar *)characters length:(NSUInteger)length; // - (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString; // - (instancetype)initWithString:(NSString *)aString; // - (instancetype)initWithFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2))); // - (instancetype)initWithFormat:(NSString *)format arguments:(va_list)argList __attribute__((format(__NSString__, 1, 0))); // - (instancetype)initWithFormat:(NSString *)format locale:(nullable id)locale, ... __attribute__((format(__NSString__, 1, 3))); // - (instancetype)initWithFormat:(NSString *)format locale:(nullable id)locale arguments:(va_list)argList __attribute__((format(__NSString__, 1, 0))); // - (nullable instancetype)initWithData:(NSData *)data encoding:(NSStringEncoding)encoding; // - (nullable instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding; // - (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer; // - (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding deallocator:(void(^_Nullable)(void *, NSUInteger))deallocator; // + (instancetype)string; // + (instancetype)stringWithString:(NSString *)string; // + (instancetype)stringWithCharacters:(const unichar *)characters length:(NSUInteger)length; // + (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString; // + (instancetype)stringWithFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2))); // + (instancetype)localizedStringWithFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2))); // - (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding; // + (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error; // - (nullable instancetype)initWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error; // + (nullable instancetype)stringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error; // + (nullable instancetype)stringWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error; // - (nullable instancetype)initWithContentsOfFile:(NSString *)path usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error; // + (nullable instancetype)stringWithContentsOfURL:(NSURL *)url usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error; // + (nullable instancetype)stringWithContentsOfFile:(NSString *)path usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error; /* @end */ typedef NSString * NSStringEncodingDetectionOptionsKey __attribute__((swift_wrapper(enum))); // @interface NSString (NSStringEncodingDetection) #if 0 + (NSStringEncoding)stringEncodingForData:(NSData *)data encodingOptions:(nullable NSDictionary<NSStringEncodingDetectionOptionsKey, id> *)opts convertedString:(NSString * _Nullable * _Nullable)string usedLossyConversion:(nullable BOOL *)usedLossyConversion __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #endif extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionSuggestedEncodingsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionDisallowedEncodingsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionUseOnlySuggestedEncodingsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionAllowLossyKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionFromWindowsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionLossySubstitutionKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionLikelyLanguageKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSString (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting> /* @end */ #ifndef _REWRITER_typedef_NSMutableString #define _REWRITER_typedef_NSMutableString typedef struct objc_object NSMutableString; typedef struct {} _objc_exc_NSMutableString; #endif struct NSMutableString_IMPL { struct NSString_IMPL NSString_IVARS; }; // - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString; /* @end */ // @interface NSMutableString (NSMutableStringExtensionMethods) // - (void)insertString:(NSString *)aString atIndex:(NSUInteger)loc; // - (void)deleteCharactersInRange:(NSRange)range; // - (void)appendString:(NSString *)aString; // - (void)appendFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2))); // - (void)setString:(NSString *)aString; // - (NSUInteger)replaceOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange; // - (BOOL)applyTransform:(NSStringTransform)transform reverse:(BOOL)reverse range:(NSRange)range updatedRange:(nullable NSRangePointer)resultingRange __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSMutableString *)initWithCapacity:(NSUInteger)capacity; // + (NSMutableString *)stringWithCapacity:(NSUInteger)capacity; /* @end */ extern "C" NSExceptionName const NSCharacterConversionException; extern "C" NSExceptionName const NSParseErrorException; // @interface NSString (NSExtendedStringPropertyListParsing) // - (id)propertyList; // - (nullable NSDictionary *)propertyListFromStringsFileFormat; /* @end */ // @interface NSString (NSStringDeprecated) // - (nullable const char *)cString __attribute__((objc_returns_inner_pointer)) __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -cStringUsingEncoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -cStringUsingEncoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -cStringUsingEncoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -cStringUsingEncoding: instead"))); // - (nullable const char *)lossyCString __attribute__((objc_returns_inner_pointer)) __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -cStringUsingEncoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -cStringUsingEncoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -cStringUsingEncoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -cStringUsingEncoding: instead"))); // - (NSUInteger)cStringLength __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -lengthOfBytesUsingEncoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -lengthOfBytesUsingEncoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -lengthOfBytesUsingEncoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -lengthOfBytesUsingEncoding: instead"))); // - (void)getCString:(char *)bytes __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -getCString:maxLength:encoding: instead"))); // - (void)getCString:(char *)bytes maxLength:(NSUInteger)maxLength __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -getCString:maxLength:encoding: instead"))); // - (void)getCString:(char *)bytes maxLength:(NSUInteger)maxLength range:(NSRange)aRange remainingRange:(nullable NSRangePointer)leftoverRange __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -getCString:maxLength:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -getCString:maxLength:encoding: instead"))); // - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -writeToFile:atomically:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -writeToFile:atomically:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -writeToFile:atomically:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -writeToFile:atomically:error: instead"))); // - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -writeToURL:atomically:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -writeToURL:atomically:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -writeToURL:atomically:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -writeToURL:atomically:error: instead"))); // - (nullable id)initWithContentsOfFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -initWithContentsOfFile:encoding:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -initWithContentsOfFile:encoding:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -initWithContentsOfFile:encoding:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -initWithContentsOfFile:encoding:error: instead"))); // - (nullable id)initWithContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -initWithContentsOfURL:encoding:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -initWithContentsOfURL:encoding:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -initWithContentsOfURL:encoding:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -initWithContentsOfURL:encoding:error: instead"))); // + (nullable id)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use +stringWithContentsOfFile:encoding:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use +stringWithContentsOfFile:encoding:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use +stringWithContentsOfFile:encoding:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use +stringWithContentsOfFile:encoding:error: instead"))); // + (nullable id)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use +stringWithContentsOfURL:encoding:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use +stringWithContentsOfURL:encoding:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use +stringWithContentsOfURL:encoding:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use +stringWithContentsOfURL:encoding:error: instead"))); // - (nullable id)initWithCStringNoCopy:(char *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -initWithCString:encoding: instead"))); // - (nullable id)initWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -initWithCString:encoding: instead"))); // - (nullable id)initWithCString:(const char *)bytes __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -initWithCString:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -initWithCString:encoding: instead"))); // + (nullable id)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use +stringWithCString:encoding:"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use +stringWithCString:encoding:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use +stringWithCString:encoding:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use +stringWithCString:encoding:"))); // + (nullable id)stringWithCString:(const char *)bytes __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use +stringWithCString:encoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use +stringWithCString:encoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use +stringWithCString:encoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use +stringWithCString:encoding: instead"))); // - (void)getCharacters:(unichar *)buffer; /* @end */ enum { NSProprietaryStringEncoding = 65536 }; __attribute__((availability(swift, unavailable, message="Use String or NSString instead."))) #ifndef _REWRITER_typedef_NSSimpleCString #define _REWRITER_typedef_NSSimpleCString typedef struct objc_object NSSimpleCString; typedef struct {} _objc_exc_NSSimpleCString; #endif struct NSSimpleCString_IMPL { struct NSString_IMPL NSString_IVARS; char *bytes; int numBytes; int _unused; }; /* @end */ __attribute__((availability(swift, unavailable, message="Use String or NSString instead."))) #ifndef _REWRITER_typedef_NSConstantString #define _REWRITER_typedef_NSConstantString typedef struct objc_object NSConstantString; typedef struct {} _objc_exc_NSConstantString; #endif struct NSConstantString_IMPL { struct NSSimpleCString_IMPL NSSimpleCString_IVARS; }; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif struct NSDictionary_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger count; // - (nullable ObjectType)objectForKey:(KeyType)aKey; // - (NSEnumerator<KeyType> *)keyEnumerator; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType <NSCopying> _Nonnull [_Nullable])keys count:(NSUInteger)cnt __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSDictionary<KeyType, ObjectType> (NSExtendedDictionary) // @property (readonly, copy) NSArray<KeyType> *allKeys; // - (NSArray<KeyType> *)allKeysForObject:(ObjectType)anObject; // @property (readonly, copy) NSArray<ObjectType> *allValues; // @property (readonly, copy) NSString *description; // @property (readonly, copy) NSString *descriptionInStringsFileFormat; // - (NSString *)descriptionWithLocale:(nullable id)locale; // - (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level; // - (BOOL)isEqualToDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary; // - (NSEnumerator<ObjectType> *)objectEnumerator; // - (NSArray<ObjectType> *)objectsForKeys:(NSArray<KeyType> *)keys notFoundMarker:(ObjectType)marker; // - (BOOL)writeToURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (NSArray<KeyType> *)keysSortedByValueUsingSelector:(SEL)comparator; // - (void)getObjects:(ObjectType _Nonnull __attribute__((objc_ownership(none))) [_Nullable])objects andKeys:(KeyType _Nonnull __attribute__((objc_ownership(none))) [_Nullable])keys count:(NSUInteger)count __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(swift, unavailable, message="Use 'allKeys' and/or 'allValues' instead"))); // - (nullable ObjectType)objectForKeyedSubscript:(KeyType)key __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateKeysAndObjectsUsingBlock:(void (__attribute__((noescape)) ^)(KeyType key, ObjectType obj, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateKeysAndObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(KeyType key, ObjectType obj, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSArray<KeyType> *)keysSortedByValueUsingComparator:(NSComparator __attribute__((noescape)))cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSArray<KeyType> *)keysSortedByValueWithOptions:(NSSortOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSSet<KeyType> *)keysOfEntriesPassingTest:(BOOL (__attribute__((noescape)) ^)(KeyType key, ObjectType obj, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSSet<KeyType> *)keysOfEntriesWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(KeyType key, ObjectType obj, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSDictionary<KeyType, ObjectType> (NSDeprecated) // - (void)getObjects:(ObjectType _Nonnull __attribute__((objc_ownership(none))) [_Nullable])objects andKeys:(KeyType _Nonnull __attribute__((objc_ownership(none))) [_Nullable])keys __attribute__((availability(swift, unavailable, message="Use 'allKeys' and/or 'allValues' instead"))) __attribute__((availability(macos,introduced=10.0,deprecated=10.13,message="Use -getObjects:andKeys:count: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use -getObjects:andKeys:count: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use -getObjects:andKeys:count: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use -getObjects:andKeys:count: instead"))); // + (nullable NSDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))); // + (nullable NSDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="dictionaryWithContentsOfURL:error:"))); // - (nullable NSDictionary<KeyType, ObjectType> *)initWithContentsOfFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))); // - (nullable NSDictionary<KeyType, ObjectType> *)initWithContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="initWithContentsOfURL:error:"))); // - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="writeToURL:error:"))); // - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="writeToURL:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="writeToURL:error:"))); /* @end */ // @interface NSDictionary<KeyType, ObjectType> (NSDictionaryCreation) // + (instancetype)dictionary; // + (instancetype)dictionaryWithObject:(ObjectType)object forKey:(KeyType <NSCopying>)key; // + (instancetype)dictionaryWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType <NSCopying> _Nonnull [_Nullable])keys count:(NSUInteger)cnt; // + (instancetype)dictionaryWithObjectsAndKeys:(id)firstObject, ... __attribute__((sentinel(0,1))) __attribute__((availability(swift, unavailable, message="Use dictionary literals instead"))); // + (instancetype)dictionaryWithDictionary:(NSDictionary<KeyType, ObjectType> *)dict; // + (instancetype)dictionaryWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys; // - (instancetype)initWithObjectsAndKeys:(id)firstObject, ... __attribute__((sentinel(0,1))); // - (instancetype)initWithDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary; // - (instancetype)initWithDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary copyItems:(BOOL)flag; // - (instancetype)initWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys; // - (nullable NSDictionary<NSString *, ObjectType> *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // + (nullable NSDictionary<NSString *, ObjectType> *)dictionaryWithContentsOfURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(swift, unavailable, message="Use initializer instead"))); /* @end */ #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif struct NSMutableDictionary_IMPL { struct NSDictionary_IMPL NSDictionary_IVARS; }; // - (void)removeObjectForKey:(KeyType)aKey; // - (void)setObject:(ObjectType)anObject forKey:(KeyType <NSCopying>)aKey; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithCapacity:(NSUInteger)numItems __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSMutableDictionary<KeyType, ObjectType> (NSExtendedMutableDictionary) // - (void)addEntriesFromDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary; // - (void)removeAllObjects; // - (void)removeObjectsForKeys:(NSArray<KeyType> *)keyArray; // - (void)setDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary; // - (void)setObject:(nullable ObjectType)obj forKeyedSubscript:(KeyType <NSCopying>)key __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableDictionary<KeyType, ObjectType> (NSMutableDictionaryCreation) // + (instancetype)dictionaryWithCapacity:(NSUInteger)numItems; // + (nullable NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfFile:(NSString *)path; // + (nullable NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfURL:(NSURL *)url; // - (nullable NSMutableDictionary<KeyType, ObjectType> *)initWithContentsOfFile:(NSString *)path; // - (nullable NSMutableDictionary<KeyType, ObjectType> *)initWithContentsOfURL:(NSURL *)url; /* @end */ // @interface NSDictionary<KeyType, ObjectType> (NSSharedKeySetDictionary) // + (id)sharedKeySetForKeys:(NSArray<KeyType <NSCopying>> *)keys __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableDictionary<KeyType, ObjectType> (NSSharedKeySetDictionary) // + (NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithSharedKeySet:(id)keyset __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSDictionary<K, V> (NSGenericFastEnumeraiton) <NSFastEnumeration> // - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(K __attribute__((objc_ownership(none))) _Nullable [_Nonnull])buffer count:(NSUInteger)len; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif struct NSSet_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger count; // - (nullable ObjectType)member:(ObjectType)object; // - (NSEnumerator<ObjectType> *)objectEnumerator; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSSet<ObjectType> (NSExtendedSet) // @property (readonly, copy) NSArray<ObjectType> *allObjects; // - (nullable ObjectType)anyObject; // - (BOOL)containsObject:(ObjectType)anObject; // @property (readonly, copy) NSString *description; // - (NSString *)descriptionWithLocale:(nullable id)locale; // - (BOOL)intersectsSet:(NSSet<ObjectType> *)otherSet; // - (BOOL)isEqualToSet:(NSSet<ObjectType> *)otherSet; // - (BOOL)isSubsetOfSet:(NSSet<ObjectType> *)otherSet; // - (void)makeObjectsPerformSelector:(SEL)aSelector __attribute__((availability(swift, unavailable, message="Use enumerateObjectsUsingBlock: or a for loop instead"))); // - (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument __attribute__((availability(swift, unavailable, message="Use enumerateObjectsUsingBlock: or a for loop instead"))); // - (NSSet<ObjectType> *)setByAddingObject:(ObjectType)anObject __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSSet<ObjectType> *)setByAddingObjectsFromSet:(NSSet<ObjectType> *)other __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSSet<ObjectType> *)setByAddingObjectsFromArray:(NSArray<ObjectType> *)other __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateObjectsUsingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSSet<ObjectType> *)objectsPassingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSSet<ObjectType> *)objectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, BOOL *stop))predicate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSSet<ObjectType> (NSSetCreation) // + (instancetype)set; // + (instancetype)setWithObject:(ObjectType)object; // + (instancetype)setWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt; // + (instancetype)setWithObjects:(ObjectType)firstObj, ... __attribute__((sentinel(0,1))); // + (instancetype)setWithSet:(NSSet<ObjectType> *)set; // + (instancetype)setWithArray:(NSArray<ObjectType> *)array; // - (instancetype)initWithObjects:(ObjectType)firstObj, ... __attribute__((sentinel(0,1))); // - (instancetype)initWithSet:(NSSet<ObjectType> *)set; // - (instancetype)initWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag; // - (instancetype)initWithArray:(NSArray<ObjectType> *)array; /* @end */ #ifndef _REWRITER_typedef_NSMutableSet #define _REWRITER_typedef_NSMutableSet typedef struct objc_object NSMutableSet; typedef struct {} _objc_exc_NSMutableSet; #endif struct NSMutableSet_IMPL { struct NSSet_IMPL NSSet_IVARS; }; // - (void)addObject:(ObjectType)object; // - (void)removeObject:(ObjectType)object; // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithCapacity:(NSUInteger)numItems __attribute__((objc_designated_initializer)); /* @end */ // @interface NSMutableSet<ObjectType> (NSExtendedMutableSet) // - (void)addObjectsFromArray:(NSArray<ObjectType> *)array; // - (void)intersectSet:(NSSet<ObjectType> *)otherSet; // - (void)minusSet:(NSSet<ObjectType> *)otherSet; // - (void)removeAllObjects; // - (void)unionSet:(NSSet<ObjectType> *)otherSet; // - (void)setSet:(NSSet<ObjectType> *)otherSet; /* @end */ // @interface NSMutableSet<ObjectType> (NSMutableSetCreation) // + (instancetype)setWithCapacity:(NSUInteger)numItems; /* @end */ #ifndef _REWRITER_typedef_NSCountedSet #define _REWRITER_typedef_NSCountedSet typedef struct objc_object NSCountedSet; typedef struct {} _objc_exc_NSCountedSet; #endif struct NSCountedSet_IMPL { struct NSMutableSet_IMPL NSMutableSet_IVARS; id _table; void *_reserved; }; // - (instancetype)initWithCapacity:(NSUInteger)numItems __attribute__((objc_designated_initializer)); // - (instancetype)initWithArray:(NSArray<ObjectType> *)array; // - (instancetype)initWithSet:(NSSet<ObjectType> *)set; // - (NSUInteger)countForObject:(ObjectType)object; // - (NSEnumerator<ObjectType> *)objectEnumerator; // - (void)addObject:(ObjectType)object; // - (void)removeObject:(ObjectType)object; /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSMutableSet #define _REWRITER_typedef_NSMutableSet typedef struct objc_object NSMutableSet; typedef struct {} _objc_exc_NSMutableSet; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSUUID #define _REWRITER_typedef_NSUUID typedef struct objc_object NSUUID; typedef struct {} _objc_exc_NSUUID; #endif #ifndef _REWRITER_typedef_NSXPCConnection #define _REWRITER_typedef_NSXPCConnection typedef struct objc_object NSXPCConnection; typedef struct {} _objc_exc_NSXPCConnection; #endif #ifndef _REWRITER_typedef_NSLock #define _REWRITER_typedef_NSLock typedef struct objc_object NSLock; typedef struct {} _objc_exc_NSLock; #endif typedef NSString * NSProgressKind __attribute__((swift_wrapper(struct))); typedef NSString * NSProgressUserInfoKey __attribute__((swift_wrapper(struct))); typedef NSString * NSProgressFileOperationKind __attribute__((swift_wrapper(struct))); #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSProgress #define _REWRITER_typedef_NSProgress typedef struct objc_object NSProgress; typedef struct {} _objc_exc_NSProgress; #endif struct NSProgress_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (nullable NSProgress *)currentProgress; // + (NSProgress *)progressWithTotalUnitCount:(int64_t)unitCount; // + (NSProgress *)discreteProgressWithTotalUnitCount:(int64_t)unitCount __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSProgress *)progressWithTotalUnitCount:(int64_t)unitCount parent:(NSProgress *)parent pendingUnitCount:(int64_t)portionOfParentTotalUnitCount __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithParent:(nullable NSProgress *)parentProgressOrNil userInfo:(nullable NSDictionary<NSProgressUserInfoKey, id> *)userInfoOrNil __attribute__((objc_designated_initializer)); // - (void)becomeCurrentWithPendingUnitCount:(int64_t)unitCount; // - (void)performAsCurrentWithPendingUnitCount:(int64_t)unitCount usingBlock:(void (__attribute__((noescape)) ^)(void))work __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((swift_private)); // - (void)resignCurrent; // - (void)addChild:(NSProgress *)child withPendingUnitCount:(int64_t)inUnitCount __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property int64_t totalUnitCount; // @property int64_t completedUnitCount; // @property (null_resettable, copy) NSString *localizedDescription; // @property (null_resettable, copy) NSString *localizedAdditionalDescription; // @property (getter=isCancellable) BOOL cancellable; // @property (getter=isPausable) BOOL pausable; // @property (readonly, getter=isCancelled) BOOL cancelled; // @property (readonly, getter=isPaused) BOOL paused; // @property (nullable, copy) void (^cancellationHandler)(void); // @property (nullable, copy) void (^pausingHandler)(void); // @property (nullable, copy) void (^resumingHandler)(void) __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)setUserInfoObject:(nullable id)objectOrNil forKey:(NSProgressUserInfoKey)key; // @property (readonly, getter=isIndeterminate) BOOL indeterminate; // @property (readonly) double fractionCompleted; // @property (readonly, getter=isFinished) BOOL finished; // - (void)cancel; // - (void)pause; // - (void)resume __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSDictionary<NSProgressUserInfoKey, id> *userInfo; // @property (nullable, copy) NSProgressKind kind; // @property (nullable, copy) NSNumber *estimatedTimeRemaining __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((swift_private)); // @property (nullable, copy) NSNumber *throughput __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((swift_private)); // @property (nullable, copy) NSProgressFileOperationKind fileOperationKind __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (nullable, copy) NSURL *fileURL __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (nullable, copy) NSNumber *fileTotalCount __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((swift_private)); // @property (nullable, copy) NSNumber *fileCompletedCount __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((swift_private)); // - (void)publish __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)unpublish __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef void (*NSProgressUnpublishingHandler)(void); typedef _Nullable NSProgressUnpublishingHandler (*NSProgressPublishingHandler)(NSProgress *progress); // + (id)addSubscriberForFileURL:(NSURL *)url withPublishingHandler:(NSProgressPublishingHandler)publishingHandler __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (void)removeSubscriber:(id)subscriber __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly, getter=isOld) BOOL old __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @protocol NSProgressReporting <NSObject> // @property (readonly) NSProgress *progress; /* @end */ extern "C" NSProgressUserInfoKey const NSProgressEstimatedTimeRemainingKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressUserInfoKey const NSProgressThroughputKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressKind const NSProgressKindFile __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressUserInfoKey const NSProgressFileOperationKindKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressFileOperationKind const NSProgressFileOperationKindDownloading __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressFileOperationKind const NSProgressFileOperationKindDecompressingAfterDownloading __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressFileOperationKind const NSProgressFileOperationKindReceiving __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressFileOperationKind const NSProgressFileOperationKindCopying __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressFileOperationKind const NSProgressFileOperationKindUploading __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressFileOperationKind const NSProgressFileOperationKindDuplicating __attribute__((availability(macosx,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); extern "C" NSProgressUserInfoKey const NSProgressFileURLKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressUserInfoKey const NSProgressFileTotalCountKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressUserInfoKey const NSProgressFileCompletedCountKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSProgressUserInfoKey const NSProgressFileAnimationImageKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSProgressUserInfoKey const NSProgressFileAnimationImageOriginalRectKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSProgressUserInfoKey const NSProgressFileIconKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang assume_nonnull end typedef NSString *NSNotificationName __attribute__((swift_wrapper(struct))); // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSNotification #define _REWRITER_typedef_NSNotification typedef struct objc_object NSNotification; typedef struct {} _objc_exc_NSNotification; #endif struct NSNotification_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSNotificationName name; // @property (nullable, readonly, retain) id object; // @property (nullable, readonly, copy) NSDictionary *userInfo; // - (instancetype)initWithName:(NSNotificationName)name object:(nullable id)object userInfo:(nullable NSDictionary *)userInfo __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSNotification (NSNotificationCreation) // + (instancetype)notificationWithName:(NSNotificationName)aName object:(nullable id)anObject; // + (instancetype)notificationWithName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo; // - (instancetype)init ; /* @end */ #ifndef _REWRITER_typedef_NSNotificationCenter #define _REWRITER_typedef_NSNotificationCenter typedef struct objc_object NSNotificationCenter; typedef struct {} _objc_exc_NSNotificationCenter; #endif struct NSNotificationCenter_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_impl; void *_callback; void *_pad[11]; }; @property (class, readonly, strong) NSNotificationCenter *defaultCenter; // - (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable id)anObject; // - (void)postNotification:(NSNotification *)notification; // - (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject; // - (void)postNotificationName:(NSNotificationName)aName object:(nullable id)anObject userInfo:(nullable NSDictionary *)aUserInfo; // - (void)removeObserver:(id)observer; // - (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable id)anObject; // - (id <NSObject>)addObserverForName:(nullable NSNotificationName)name object:(nullable id)obj queue:(nullable NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *note))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSUUID #define _REWRITER_typedef_NSUUID typedef struct objc_object NSUUID; typedef struct {} _objc_exc_NSUUID; #endif #ifndef _REWRITER_typedef_NSLock #define _REWRITER_typedef_NSLock typedef struct objc_object NSLock; typedef struct {} _objc_exc_NSLock; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSBundle #define _REWRITER_typedef_NSBundle typedef struct objc_object NSBundle; typedef struct {} _objc_exc_NSBundle; #endif struct NSBundle_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (class, readonly, strong) NSBundle *mainBundle; // + (nullable instancetype)bundleWithPath:(NSString *)path; // - (nullable instancetype)initWithPath:(NSString *)path __attribute__((objc_designated_initializer)); // + (nullable instancetype)bundleWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable instancetype)initWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSBundle *)bundleForClass:(Class)aClass; // + (nullable NSBundle *)bundleWithIdentifier:(NSString *)identifier; @property (class, readonly, copy) NSArray<NSBundle *> *allBundles; @property (class, readonly, copy) NSArray<NSBundle *> *allFrameworks; // - (BOOL)load; // @property (readonly, getter=isLoaded) BOOL loaded; // - (BOOL)unload; // - (BOOL)preflightAndReturnError:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)loadAndReturnError:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSURL *bundleURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *resourceURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *executableURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForAuxiliaryExecutable:(NSString *)executableName __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *privateFrameworksURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *sharedFrameworksURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *sharedSupportURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *builtInPlugInsURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *appStoreReceiptURL __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *bundlePath; // @property (nullable, readonly, copy) NSString *resourcePath; // @property (nullable, readonly, copy) NSString *executablePath; // - (nullable NSString *)pathForAuxiliaryExecutable:(NSString *)executableName; // @property (nullable, readonly, copy) NSString *privateFrameworksPath; // @property (nullable, readonly, copy) NSString *sharedFrameworksPath; // @property (nullable, readonly, copy) NSString *sharedSupportPath; // @property (nullable, readonly, copy) NSString *builtInPlugInsPath; // + (nullable NSURL *)URLForResource:(nullable NSString *)name withExtension:(nullable NSString *)ext subdirectory:(nullable NSString *)subpath inBundleWithURL:(NSURL *)bundleURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSArray<NSURL *> *)URLsForResourcesWithExtension:(nullable NSString *)ext subdirectory:(nullable NSString *)subpath inBundleWithURL:(NSURL *)bundleURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForResource:(nullable NSString *)name withExtension:(nullable NSString *)ext __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForResource:(nullable NSString *)name withExtension:(nullable NSString *)ext subdirectory:(nullable NSString *)subpath __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForResource:(nullable NSString *)name withExtension:(nullable NSString *)ext subdirectory:(nullable NSString *)subpath localization:(nullable NSString *)localizationName __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSArray<NSURL *> *)URLsForResourcesWithExtension:(nullable NSString *)ext subdirectory:(nullable NSString *)subpath __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSArray<NSURL *> *)URLsForResourcesWithExtension:(nullable NSString *)ext subdirectory:(nullable NSString *)subpath localization:(nullable NSString *)localizationName __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext inDirectory:(NSString *)bundlePath; // + (NSArray<NSString *> *)pathsForResourcesOfType:(nullable NSString *)ext inDirectory:(NSString *)bundlePath; // - (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext; // - (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext inDirectory:(nullable NSString *)subpath; // - (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext inDirectory:(nullable NSString *)subpath forLocalization:(nullable NSString *)localizationName; // - (NSArray<NSString *> *)pathsForResourcesOfType:(nullable NSString *)ext inDirectory:(nullable NSString *)subpath; // - (NSArray<NSString *> *)pathsForResourcesOfType:(nullable NSString *)ext inDirectory:(nullable NSString *)subpath forLocalization:(nullable NSString *)localizationName; // - (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName __attribute__ ((format_arg(1))); // - (NSAttributedString *)localizedAttributedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName __attribute__ ((format_arg(1))) __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); // @property (nullable, readonly, copy) NSString *bundleIdentifier; // @property (nullable, readonly, copy) NSDictionary<NSString *, id> *infoDictionary; // @property (nullable, readonly, copy) NSDictionary<NSString *, id> *localizedInfoDictionary; // - (nullable id)objectForInfoDictionaryKey:(NSString *)key; // - (nullable Class)classNamed:(NSString *)className; // @property (nullable, readonly) Class principalClass; // @property (readonly, copy) NSArray<NSString *> *preferredLocalizations; // @property (readonly, copy) NSArray<NSString *> *localizations; // @property (nullable, readonly, copy) NSString *developmentLocalization; // + (NSArray<NSString *> *)preferredLocalizationsFromArray:(NSArray<NSString *> *)localizationsArray; // + (NSArray<NSString *> *)preferredLocalizationsFromArray:(NSArray<NSString *> *)localizationsArray forPreferences:(nullable NSArray<NSString *> *)preferencesArray; enum { NSBundleExecutableArchitectureI386 = 0x00000007, NSBundleExecutableArchitecturePPC = 0x00000012, NSBundleExecutableArchitectureX86_64 = 0x01000007, NSBundleExecutableArchitecturePPC64 = 0x01000012, NSBundleExecutableArchitectureARM64 __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) = 0x0100000c }; // @property (nullable, readonly, copy) NSArray<NSNumber *> *executableArchitectures __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSString (NSBundleExtensionMethods) // - (NSString *)variantFittingPresentationWidth:(NSInteger)width __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSBundleDidLoadNotification; extern "C" NSString * const NSLoadedClasses; __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))) #ifndef _REWRITER_typedef_NSBundleResourceRequest #define _REWRITER_typedef_NSBundleResourceRequest typedef struct objc_object NSBundleResourceRequest; typedef struct {} _objc_exc_NSBundleResourceRequest; #endif struct NSBundleResourceRequest_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithTags:(NSSet<NSString *> *)tags; // - (instancetype)initWithTags:(NSSet<NSString *> *)tags bundle:(NSBundle *)bundle __attribute__((objc_designated_initializer)); // @property double loadingPriority; // @property (readonly, copy) NSSet<NSString *> *tags; // @property (readonly, strong) NSBundle *bundle; // - (void)beginAccessingResourcesWithCompletionHandler:(void (^)(NSError * _Nullable error))completionHandler; // - (void)conditionallyBeginAccessingResourcesWithCompletionHandler:(void (^)(BOOL resourcesAvailable))completionHandler; // - (void)endAccessingResources; // @property (readonly, strong) NSProgress *progress; /* @end */ // @interface NSBundle (NSBundleResourceRequestAdditions) // - (void)setPreservationPriority:(double)priority forTags:(NSSet<NSString *> *)tags __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); // - (double)preservationPriorityForTag:(NSString *)tag __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); /* @end */ extern "C" NSNotificationName const NSBundleResourceRequestLowDiskSpaceNotification __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" double const NSBundleResourceRequestLoadingPriorityUrgent __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); #pragma clang assume_nonnull end enum { NS_UnknownByteOrder = CFByteOrderUnknown, NS_LittleEndian = CFByteOrderLittleEndian, NS_BigEndian = CFByteOrderBigEndian }; static __inline__ __attribute__((always_inline)) long NSHostByteOrder(void) { return CFByteOrderGetCurrent(); } static __inline__ __attribute__((always_inline)) unsigned short NSSwapShort(unsigned short inv) { return CFSwapInt16(inv); } static __inline__ __attribute__((always_inline)) unsigned int NSSwapInt(unsigned int inv) { return CFSwapInt32(inv); } static __inline__ __attribute__((always_inline)) unsigned long NSSwapLong(unsigned long inv) { return CFSwapInt64(inv); } static __inline__ __attribute__((always_inline)) unsigned long long NSSwapLongLong(unsigned long long inv) { return CFSwapInt64(inv); } static __inline__ __attribute__((always_inline)) unsigned short NSSwapBigShortToHost(unsigned short x) { return CFSwapInt16BigToHost(x); } static __inline__ __attribute__((always_inline)) unsigned int NSSwapBigIntToHost(unsigned int x) { return CFSwapInt32BigToHost(x); } static __inline__ __attribute__((always_inline)) unsigned long NSSwapBigLongToHost(unsigned long x) { return CFSwapInt64BigToHost(x); } static __inline__ __attribute__((always_inline)) unsigned long long NSSwapBigLongLongToHost(unsigned long long x) { return CFSwapInt64BigToHost(x); } static __inline__ __attribute__((always_inline)) unsigned short NSSwapHostShortToBig(unsigned short x) { return CFSwapInt16HostToBig(x); } static __inline__ __attribute__((always_inline)) unsigned int NSSwapHostIntToBig(unsigned int x) { return CFSwapInt32HostToBig(x); } static __inline__ __attribute__((always_inline)) unsigned long NSSwapHostLongToBig(unsigned long x) { return CFSwapInt64HostToBig(x); } static __inline__ __attribute__((always_inline)) unsigned long long NSSwapHostLongLongToBig(unsigned long long x) { return CFSwapInt64HostToBig(x); } static __inline__ __attribute__((always_inline)) unsigned short NSSwapLittleShortToHost(unsigned short x) { return CFSwapInt16LittleToHost(x); } static __inline__ __attribute__((always_inline)) unsigned int NSSwapLittleIntToHost(unsigned int x) { return CFSwapInt32LittleToHost(x); } static __inline__ __attribute__((always_inline)) unsigned long NSSwapLittleLongToHost(unsigned long x) { return CFSwapInt64LittleToHost(x); } static __inline__ __attribute__((always_inline)) unsigned long long NSSwapLittleLongLongToHost(unsigned long long x) { return CFSwapInt64LittleToHost(x); } static __inline__ __attribute__((always_inline)) unsigned short NSSwapHostShortToLittle(unsigned short x) { return CFSwapInt16HostToLittle(x); } static __inline__ __attribute__((always_inline)) unsigned int NSSwapHostIntToLittle(unsigned int x) { return CFSwapInt32HostToLittle(x); } static __inline__ __attribute__((always_inline)) unsigned long NSSwapHostLongToLittle(unsigned long x) { return CFSwapInt64HostToLittle(x); } static __inline__ __attribute__((always_inline)) unsigned long long NSSwapHostLongLongToLittle(unsigned long long x) { return CFSwapInt64HostToLittle(x); } typedef struct {unsigned int v;} NSSwappedFloat; typedef struct {unsigned long long v;} NSSwappedDouble; static __inline__ __attribute__((always_inline)) NSSwappedFloat NSConvertHostFloatToSwapped(float x) { union fconv { float number; NSSwappedFloat sf; }; return ((union fconv *)&x)->sf; } static __inline__ __attribute__((always_inline)) float NSConvertSwappedFloatToHost(NSSwappedFloat x) { union fconv { float number; NSSwappedFloat sf; }; return ((union fconv *)&x)->number; } static __inline__ __attribute__((always_inline)) NSSwappedDouble NSConvertHostDoubleToSwapped(double x) { union dconv { double number; NSSwappedDouble sd; }; return ((union dconv *)&x)->sd; } static __inline__ __attribute__((always_inline)) double NSConvertSwappedDoubleToHost(NSSwappedDouble x) { union dconv { double number; NSSwappedDouble sd; }; return ((union dconv *)&x)->number; } static __inline__ __attribute__((always_inline)) NSSwappedFloat NSSwapFloat(NSSwappedFloat x) { x.v = NSSwapInt(x.v); return x; } static __inline__ __attribute__((always_inline)) NSSwappedDouble NSSwapDouble(NSSwappedDouble x) { x.v = NSSwapLongLong(x.v); return x; } static __inline__ __attribute__((always_inline)) double NSSwapBigDoubleToHost(NSSwappedDouble x) { return NSConvertSwappedDoubleToHost(NSSwapDouble(x)); } static __inline__ __attribute__((always_inline)) float NSSwapBigFloatToHost(NSSwappedFloat x) { return NSConvertSwappedFloatToHost(NSSwapFloat(x)); } static __inline__ __attribute__((always_inline)) NSSwappedDouble NSSwapHostDoubleToBig(double x) { return NSSwapDouble(NSConvertHostDoubleToSwapped(x)); } static __inline__ __attribute__((always_inline)) NSSwappedFloat NSSwapHostFloatToBig(float x) { return NSSwapFloat(NSConvertHostFloatToSwapped(x)); } static __inline__ __attribute__((always_inline)) double NSSwapLittleDoubleToHost(NSSwappedDouble x) { return NSConvertSwappedDoubleToHost(x); } static __inline__ __attribute__((always_inline)) float NSSwapLittleFloatToHost(NSSwappedFloat x) { return NSConvertSwappedFloatToHost(x); } static __inline__ __attribute__((always_inline)) NSSwappedDouble NSSwapHostDoubleToLittle(double x) { return NSConvertHostDoubleToSwapped(x); } static __inline__ __attribute__((always_inline)) NSSwappedFloat NSSwapHostFloatToLittle(float x) { return NSConvertHostFloatToSwapped(x); } // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin extern "C" NSNotificationName const NSSystemClockDidChangeNotification __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef double NSTimeInterval; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif struct NSDate_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSDate (NSExtendedDate) // - (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate; // @property (readonly) NSTimeInterval timeIntervalSinceNow; // @property (readonly) NSTimeInterval timeIntervalSince1970; // - (id)addTimeInterval:(NSTimeInterval)seconds __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="Use dateByAddingTimeInterval instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=4.0,message="Use dateByAddingTimeInterval instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use dateByAddingTimeInterval instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use dateByAddingTimeInterval instead"))); // - (instancetype)dateByAddingTimeInterval:(NSTimeInterval)ti __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSDate *)earlierDate:(NSDate *)anotherDate; // - (NSDate *)laterDate:(NSDate *)anotherDate; // - (NSComparisonResult)compare:(NSDate *)other; // - (BOOL)isEqualToDate:(NSDate *)otherDate; // @property (readonly, copy) NSString *description; // - (NSString *)descriptionWithLocale:(nullable id)locale; @property (class, readonly) NSTimeInterval timeIntervalSinceReferenceDate; /* @end */ // @interface NSDate (NSDateCreation) // + (instancetype)date; // + (instancetype)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs; // + (instancetype)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti; // + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs; // + (instancetype)dateWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date; @property (class, readonly, copy) NSDate *distantFuture; @property (class, readonly, copy) NSDate *distantPast; @property (class, readonly, copy) NSDate *now __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (instancetype)initWithTimeIntervalSinceNow:(NSTimeInterval)secs; // - (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)secs; // - (instancetype)initWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date; /* @end */ #pragma clang assume_nonnull end // @class NSDateComponents; #ifndef _REWRITER_typedef_NSDateComponents #define _REWRITER_typedef_NSDateComponents typedef struct objc_object NSDateComponents; typedef struct {} _objc_exc_NSDateComponents; #endif #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef NSString * NSCalendarIdentifier __attribute__((swift_wrapper(struct))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierGregorian __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierBuddhist __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierChinese __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierCoptic __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierEthiopicAmeteMihret __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierEthiopicAmeteAlem __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierHebrew __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierISO8601 __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierIndian __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierIslamic __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierIslamicCivil __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierJapanese __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierPersian __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierRepublicOfChina __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierIslamicTabular __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSCalendarIdentifier const NSCalendarIdentifierIslamicUmmAlQura __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSCalendarUnit; enum { NSCalendarUnitEra = kCFCalendarUnitEra, NSCalendarUnitYear = kCFCalendarUnitYear, NSCalendarUnitMonth = kCFCalendarUnitMonth, NSCalendarUnitDay = kCFCalendarUnitDay, NSCalendarUnitHour = kCFCalendarUnitHour, NSCalendarUnitMinute = kCFCalendarUnitMinute, NSCalendarUnitSecond = kCFCalendarUnitSecond, NSCalendarUnitWeekday = kCFCalendarUnitWeekday, NSCalendarUnitWeekdayOrdinal = kCFCalendarUnitWeekdayOrdinal, NSCalendarUnitQuarter __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFCalendarUnitQuarter, NSCalendarUnitWeekOfMonth __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFCalendarUnitWeekOfMonth, NSCalendarUnitWeekOfYear __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFCalendarUnitWeekOfYear, NSCalendarUnitYearForWeekOfYear __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFCalendarUnitYearForWeekOfYear, NSCalendarUnitNanosecond __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1 << 15), NSCalendarUnitCalendar __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1 << 20), NSCalendarUnitTimeZone __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1 << 21), NSEraCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitEra"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitEra"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitEra"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitEra"))) = NSCalendarUnitEra, NSYearCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitYear"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitYear"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitYear"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitYear"))) = NSCalendarUnitYear, NSMonthCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitMonth"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitMonth"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitMonth"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitMonth"))) = NSCalendarUnitMonth, NSDayCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitDay"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitDay"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitDay"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitDay"))) = NSCalendarUnitDay, NSHourCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitHour"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitHour"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitHour"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitHour"))) = NSCalendarUnitHour, NSMinuteCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitMinute"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitMinute"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitMinute"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitMinute"))) = NSCalendarUnitMinute, NSSecondCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitSecond"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitSecond"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitSecond"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitSecond"))) = NSCalendarUnitSecond, NSWeekCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="NSCalendarUnitWeekOfMonth or NSCalendarUnitWeekOfYear, depending on which you mean"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="NSCalendarUnitWeekOfMonth or NSCalendarUnitWeekOfYear, depending on which you mean"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="NSCalendarUnitWeekOfMonth or NSCalendarUnitWeekOfYear, depending on which you mean"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="NSCalendarUnitWeekOfMonth or NSCalendarUnitWeekOfYear, depending on which you mean"))) = kCFCalendarUnitWeek, NSWeekdayCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitWeekday"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitWeekday"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitWeekday"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitWeekday"))) = NSCalendarUnitWeekday, NSWeekdayOrdinalCalendarUnit __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarUnitWeekdayOrdinal"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarUnitWeekdayOrdinal"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitWeekdayOrdinal"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitWeekdayOrdinal"))) = NSCalendarUnitWeekdayOrdinal, NSQuarterCalendarUnit __attribute__((availability(macos,introduced=10.6,deprecated=10.10,replacement="NSCalendarUnitQuarter"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarUnitQuarter"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitQuarter"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitQuarter"))) = NSCalendarUnitQuarter, NSWeekOfMonthCalendarUnit __attribute__((availability(macos,introduced=10.7,deprecated=10.10,replacement="NSCalendarUnitWeekOfMonth"))) __attribute__((availability(ios,introduced=5.0,deprecated=8.0,replacement="NSCalendarUnitWeekOfMonth"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitWeekOfMonth"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitWeekOfMonth"))) = NSCalendarUnitWeekOfMonth, NSWeekOfYearCalendarUnit __attribute__((availability(macos,introduced=10.7,deprecated=10.10,replacement="NSCalendarUnitWeekOfYear"))) __attribute__((availability(ios,introduced=5.0,deprecated=8.0,replacement="NSCalendarUnitWeekOfYear"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitWeekOfYear"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitWeekOfYear"))) = NSCalendarUnitWeekOfYear, NSYearForWeekOfYearCalendarUnit __attribute__((availability(macos,introduced=10.7,deprecated=10.10,replacement="NSCalendarUnitYearForWeekOfYear"))) __attribute__((availability(ios,introduced=5.0,deprecated=8.0,replacement="NSCalendarUnitYearForWeekOfYear"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitYearForWeekOfYear"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitYearForWeekOfYear"))) = NSCalendarUnitYearForWeekOfYear, NSCalendarCalendarUnit __attribute__((availability(macos,introduced=10.7,deprecated=10.10,replacement="NSCalendarUnitCalendar"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarUnitCalendar"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitCalendar"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitCalendar"))) = NSCalendarUnitCalendar, NSTimeZoneCalendarUnit __attribute__((availability(macos,introduced=10.7,deprecated=10.10,replacement="NSCalendarUnitTimeZone"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarUnitTimeZone"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarUnitTimeZone"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarUnitTimeZone"))) = NSCalendarUnitTimeZone, }; typedef NSUInteger NSCalendarOptions; enum { NSCalendarWrapComponents = (1UL << 0), NSCalendarMatchStrictly __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 1), NSCalendarSearchBackwards __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 2), NSCalendarMatchPreviousTimePreservingSmallerUnits __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 8), NSCalendarMatchNextTimePreservingSmallerUnits __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 9), NSCalendarMatchNextTime __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 10), NSCalendarMatchFirst __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 12), NSCalendarMatchLast __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1ULL << 13) }; enum { NSWrapCalendarComponents __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarWrapComponents"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarWrapComponents"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarWrapComponents"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarWrapComponents"))) = NSCalendarWrapComponents, }; #ifndef _REWRITER_typedef_NSCalendar #define _REWRITER_typedef_NSCalendar typedef struct objc_object NSCalendar; typedef struct {} _objc_exc_NSCalendar; #endif struct NSCalendar_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (class, readonly, copy) NSCalendar *currentCalendar; @property (class, readonly, strong) NSCalendar *autoupdatingCurrentCalendar __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSCalendar *)calendarWithIdentifier:(NSCalendarIdentifier)calendarIdentifierConstant __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable id)initWithCalendarIdentifier:(NSCalendarIdentifier)ident __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSCalendarIdentifier calendarIdentifier; // @property (nullable, copy) NSLocale *locale; // @property (copy) NSTimeZone *timeZone; // @property NSUInteger firstWeekday; // @property NSUInteger minimumDaysInFirstWeek; // @property (readonly, copy) NSArray<NSString *> *eraSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *longEraSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *monthSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *shortMonthSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *veryShortMonthSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *standaloneMonthSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *shortStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *veryShortStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *weekdaySymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *shortWeekdaySymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *veryShortWeekdaySymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *standaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *shortStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *veryShortStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *quarterSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *shortQuarterSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *standaloneQuarterSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *shortStandaloneQuarterSymbols __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *AMSymbol __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *PMSymbol __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSRange)minimumRangeOfUnit:(NSCalendarUnit)unit; // - (NSRange)maximumRangeOfUnit:(NSCalendarUnit)unit; // - (NSRange)rangeOfUnit:(NSCalendarUnit)smaller inUnit:(NSCalendarUnit)larger forDate:(NSDate *)date; // - (NSUInteger)ordinalityOfUnit:(NSCalendarUnit)smaller inUnit:(NSCalendarUnit)larger forDate:(NSDate *)date; // - (BOOL)rangeOfUnit:(NSCalendarUnit)unit startDate:(NSDate * _Nullable * _Nullable)datep interval:(nullable NSTimeInterval *)tip forDate:(NSDate *)date __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)dateFromComponents:(NSDateComponents *)comps; // - (NSDateComponents *)components:(NSCalendarUnit)unitFlags fromDate:(NSDate *)date; // - (nullable NSDate *)dateByAddingComponents:(NSDateComponents *)comps toDate:(NSDate *)date options:(NSCalendarOptions)opts; // - (NSDateComponents *)components:(NSCalendarUnit)unitFlags fromDate:(NSDate *)startingDate toDate:(NSDate *)resultDate options:(NSCalendarOptions)opts; // - (void)getEra:(out nullable NSInteger *)eraValuePointer year:(out nullable NSInteger *)yearValuePointer month:(out nullable NSInteger *)monthValuePointer day:(out nullable NSInteger *)dayValuePointer fromDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getEra:(out nullable NSInteger *)eraValuePointer yearForWeekOfYear:(out nullable NSInteger *)yearValuePointer weekOfYear:(out nullable NSInteger *)weekValuePointer weekday:(out nullable NSInteger *)weekdayValuePointer fromDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getHour:(out nullable NSInteger *)hourValuePointer minute:(out nullable NSInteger *)minuteValuePointer second:(out nullable NSInteger *)secondValuePointer nanosecond:(out nullable NSInteger *)nanosecondValuePointer fromDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSInteger)component:(NSCalendarUnit)unit fromDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)dateWithEra:(NSInteger)eraValue year:(NSInteger)yearValue month:(NSInteger)monthValue day:(NSInteger)dayValue hour:(NSInteger)hourValue minute:(NSInteger)minuteValue second:(NSInteger)secondValue nanosecond:(NSInteger)nanosecondValue __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)dateWithEra:(NSInteger)eraValue yearForWeekOfYear:(NSInteger)yearValue weekOfYear:(NSInteger)weekValue weekday:(NSInteger)weekdayValue hour:(NSInteger)hourValue minute:(NSInteger)minuteValue second:(NSInteger)secondValue nanosecond:(NSInteger)nanosecondValue __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSDate *)startOfDayForDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSDateComponents *)componentsInTimeZone:(NSTimeZone *)timezone fromDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSComparisonResult)compareDate:(NSDate *)date1 toDate:(NSDate *)date2 toUnitGranularity:(NSCalendarUnit)unit __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isDate:(NSDate *)date1 equalToDate:(NSDate *)date2 toUnitGranularity:(NSCalendarUnit)unit __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isDate:(NSDate *)date1 inSameDayAsDate:(NSDate *)date2 __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isDateInToday:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isDateInYesterday:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isDateInTomorrow:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isDateInWeekend:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)rangeOfWeekendStartDate:(out NSDate * _Nullable * _Nullable)datep interval:(out nullable NSTimeInterval *)tip containingDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)nextWeekendStartDate:(out NSDate * _Nullable * _Nullable)datep interval:(out nullable NSTimeInterval *)tip options:(NSCalendarOptions)options afterDate:(NSDate *)date __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSDateComponents *)components:(NSCalendarUnit)unitFlags fromDateComponents:(NSDateComponents *)startingDateComp toDateComponents:(NSDateComponents *)resultDateComp options:(NSCalendarOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)dateByAddingUnit:(NSCalendarUnit)unit value:(NSInteger)value toDate:(NSDate *)date options:(NSCalendarOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateDatesStartingAfterDate:(NSDate *)start matchingComponents:(NSDateComponents *)comps options:(NSCalendarOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSDate * _Nullable date, BOOL exactMatch, BOOL *stop))block __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)nextDateAfterDate:(NSDate *)date matchingComponents:(NSDateComponents *)comps options:(NSCalendarOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)nextDateAfterDate:(NSDate *)date matchingUnit:(NSCalendarUnit)unit value:(NSInteger)value options:(NSCalendarOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)nextDateAfterDate:(NSDate *)date matchingHour:(NSInteger)hourValue minute:(NSInteger)minuteValue second:(NSInteger)secondValue options:(NSCalendarOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)dateBySettingUnit:(NSCalendarUnit)unit value:(NSInteger)v ofDate:(NSDate *)date options:(NSCalendarOptions)opts __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)dateBySettingHour:(NSInteger)h minute:(NSInteger)m second:(NSInteger)s ofDate:(NSDate *)date options:(NSCalendarOptions)opts __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)date:(NSDate *)date matchesComponents:(NSDateComponents *)components __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSCalendarDayChangedNotification __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); enum { NSDateComponentUndefined = 9223372036854775807L, NSUndefinedDateComponent __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSDateComponentUndefined"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSDateComponentUndefined"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSDateComponentUndefined"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSDateComponentUndefined"))) = NSDateComponentUndefined }; #ifndef _REWRITER_typedef_NSDateComponents #define _REWRITER_typedef_NSDateComponents typedef struct objc_object NSDateComponents; typedef struct {} _objc_exc_NSDateComponents; #endif struct NSDateComponents_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (nullable, copy) NSCalendar *calendar __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSTimeZone *timeZone __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSInteger era; // @property NSInteger year; // @property NSInteger month; // @property NSInteger day; // @property NSInteger hour; // @property NSInteger minute; // @property NSInteger second; // @property NSInteger nanosecond __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSInteger weekday; // @property NSInteger weekdayOrdinal; // @property NSInteger quarter __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSInteger weekOfMonth __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSInteger weekOfYear __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSInteger yearForWeekOfYear __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (getter=isLeapMonth) BOOL leapMonth __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSDate *date __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSInteger)week __attribute__((availability(macos,introduced=10.4,deprecated=10.9,message="Use -weekOfMonth or -weekOfYear, depending on which you mean"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use -weekOfMonth or -weekOfYear, depending on which you mean"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -weekOfMonth or -weekOfYear, depending on which you mean"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -weekOfMonth or -weekOfYear, depending on which you mean"))); // - (void)setWeek:(NSInteger)v __attribute__((availability(macos,introduced=10.4,deprecated=10.9,message="Use -setWeekOfMonth: or -setWeekOfYear:, depending on which you mean"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use -setWeekOfMonth: or -setWeekOfYear:, depending on which you mean"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -setWeekOfMonth: or -setWeekOfYear:, depending on which you mean"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -setWeekOfMonth: or -setWeekOfYear:, depending on which you mean"))); // - (void)setValue:(NSInteger)value forComponent:(NSCalendarUnit)unit __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSInteger)valueForComponent:(NSCalendarUnit)unit __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (getter=isValidDate, readonly) BOOL validDate __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isValidDateInCalendar:(NSCalendar *)calendar __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #pragma clang assume_nonnull begin enum { NSOpenStepUnicodeReservedBase = 0xF400 }; #ifndef _REWRITER_typedef_NSCharacterSet #define _REWRITER_typedef_NSCharacterSet typedef struct objc_object NSCharacterSet; typedef struct {} _objc_exc_NSCharacterSet; #endif struct NSCharacterSet_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (readonly, class, copy) NSCharacterSet *controlCharacterSet; @property (readonly, class, copy) NSCharacterSet *whitespaceCharacterSet; @property (readonly, class, copy) NSCharacterSet *whitespaceAndNewlineCharacterSet; @property (readonly, class, copy) NSCharacterSet *decimalDigitCharacterSet; @property (readonly, class, copy) NSCharacterSet *letterCharacterSet; @property (readonly, class, copy) NSCharacterSet *lowercaseLetterCharacterSet; @property (readonly, class, copy) NSCharacterSet *uppercaseLetterCharacterSet; @property (readonly, class, copy) NSCharacterSet *nonBaseCharacterSet; @property (readonly, class, copy) NSCharacterSet *alphanumericCharacterSet; @property (readonly, class, copy) NSCharacterSet *decomposableCharacterSet; @property (readonly, class, copy) NSCharacterSet *illegalCharacterSet; @property (readonly, class, copy) NSCharacterSet *punctuationCharacterSet; @property (readonly, class, copy) NSCharacterSet *capitalizedLetterCharacterSet; @property (readonly, class, copy) NSCharacterSet *symbolCharacterSet; @property (readonly, class, copy) NSCharacterSet *newlineCharacterSet __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSCharacterSet *)characterSetWithRange:(NSRange)aRange; // + (NSCharacterSet *)characterSetWithCharactersInString:(NSString *)aString; // + (NSCharacterSet *)characterSetWithBitmapRepresentation:(NSData *)data; // + (nullable NSCharacterSet *)characterSetWithContentsOfFile:(NSString *)fName; // - (instancetype) initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // - (BOOL)characterIsMember:(unichar)aCharacter; // @property (readonly, copy) NSData *bitmapRepresentation; // @property (readonly, copy) NSCharacterSet *invertedSet; // - (BOOL)longCharacterIsMember:(UTF32Char)theLongChar; // - (BOOL)isSupersetOfSet:(NSCharacterSet *)theOtherSet; // - (BOOL)hasMemberInPlane:(uint8_t)thePlane; /* @end */ #ifndef _REWRITER_typedef_NSMutableCharacterSet #define _REWRITER_typedef_NSMutableCharacterSet typedef struct objc_object NSMutableCharacterSet; typedef struct {} _objc_exc_NSMutableCharacterSet; #endif struct NSMutableCharacterSet_IMPL { struct NSCharacterSet_IMPL NSCharacterSet_IVARS; }; // - (void)addCharactersInRange:(NSRange)aRange; // - (void)removeCharactersInRange:(NSRange)aRange; // - (void)addCharactersInString:(NSString *)aString; // - (void)removeCharactersInString:(NSString *)aString; // - (void)formUnionWithCharacterSet:(NSCharacterSet *)otherSet; // - (void)formIntersectionWithCharacterSet:(NSCharacterSet *)otherSet; // - (void)invert; // + (NSMutableCharacterSet *)controlCharacterSet; // + (NSMutableCharacterSet *)whitespaceCharacterSet; // + (NSMutableCharacterSet *)whitespaceAndNewlineCharacterSet; // + (NSMutableCharacterSet *)decimalDigitCharacterSet; // + (NSMutableCharacterSet *)letterCharacterSet; // + (NSMutableCharacterSet *)lowercaseLetterCharacterSet; // + (NSMutableCharacterSet *)uppercaseLetterCharacterSet; // + (NSMutableCharacterSet *)nonBaseCharacterSet; // + (NSMutableCharacterSet *)alphanumericCharacterSet; // + (NSMutableCharacterSet *)decomposableCharacterSet; // + (NSMutableCharacterSet *)illegalCharacterSet; // + (NSMutableCharacterSet *)punctuationCharacterSet; // + (NSMutableCharacterSet *)capitalizedLetterCharacterSet; // + (NSMutableCharacterSet *)symbolCharacterSet; // + (NSMutableCharacterSet *)newlineCharacterSet __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSMutableCharacterSet *)characterSetWithRange:(NSRange)aRange; // + (NSMutableCharacterSet *)characterSetWithCharactersInString:(NSString *)aString; // + (NSMutableCharacterSet *)characterSetWithBitmapRepresentation:(NSData *)data; // + (nullable NSMutableCharacterSet *)characterSetWithContentsOfFile:(NSString *)fName; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #pragma clang assume_nonnull begin typedef NSInteger NSDecodingFailurePolicy; enum { NSDecodingFailurePolicyRaiseException, NSDecodingFailurePolicySetErrorAndReturn, } __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSCoder #define _REWRITER_typedef_NSCoder typedef struct objc_object NSCoder; typedef struct {} _objc_exc_NSCoder; #endif struct NSCoder_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (void)encodeValueOfObjCType:(const char *)type at:(const void *)addr; // - (void)encodeDataObject:(NSData *)data; // - (nullable NSData *)decodeDataObject; // - (void)decodeValueOfObjCType:(const char *)type at:(void *)data size:(NSUInteger)size __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (NSInteger)versionForClassName:(NSString *)className; /* @end */ // @interface NSCoder (NSExtendedCoder) // - (void)encodeObject:(nullable id)object; // - (void)encodeRootObject:(id)rootObject; // - (void)encodeBycopyObject:(nullable id)anObject; // - (void)encodeByrefObject:(nullable id)anObject; // - (void)encodeConditionalObject:(nullable id)object; // - (void)encodeValuesOfObjCTypes:(const char *)types, ...; // - (void)encodeArrayOfObjCType:(const char *)type count:(NSUInteger)count at:(const void *)array; // - (void)encodeBytes:(nullable const void *)byteaddr length:(NSUInteger)length; // - (nullable id)decodeObject; // - (nullable id)decodeTopLevelObjectAndReturnError:(NSError **)error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(swift, unavailable, message="Use 'decodeTopLevelObject() throws' instead"))); // - (void)decodeValuesOfObjCTypes:(const char *)types, ...; // - (void)decodeArrayOfObjCType:(const char *)itemType count:(NSUInteger)count at:(void *)array; // - (nullable void *)decodeBytesWithReturnedLength:(NSUInteger *)lengthp __attribute__((objc_returns_inner_pointer)); // - (void)encodePropertyList:(id)aPropertyList; // - (nullable id)decodePropertyList; // - (void)setObjectZone:(nullable NSZone *)zone ; // - (nullable NSZone *)objectZone ; // @property (readonly) unsigned int systemVersion; // @property (readonly) BOOL allowsKeyedCoding; // - (void)encodeObject:(nullable id)object forKey:(NSString *)key; // - (void)encodeConditionalObject:(nullable id)object forKey:(NSString *)key; // - (void)encodeBool:(BOOL)value forKey:(NSString *)key; // - (void)encodeInt:(int)value forKey:(NSString *)key; // - (void)encodeInt32:(int32_t)value forKey:(NSString *)key; // - (void)encodeInt64:(int64_t)value forKey:(NSString *)key; // - (void)encodeFloat:(float)value forKey:(NSString *)key; // - (void)encodeDouble:(double)value forKey:(NSString *)key; // - (void)encodeBytes:(nullable const uint8_t *)bytes length:(NSUInteger)length forKey:(NSString *)key; // - (BOOL)containsValueForKey:(NSString *)key; // - (nullable id)decodeObjectForKey:(NSString *)key; // - (nullable id)decodeTopLevelObjectForKey:(NSString *)key error:(NSError **)error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(swift, unavailable, message="Use 'decodeObject(of:, forKey:)' instead"))); // - (BOOL)decodeBoolForKey:(NSString *)key; // - (int)decodeIntForKey:(NSString *)key; // - (int32_t)decodeInt32ForKey:(NSString *)key; // - (int64_t)decodeInt64ForKey:(NSString *)key; // - (float)decodeFloatForKey:(NSString *)key; // - (double)decodeDoubleForKey:(NSString *)key; // - (nullable const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(nullable NSUInteger *)lengthp __attribute__((objc_returns_inner_pointer)); // - (void)encodeInteger:(NSInteger)value forKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSInteger)decodeIntegerForKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL requiresSecureCoding __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable id)decodeObjectOfClass:(Class)aClass forKey:(NSString *)key __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable id)decodeTopLevelObjectOfClass:(Class)aClass forKey:(NSString *)key error:(NSError **)error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(swift, unavailable, message="Use 'decodeObject(of:, forKey:)' instead"))); // - (nullable NSArray *)decodeArrayOfObjectsOfClass:(Class)cls forKey:(NSString *)key __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // - (nullable NSDictionary *)decodeDictionaryWithKeysOfClass:(Class)keyCls objectsOfClass:(Class)objectCls forKey:(NSString *)key __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // - (nullable id)decodeObjectOfClasses:(nullable NSSet<Class> *)classes forKey:(NSString *)key __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((swift_private)); // - (nullable id)decodeTopLevelObjectOfClasses:(nullable NSSet<Class> *)classes forKey:(NSString *)key error:(NSError **)error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(swift, unavailable, message="Use 'decodeObject(of:, forKey:)' instead"))); // - (nullable NSArray *)decodeArrayOfObjectsOfClasses:(NSSet<Class> *)classes forKey:(NSString *)key __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // - (nullable NSDictionary *)decodeDictionaryWithKeysOfClasses:(NSSet<Class> *)keyClasses objectsOfClasses:(NSSet<Class> *)objectClasses forKey:(NSString *)key __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // - (nullable id)decodePropertyListForKey:(NSString *)key __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSSet<Class> *allowedClasses __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)failWithError:(NSError *)error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSDecodingFailurePolicy decodingFailurePolicy __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSError *error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSObject * _Nullable NXReadNSObjectFromCoder(NSCoder *decoder) __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // @interface NSCoder (NSTypedstreamCompatibility) // - (void)encodeNXObject:(id)object __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (nullable id)decodeNXObject __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); /* @end */ // @interface NSCoder(NSDeprecated) // - (void)decodeValueOfObjCType:(const char *)type at:(void *)data __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="decodeValueOfObjCType:at:size:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="decodeValueOfObjCType:at:size:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="decodeValueOfObjCType:at:size:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="decodeValueOfObjCType:at:size:"))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSDataReadingOptions; enum { NSDataReadingMappedIfSafe = 1UL << 0, NSDataReadingUncached = 1UL << 1, NSDataReadingMappedAlways __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1UL << 3, NSDataReadingMapped __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="NSDataReadingMappedIfSafe"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="NSDataReadingMappedIfSafe"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="NSDataReadingMappedIfSafe"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="NSDataReadingMappedIfSafe"))) = NSDataReadingMappedIfSafe, NSMappedRead __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="NSDataReadingMapped"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="NSDataReadingMapped"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="NSDataReadingMapped"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="NSDataReadingMapped"))) = NSDataReadingMapped, NSUncachedRead __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="NSDataReadingUncached"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="NSDataReadingUncached"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="NSDataReadingUncached"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="NSDataReadingUncached"))) = NSDataReadingUncached }; typedef NSUInteger NSDataWritingOptions; enum { NSDataWritingAtomic = 1UL << 0, NSDataWritingWithoutOverwriting __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1UL << 1, NSDataWritingFileProtectionNone __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x10000000, NSDataWritingFileProtectionComplete __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x20000000, NSDataWritingFileProtectionCompleteUnlessOpen __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x30000000, NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x40000000, NSDataWritingFileProtectionMask __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0xf0000000, NSAtomicWrite __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="NSDataWritingAtomic"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="NSDataWritingAtomic"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="NSDataWritingAtomic"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="NSDataWritingAtomic"))) = NSDataWritingAtomic }; typedef NSUInteger NSDataSearchOptions; enum { NSDataSearchBackwards = 1UL << 0, NSDataSearchAnchored = 1UL << 1 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSDataBase64EncodingOptions; enum { NSDataBase64Encoding64CharacterLineLength = 1UL << 0, NSDataBase64Encoding76CharacterLineLength = 1UL << 1, NSDataBase64EncodingEndLineWithCarriageReturn = 1UL << 4, NSDataBase64EncodingEndLineWithLineFeed = 1UL << 5, } __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSDataBase64DecodingOptions; enum { NSDataBase64DecodingIgnoreUnknownCharacters = 1UL << 0 } __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif struct NSData_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger length; // @property (readonly) const void *bytes __attribute__((objc_returns_inner_pointer)); /* @end */ // @interface NSData (NSExtendedData) // @property (readonly, copy) NSString *description; // - (void)getBytes:(void *)buffer length:(NSUInteger)length; // - (void)getBytes:(void *)buffer range:(NSRange)range; // - (BOOL)isEqualToData:(NSData *)other; // - (NSData *)subdataWithRange:(NSRange)range; // - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile; // - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically; // - (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr; // - (BOOL)writeToURL:(NSURL *)url options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr; // - (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void) enumerateByteRangesUsingBlock:(void (__attribute__((noescape)) ^)(const void *bytes, NSRange byteRange, BOOL *stop))block __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSData (NSDataCreation) // + (instancetype)data; // + (instancetype)dataWithBytes:(nullable const void *)bytes length:(NSUInteger)length; // + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length; // + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b; // + (nullable instancetype)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr; // + (nullable instancetype)dataWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr; // + (nullable instancetype)dataWithContentsOfFile:(NSString *)path; // + (nullable instancetype)dataWithContentsOfURL:(NSURL *)url; // - (instancetype)initWithBytes:(nullable const void *)bytes length:(NSUInteger)length; // - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length; // - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b; // - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length deallocator:(nullable void (^)(void *bytes, NSUInteger length))deallocator __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable instancetype)initWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr; // - (nullable instancetype)initWithContentsOfFile:(NSString *)path; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url; // - (instancetype)initWithData:(NSData *)data; // + (instancetype)dataWithData:(NSData *)data; /* @end */ // @interface NSData (NSDataBase64Encoding) // - (nullable instancetype)initWithBase64EncodedString:(NSString *)base64String options:(NSDataBase64DecodingOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable instancetype)initWithBase64EncodedData:(NSData *)base64Data options:(NSDataBase64DecodingOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSData *)base64EncodedDataWithOptions:(NSDataBase64EncodingOptions)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ typedef NSInteger NSDataCompressionAlgorithm; enum { NSDataCompressionAlgorithmLZFSE = 0, NSDataCompressionAlgorithmLZ4, NSDataCompressionAlgorithmLZMA, NSDataCompressionAlgorithmZlib, } __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @interface NSData (NSDataCompression) // - (nullable instancetype)decompressedDataUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (nullable instancetype)compressedDataUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); /* @end */ // @interface NSData (NSDeprecated) // - (void)getBytes:(void *)buffer __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="This method is unsafe because it could potentially cause buffer overruns. Use -getBytes:length: instead."))); // + (nullable id)dataWithContentsOfMappedFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use +dataWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))); // - (nullable id)initWithContentsOfMappedFile:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -initWithContentsOfURL:options:error: and NSDataReadingMappedIfSafe or NSDataReadingMappedAlways instead."))); // - (nullable id)initWithBase64Encoding:(NSString *)base64String __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="Use initWithBase64EncodedString:options: instead"))) __attribute__((availability(ios,introduced=4.0,deprecated=7.0,message="Use initWithBase64EncodedString:options: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use initWithBase64EncodedString:options: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use initWithBase64EncodedString:options: instead"))); // - (NSString *)base64Encoding __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="Use base64EncodedStringWithOptions: instead"))) __attribute__((availability(ios,introduced=4.0,deprecated=7.0,message="Use base64EncodedStringWithOptions: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use base64EncodedStringWithOptions: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use base64EncodedStringWithOptions: instead"))); /* @end */ #ifndef _REWRITER_typedef_NSMutableData #define _REWRITER_typedef_NSMutableData typedef struct objc_object NSMutableData; typedef struct {} _objc_exc_NSMutableData; #endif struct NSMutableData_IMPL { struct NSData_IMPL NSData_IVARS; }; // @property (readonly) void *mutableBytes __attribute__((objc_returns_inner_pointer)); // @property NSUInteger length; /* @end */ // @interface NSMutableData (NSExtendedMutableData) // - (void)appendBytes:(const void *)bytes length:(NSUInteger)length; // - (void)appendData:(NSData *)other; // - (void)increaseLengthBy:(NSUInteger)extraLength; // - (void)replaceBytesInRange:(NSRange)range withBytes:(const void *)bytes; // - (void)resetBytesInRange:(NSRange)range; // - (void)setData:(NSData *)data; // - (void)replaceBytesInRange:(NSRange)range withBytes:(nullable const void *)replacementBytes length:(NSUInteger)replacementLength; /* @end */ // @interface NSMutableData (NSMutableDataCreation) // + (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems; // + (nullable instancetype)dataWithLength:(NSUInteger)length; // - (nullable instancetype)initWithCapacity:(NSUInteger)capacity; // - (nullable instancetype)initWithLength:(NSUInteger)length; /* @end */ // @interface NSMutableData (NSMutableDataCompression) // - (BOOL)decompressUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (BOOL)compressUsingAlgorithm:(NSDataCompressionAlgorithm)algorithm error:(NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); /* @end */ __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSPurgeableData #define _REWRITER_typedef_NSPurgeableData typedef struct objc_object NSPurgeableData; typedef struct {} _objc_exc_NSPurgeableData; #endif struct NSPurgeableData_IMPL { struct NSMutableData_IMPL NSMutableData_IVARS; NSUInteger _length; int32_t _accessCount; uint8_t _private[32]; void *_reserved; }; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSDateInterval #define _REWRITER_typedef_NSDateInterval typedef struct objc_object NSDateInterval; typedef struct {} _objc_exc_NSDateInterval; #endif struct NSDateInterval_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSDate *startDate; // @property (readonly, copy) NSDate *endDate; // @property (readonly) NSTimeInterval duration; // - (instancetype)init; // - (instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // - (instancetype)initWithStartDate:(NSDate *)startDate duration:(NSTimeInterval)duration __attribute__((objc_designated_initializer)); // - (instancetype)initWithStartDate:(NSDate *)startDate endDate:(NSDate *)endDate; // - (NSComparisonResult)compare:(NSDateInterval *)dateInterval; // - (BOOL)isEqualToDateInterval:(NSDateInterval *)dateInterval; // - (BOOL)intersectsDateInterval:(NSDateInterval *)dateInterval; // - (nullable NSDateInterval *)intersectionWithDateInterval:(NSDateInterval *)dateInterval; // - (BOOL)containsDate:(NSDate *)date; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSString * NSAttributedStringKey __attribute__((swift_wrapper(struct))); __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSAttributedString #define _REWRITER_typedef_NSAttributedString typedef struct objc_object NSAttributedString; typedef struct {} _objc_exc_NSAttributedString; #endif struct NSAttributedString_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSString *string; // - (NSDictionary<NSAttributedStringKey, id> *)attributesAtIndex:(NSUInteger)location effectiveRange:(nullable NSRangePointer)range; /* @end */ // @interface NSAttributedString (NSExtendedAttributedString) // @property (readonly) NSUInteger length; // - (nullable id)attribute:(NSAttributedStringKey)attrName atIndex:(NSUInteger)location effectiveRange:(nullable NSRangePointer)range; // - (NSAttributedString *)attributedSubstringFromRange:(NSRange)range; // - (NSDictionary<NSAttributedStringKey, id> *)attributesAtIndex:(NSUInteger)location longestEffectiveRange:(nullable NSRangePointer)range inRange:(NSRange)rangeLimit; // - (nullable id)attribute:(NSAttributedStringKey)attrName atIndex:(NSUInteger)location longestEffectiveRange:(nullable NSRangePointer)range inRange:(NSRange)rangeLimit; // - (BOOL)isEqualToAttributedString:(NSAttributedString *)other; // - (instancetype)initWithString:(NSString *)str; // - (instancetype)initWithString:(NSString *)str attributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs; // - (instancetype)initWithAttributedString:(NSAttributedString *)attrStr; typedef NSUInteger NSAttributedStringEnumerationOptions; enum { NSAttributedStringEnumerationReverse = (1UL << 1), NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = (1UL << 20) }; // - (void)enumerateAttributesInRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSDictionary<NSAttributedStringKey, id> *attrs, NSRange range, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateAttribute:(NSAttributedStringKey)attrName inRange:(NSRange)enumerationRange options:(NSAttributedStringEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(id _Nullable value, NSRange range, BOOL *stop))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMutableAttributedString #define _REWRITER_typedef_NSMutableAttributedString typedef struct objc_object NSMutableAttributedString; typedef struct {} _objc_exc_NSMutableAttributedString; #endif struct NSMutableAttributedString_IMPL { struct NSAttributedString_IMPL NSAttributedString_IVARS; }; // - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; // - (void)setAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs range:(NSRange)range; /* @end */ // @interface NSMutableAttributedString (NSExtendedMutableAttributedString) // @property (readonly, retain) NSMutableString *mutableString; // - (void)addAttribute:(NSAttributedStringKey)name value:(id)value range:(NSRange)range; // - (void)addAttributes:(NSDictionary<NSAttributedStringKey, id> *)attrs range:(NSRange)range; // - (void)removeAttribute:(NSAttributedStringKey)name range:(NSRange)range; // - (void)replaceCharactersInRange:(NSRange)range withAttributedString:(NSAttributedString *)attrString; // - (void)insertAttributedString:(NSAttributedString *)attrString atIndex:(NSUInteger)loc; // - (void)appendAttributedString:(NSAttributedString *)attrString; // - (void)deleteCharactersInRange:(NSRange)range; // - (void)setAttributedString:(NSAttributedString *)attrString; // - (void)beginEditing; // - (void)endEditing; /* @end */ typedef NSUInteger NSInlinePresentationIntent; enum { NSInlinePresentationIntentEmphasized = 1 << 0, NSInlinePresentationIntentStronglyEmphasized = 1 << 1, NSInlinePresentationIntentCode = 1 << 2, NSInlinePresentationIntentStrikethrough = 1 << 5, NSInlinePresentationIntentSoftBreak = 1 << 6, NSInlinePresentationIntentLineBreak = 1 << 7, NSInlinePresentationIntentInlineHTML = 1 << 8, NSInlinePresentationIntentBlockHTML = 1 << 9 } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_name("InlinePresentationIntent"))); extern "C" const NSAttributedStringKey NSInlinePresentationIntentAttributeName __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_name("inlinePresentationIntent"))); extern "C" const NSAttributedStringKey NSAlternateDescriptionAttributeName __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_name("alternateDescription"))); extern "C" const NSAttributedStringKey NSImageURLAttributeName __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_name("imageURL"))); extern "C" const NSAttributedStringKey NSLanguageIdentifierAttributeName __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_name("languageIdentifier"))); typedef NSInteger NSAttributedStringMarkdownParsingFailurePolicy; enum { NSAttributedStringMarkdownParsingFailureReturnError = 0, NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = 1, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); typedef NSInteger NSAttributedStringMarkdownInterpretedSyntax; enum { NSAttributedStringMarkdownInterpretedSyntaxFull = 0, NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1, NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = 2 } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) #ifndef _REWRITER_typedef_NSAttributedStringMarkdownParsingOptions #define _REWRITER_typedef_NSAttributedStringMarkdownParsingOptions typedef struct objc_object NSAttributedStringMarkdownParsingOptions; typedef struct {} _objc_exc_NSAttributedStringMarkdownParsingOptions; #endif struct NSAttributedStringMarkdownParsingOptions_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)init; // @property BOOL allowsExtendedAttributes; // @property NSAttributedStringMarkdownInterpretedSyntax interpretedSyntax; // @property NSAttributedStringMarkdownParsingFailurePolicy failurePolicy; // @property (nullable, copy) NSString *languageCode; /* @end */ // @interface NSAttributedString (NSAttributedStringCreateFromMarkdown) #if 0 - (nullable instancetype)initWithContentsOfMarkdownFileAtURL:(NSURL *)markdownFile options:(nullable NSAttributedStringMarkdownParsingOptions *)options baseURL:(nullable NSURL *)baseURL error:(NSError **)error __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); #endif #if 0 - (nullable instancetype)initWithMarkdown:(NSData *)markdown options:(nullable NSAttributedStringMarkdownParsingOptions *)options baseURL:(nullable NSURL *)baseURL error:(NSError **)error __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); #endif #if 0 - (nullable instancetype)initWithMarkdownString:(NSString *)markdownString options:(nullable NSAttributedStringMarkdownParsingOptions *)options baseURL:(nullable NSURL *)baseURL error:(NSError **)error __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); #endif /* @end */ typedef NSUInteger NSAttributedStringFormattingOptions; enum { NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) = 1 << 0, NSAttributedStringFormattingApplyReplacementIndexAttribute __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) = 1 << 1, } __attribute__((swift_private)); // @interface NSAttributedString (NSAttributedStringFormatting) #if 0 - (instancetype)initWithFormat:(NSAttributedString *)format options:(NSAttributedStringFormattingOptions)options locale:(nullable NSLocale *)locale, ... __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif #if 0 - (instancetype)initWithFormat:(NSAttributedString *)format options:(NSAttributedStringFormattingOptions)options locale:(nullable NSLocale *)locale arguments:(va_list)arguments __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif #if 0 + (instancetype)localizedAttributedStringWithFormat:(NSAttributedString *)format, ... __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif #if 0 + (instancetype)localizedAttributedStringWithFormat:(NSAttributedString *)format options:(NSAttributedStringFormattingOptions)options, ... __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif /* @end */ // @interface NSMutableAttributedString (NSMutableAttributedStringFormatting) #if 0 - (void)appendLocalizedFormat:(NSAttributedString *)format, ... __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif /* @end */ extern "C" NSAttributedStringKey const NSReplacementIndexAttributeName __attribute__((swift_name("replacementIndex"))) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); // @interface NSAttributedString (NSMorphology) #if 0 - (NSAttributedString *)attributedStringByInflectingString __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif /* @end */ extern "C" NSAttributedStringKey const NSMorphologyAttributeName __attribute__((swift_name("morphology"))) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); extern "C" NSAttributedStringKey const NSInflectionRuleAttributeName __attribute__((swift_name("inflectionRule"))) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); extern "C" NSAttributedStringKey const NSInflectionAlternativeAttributeName __attribute__((swift_name("inflectionAlternative"))) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); extern "C" const NSAttributedStringKey NSPresentationIntentAttributeName __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); typedef NSInteger NSPresentationIntentKind; enum { NSPresentationIntentKindParagraph, NSPresentationIntentKindHeader, NSPresentationIntentKindOrderedList, NSPresentationIntentKindUnorderedList, NSPresentationIntentKindListItem, NSPresentationIntentKindCodeBlock, NSPresentationIntentKindBlockQuote, NSPresentationIntentKindThematicBreak, NSPresentationIntentKindTable, NSPresentationIntentKindTableHeaderRow, NSPresentationIntentKindTableRow, NSPresentationIntentKindTableCell, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); typedef NSInteger NSPresentationIntentTableColumnAlignment; enum { NSPresentationIntentTableColumnAlignmentLeft, NSPresentationIntentTableColumnAlignmentCenter, NSPresentationIntentTableColumnAlignmentRight, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)); __attribute__((swift_private)) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) #ifndef _REWRITER_typedef_NSPresentationIntent #define _REWRITER_typedef_NSPresentationIntent typedef struct objc_object NSPresentationIntent; typedef struct {} _objc_exc_NSPresentationIntent; #endif struct NSPresentationIntent_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSPresentationIntentKind intentKind; // - (instancetype)init __attribute__((unavailable)); // @property (readonly, nullable, strong) NSPresentationIntent *parentIntent; // + (NSPresentationIntent *)paragraphIntentWithIdentity:(NSInteger)identity nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)headerIntentWithIdentity:(NSInteger)identity level:(NSInteger)level nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)codeBlockIntentWithIdentity:(NSInteger)identity languageHint:(nullable NSString *)languageHint nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)thematicBreakIntentWithIdentity:(NSInteger)identity nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)orderedListIntentWithIdentity:(NSInteger)identity nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)unorderedListIntentWithIdentity:(NSInteger)identity nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)listItemIntentWithIdentity:(NSInteger)identity ordinal:(NSInteger)ordinal nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)blockQuoteIntentWithIdentity:(NSInteger)identity nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)tableIntentWithIdentity:(NSInteger)identity columnCount:(NSInteger)columnCount alignments:(NSArray<NSNumber *> *)alignments nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)tableHeaderRowIntentWithIdentity:(NSInteger)identity nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)tableRowIntentWithIdentity:(NSInteger)identity row:(NSInteger)row nestedInsideIntent:(nullable NSPresentationIntent *)parent; // + (NSPresentationIntent *)tableCellIntentWithIdentity:(NSInteger)identity column:(NSInteger)column nestedInsideIntent:(nullable NSPresentationIntent *)parent; // @property (readonly) NSInteger identity; // @property (readonly) NSInteger ordinal; // @property (nullable, readonly) NSArray<NSNumber *> *columnAlignments; // @property (readonly) NSInteger columnCount; // @property (readonly) NSInteger headerLevel; // @property (readonly, nullable, copy) NSString *languageHint; // @property (readonly) NSInteger column; // @property (readonly) NSInteger row; // @property (readonly) NSInteger indentationLevel; // - (BOOL)isEquivalentToPresentationIntent:(NSPresentationIntent *)other; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSAttributedString; #ifndef _REWRITER_typedef_NSAttributedString #define _REWRITER_typedef_NSAttributedString typedef struct objc_object NSAttributedString; typedef struct {} _objc_exc_NSAttributedString; #endif // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin typedef NSInteger NSFormattingContext; enum { NSFormattingContextUnknown = 0, NSFormattingContextDynamic = 1, NSFormattingContextStandalone = 2, NSFormattingContextListItem = 3, NSFormattingContextBeginningOfSentence = 4, NSFormattingContextMiddleOfSentence = 5, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSInteger NSFormattingUnitStyle; enum { NSFormattingUnitStyleShort = 1, NSFormattingUnitStyleMedium, NSFormattingUnitStyleLong, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSFormatter #define _REWRITER_typedef_NSFormatter typedef struct objc_object NSFormatter; typedef struct {} _objc_exc_NSFormatter; #endif struct NSFormatter_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (nullable NSString *)stringForObjectValue:(nullable id)obj; // - (nullable NSAttributedString *)attributedStringForObjectValue:(id)obj withDefaultAttributes:(nullable NSDictionary<NSAttributedStringKey, id> *)attrs; // - (nullable NSString *)editingStringForObjectValue:(id)obj; // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; // - (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString * _Nullable * _Nullable)newString errorDescription:(NSString * _Nullable * _Nullable)error; // - (BOOL)isPartialStringValid:(NSString * _Nonnull * _Nonnull)partialStringPtr proposedSelectedRange:(nullable NSRangePointer)proposedSelRangePtr originalString:(NSString *)origString originalSelectedRange:(NSRange)origSelRange errorDescription:(NSString * _Nullable * _Nullable)error; /* @end */ #pragma clang assume_nonnull end // @class NSLocale; #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSCalendar #define _REWRITER_typedef_NSCalendar typedef struct objc_object NSCalendar; typedef struct {} _objc_exc_NSCalendar; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSDateFormatter #define _REWRITER_typedef_NSDateFormatter typedef struct objc_object NSDateFormatter; typedef struct {} _objc_exc_NSDateFormatter; #endif struct NSDateFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; NSMutableDictionary *_attributes; CFDateFormatterRef _formatter; NSUInteger _counter; }; // @property NSFormattingContext formattingContext __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string range:(inout nullable NSRange *)rangep error:(out NSError **)error; // - (NSString *)stringFromDate:(NSDate *)date; // - (nullable NSDate *)dateFromString:(NSString *)string; typedef NSUInteger NSDateFormatterStyle; enum { NSDateFormatterNoStyle = kCFDateFormatterNoStyle, NSDateFormatterShortStyle = kCFDateFormatterShortStyle, NSDateFormatterMediumStyle = kCFDateFormatterMediumStyle, NSDateFormatterLongStyle = kCFDateFormatterLongStyle, NSDateFormatterFullStyle = kCFDateFormatterFullStyle }; typedef NSUInteger NSDateFormatterBehavior; enum { NSDateFormatterBehaviorDefault = 0, NSDateFormatterBehavior10_0 = 1000, NSDateFormatterBehavior10_4 = 1040, }; // + (NSString *)localizedStringFromDate:(NSDate *)date dateStyle:(NSDateFormatterStyle)dstyle timeStyle:(NSDateFormatterStyle)tstyle __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSString *)dateFormatFromTemplate:(NSString *)tmplate options:(NSUInteger)opts locale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class) NSDateFormatterBehavior defaultFormatterBehavior; // - (void) setLocalizedDateFormatFromTemplate:(NSString *)dateFormatTemplate __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSString *dateFormat; // @property NSDateFormatterStyle dateStyle; // @property NSDateFormatterStyle timeStyle; // @property (null_resettable, copy) NSLocale *locale; // @property BOOL generatesCalendarDates; // @property NSDateFormatterBehavior formatterBehavior; // @property (null_resettable, copy) NSTimeZone *timeZone; // @property (null_resettable, copy) NSCalendar *calendar; // @property (getter=isLenient) BOOL lenient; // @property (nullable, copy) NSDate *twoDigitStartDate; // @property (nullable, copy) NSDate *defaultDate; // @property (null_resettable, copy) NSArray<NSString *> *eraSymbols; // @property (null_resettable, copy) NSArray<NSString *> *monthSymbols; // @property (null_resettable, copy) NSArray<NSString *> *shortMonthSymbols; // @property (null_resettable, copy) NSArray<NSString *> *weekdaySymbols; // @property (null_resettable, copy) NSArray<NSString *> *shortWeekdaySymbols; // @property (null_resettable, copy) NSString *AMSymbol; // @property (null_resettable, copy) NSString *PMSymbol; // @property (null_resettable, copy) NSArray<NSString *> *longEraSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *veryShortMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *standaloneMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *shortStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *veryShortStandaloneMonthSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *veryShortWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *standaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *shortStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *veryShortStandaloneWeekdaySymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *quarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *shortQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *standaloneQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (null_resettable, copy) NSArray<NSString *> *shortStandaloneQuarterSymbols __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSDate *gregorianStartDate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property BOOL doesRelativeDateFormatting __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSDateFormatter (NSDateFormatterCompatibility) // - (id)initWithDateFormat:(NSString *)format allowNaturalLanguage:(BOOL)flag __attribute__((availability(macos,introduced=10.4,deprecated=10.9,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))); // - (BOOL)allowsNaturalLanguage __attribute__((availability(macos,introduced=10.4,deprecated=10.9,message="There is no replacement"))); /* @end */ #pragma clang assume_nonnull end // @class NSLocale; #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #ifndef _REWRITER_typedef_NSCalendar #define _REWRITER_typedef_NSCalendar typedef struct objc_object NSCalendar; typedef struct {} _objc_exc_NSCalendar; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSDateIntervalFormatterStyle; enum { NSDateIntervalFormatterNoStyle = 0, NSDateIntervalFormatterShortStyle = 1, NSDateIntervalFormatterMediumStyle = 2, NSDateIntervalFormatterLongStyle = 3, NSDateIntervalFormatterFullStyle = 4 } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSDateIntervalFormatter #define _REWRITER_typedef_NSDateIntervalFormatter typedef struct objc_object NSDateIntervalFormatter; typedef struct {} _objc_exc_NSDateIntervalFormatter; #endif struct NSDateIntervalFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; NSLocale *_locale; NSCalendar *_calendar; NSTimeZone *_timeZone; NSString *_dateTemplate; NSString *_dateTemplateFromStyles; void *_formatter; NSDateIntervalFormatterStyle _dateStyle; NSDateIntervalFormatterStyle _timeStyle; BOOL _modified; BOOL _useTemplate; dispatch_semaphore_t _lock; void *_reserved[4]; }; // @property (null_resettable, copy) NSLocale *locale; // @property (null_resettable, copy) NSCalendar *calendar; // @property (null_resettable, copy) NSTimeZone *timeZone; // @property (null_resettable, copy) NSString *dateTemplate; // @property NSDateIntervalFormatterStyle dateStyle; // @property NSDateIntervalFormatterStyle timeStyle; // - (NSString *)stringFromDate:(NSDate *)fromDate toDate:(NSDate *)toDate; // - (nullable NSString *)stringFromDateInterval:(NSDateInterval *)dateInterval __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif typedef NSUInteger NSISO8601DateFormatOptions; enum { NSISO8601DateFormatWithYear __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithYear, NSISO8601DateFormatWithMonth __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithMonth, NSISO8601DateFormatWithWeekOfYear __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithWeekOfYear, NSISO8601DateFormatWithDay __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithDay, NSISO8601DateFormatWithTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithTime, NSISO8601DateFormatWithTimeZone __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithTimeZone, NSISO8601DateFormatWithSpaceBetweenDateAndTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithSpaceBetweenDateAndTime, NSISO8601DateFormatWithDashSeparatorInDate __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithDashSeparatorInDate, NSISO8601DateFormatWithColonSeparatorInTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithColonSeparatorInTime, NSISO8601DateFormatWithColonSeparatorInTimeZone __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithColonSeparatorInTimeZone, NSISO8601DateFormatWithFractionalSeconds __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) = kCFISO8601DateFormatWithFractionalSeconds, NSISO8601DateFormatWithFullDate __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithFullDate, NSISO8601DateFormatWithFullTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithFullTime, NSISO8601DateFormatWithInternetDateTime __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = kCFISO8601DateFormatWithInternetDateTime, }; __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSISO8601DateFormatter #define _REWRITER_typedef_NSISO8601DateFormatter typedef struct objc_object NSISO8601DateFormatter; typedef struct {} _objc_exc_NSISO8601DateFormatter; #endif struct NSISO8601DateFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; CFDateFormatterRef _formatter; NSTimeZone *_timeZone; NSISO8601DateFormatOptions _formatOptions; }; // @property (null_resettable, copy) NSTimeZone *timeZone; // @property NSISO8601DateFormatOptions formatOptions; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (NSString *)stringFromDate:(NSDate *)date; // - (nullable NSDate *)dateFromString:(NSString *)string; // + (NSString *)stringFromDate:(NSDate *)date timeZone:(NSTimeZone *)timeZone formatOptions:(NSISO8601DateFormatOptions)formatOptions; /* @end */ #pragma clang assume_nonnull end // @class NSNumberFormatter; #ifndef _REWRITER_typedef_NSNumberFormatter #define _REWRITER_typedef_NSNumberFormatter typedef struct objc_object NSNumberFormatter; typedef struct {} _objc_exc_NSNumberFormatter; #endif #pragma clang assume_nonnull begin typedef NSInteger NSMassFormatterUnit; enum { NSMassFormatterUnitGram = 11, NSMassFormatterUnitKilogram = 14, NSMassFormatterUnitOunce = (6 << 8) + 1, NSMassFormatterUnitPound = (6 << 8) + 2, NSMassFormatterUnitStone = (6 << 8) + 3, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMassFormatter #define _REWRITER_typedef_NSMassFormatter typedef struct objc_object NSMassFormatter; typedef struct {} _objc_exc_NSMassFormatter; #endif struct NSMassFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; void *_formatter; BOOL _isForPersonMassUse; void *_reserved[2]; }; // @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // @property NSFormattingUnitStyle unitStyle; // @property (getter = isForPersonMassUse) BOOL forPersonMassUse; // - (NSString *)stringFromValue:(double)value unit:(NSMassFormatterUnit)unit; // - (NSString *)stringFromKilograms:(double)numberInKilograms; // - (NSString *)unitStringFromValue:(double)value unit:(NSMassFormatterUnit)unit; // - (NSString *)unitStringFromKilograms:(double)numberInKilograms usedUnit:(nullable NSMassFormatterUnit *)unitp; // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSInteger NSLengthFormatterUnit; enum { NSLengthFormatterUnitMillimeter = 8, NSLengthFormatterUnitCentimeter = 9, NSLengthFormatterUnitMeter = 11, NSLengthFormatterUnitKilometer = 14, NSLengthFormatterUnitInch = (5 << 8) + 1, NSLengthFormatterUnitFoot = (5 << 8) + 2, NSLengthFormatterUnitYard = (5 << 8) + 3, NSLengthFormatterUnitMile = (5 << 8) + 4, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSLengthFormatter #define _REWRITER_typedef_NSLengthFormatter typedef struct objc_object NSLengthFormatter; typedef struct {} _objc_exc_NSLengthFormatter; #endif struct NSLengthFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; void *_formatter; BOOL _isForPersonHeight; void *_reserved[2]; }; // @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // @property NSFormattingUnitStyle unitStyle; // @property (getter = isForPersonHeightUse) BOOL forPersonHeightUse; // - (NSString *)stringFromValue:(double)value unit:(NSLengthFormatterUnit)unit; // - (NSString *)stringFromMeters:(double)numberInMeters; // - (NSString *)unitStringFromValue:(double)value unit:(NSLengthFormatterUnit)unit; // - (NSString *)unitStringFromMeters:(double)numberInMeters usedUnit:(nullable NSLengthFormatterUnit *)unitp; // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSInteger NSEnergyFormatterUnit; enum { NSEnergyFormatterUnitJoule = 11, NSEnergyFormatterUnitKilojoule = 14, NSEnergyFormatterUnitCalorie = (7 << 8) + 1, NSEnergyFormatterUnitKilocalorie = (7 << 8) + 2, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSEnergyFormatter #define _REWRITER_typedef_NSEnergyFormatter typedef struct objc_object NSEnergyFormatter; typedef struct {} _objc_exc_NSEnergyFormatter; #endif struct NSEnergyFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; void *_formatter; BOOL _isForFoodEnergyUse; void *_reserved[2]; }; // @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // @property NSFormattingUnitStyle unitStyle; // @property (getter = isForFoodEnergyUse) BOOL forFoodEnergyUse; // - (NSString *)stringFromValue:(double)value unit:(NSEnergyFormatterUnit)unit; // - (NSString *)stringFromJoules:(double)numberInJoules; // - (NSString *)unitStringFromValue:(double)value unit:(NSEnergyFormatterUnit)unit; // - (NSString *)unitStringFromJoules:(double)numberInJoules usedUnit:(nullable NSEnergyFormatterUnit *)unitp; // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitConverter #define _REWRITER_typedef_NSUnitConverter typedef struct objc_object NSUnitConverter; typedef struct {} _objc_exc_NSUnitConverter; #endif struct NSUnitConverter_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (double)baseUnitValueFromValue:(double)value; // - (double)valueFromBaseUnitValue:(double)baseUnitValue; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitConverterLinear #define _REWRITER_typedef_NSUnitConverterLinear typedef struct objc_object NSUnitConverterLinear; typedef struct {} _objc_exc_NSUnitConverterLinear; #endif struct NSUnitConverterLinear_IMPL { struct NSUnitConverter_IMPL NSUnitConverter_IVARS; double _coefficient; double _constant; }; // @property (readonly) double coefficient; // @property (readonly) double constant; // - (instancetype)initWithCoefficient:(double)coefficient; // - (instancetype)initWithCoefficient:(double)coefficient constant:(double)constant __attribute__((objc_designated_initializer)); /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnit #define _REWRITER_typedef_NSUnit typedef struct objc_object NSUnit; typedef struct {} _objc_exc_NSUnit; #endif struct NSUnit_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *_symbol; }; // @property (readonly, copy) NSString *symbol; // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (instancetype)new __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithSymbol:(NSString *)symbol __attribute__((objc_designated_initializer)); /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSDimension #define _REWRITER_typedef_NSDimension typedef struct objc_object NSDimension; typedef struct {} _objc_exc_NSDimension; #endif struct NSDimension_IMPL { struct NSUnit_IMPL NSUnit_IVARS; NSUInteger _reserved; NSUnitConverter *_converter; }; // @property (readonly, copy) NSUnitConverter *converter; // - (instancetype)initWithSymbol:(NSString *)symbol converter:(NSUnitConverter *)converter __attribute__((objc_designated_initializer)); // + (instancetype)baseUnit; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitAcceleration #define _REWRITER_typedef_NSUnitAcceleration typedef struct objc_object NSUnitAcceleration; typedef struct {} _objc_exc_NSUnitAcceleration; #endif struct NSUnitAcceleration_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitAcceleration *metersPerSecondSquared; @property (class, readonly, copy) NSUnitAcceleration *gravity; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitAngle #define _REWRITER_typedef_NSUnitAngle typedef struct objc_object NSUnitAngle; typedef struct {} _objc_exc_NSUnitAngle; #endif struct NSUnitAngle_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitAngle *degrees; @property (class, readonly, copy) NSUnitAngle *arcMinutes; @property (class, readonly, copy) NSUnitAngle *arcSeconds; @property (class, readonly, copy) NSUnitAngle *radians; @property (class, readonly, copy) NSUnitAngle *gradians; @property (class, readonly, copy) NSUnitAngle *revolutions; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitArea #define _REWRITER_typedef_NSUnitArea typedef struct objc_object NSUnitArea; typedef struct {} _objc_exc_NSUnitArea; #endif struct NSUnitArea_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitArea *squareMegameters; @property (class, readonly, copy) NSUnitArea *squareKilometers; @property (class, readonly, copy) NSUnitArea *squareMeters; @property (class, readonly, copy) NSUnitArea *squareCentimeters; @property (class, readonly, copy) NSUnitArea *squareMillimeters; @property (class, readonly, copy) NSUnitArea *squareMicrometers; @property (class, readonly, copy) NSUnitArea *squareNanometers; @property (class, readonly, copy) NSUnitArea *squareInches; @property (class, readonly, copy) NSUnitArea *squareFeet; @property (class, readonly, copy) NSUnitArea *squareYards; @property (class, readonly, copy) NSUnitArea *squareMiles; @property (class, readonly, copy) NSUnitArea *acres; @property (class, readonly, copy) NSUnitArea *ares; @property (class, readonly, copy) NSUnitArea *hectares; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitConcentrationMass #define _REWRITER_typedef_NSUnitConcentrationMass typedef struct objc_object NSUnitConcentrationMass; typedef struct {} _objc_exc_NSUnitConcentrationMass; #endif struct NSUnitConcentrationMass_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitConcentrationMass *gramsPerLiter; @property (class, readonly, copy) NSUnitConcentrationMass *milligramsPerDeciliter; // + (NSUnitConcentrationMass *)millimolesPerLiterWithGramsPerMole:(double)gramsPerMole; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitDispersion #define _REWRITER_typedef_NSUnitDispersion typedef struct objc_object NSUnitDispersion; typedef struct {} _objc_exc_NSUnitDispersion; #endif struct NSUnitDispersion_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitDispersion *partsPerMillion; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitDuration #define _REWRITER_typedef_NSUnitDuration typedef struct objc_object NSUnitDuration; typedef struct {} _objc_exc_NSUnitDuration; #endif struct NSUnitDuration_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitDuration *hours; @property (class, readonly, copy) NSUnitDuration *minutes; @property (class, readonly, copy) NSUnitDuration *seconds; @property (class, readonly, copy) NSUnitDuration *milliseconds __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); @property (class, readonly, copy) NSUnitDuration *microseconds __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); @property (class, readonly, copy) NSUnitDuration *nanoseconds __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); @property (class, readonly, copy) NSUnitDuration *picoseconds __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitElectricCharge #define _REWRITER_typedef_NSUnitElectricCharge typedef struct objc_object NSUnitElectricCharge; typedef struct {} _objc_exc_NSUnitElectricCharge; #endif struct NSUnitElectricCharge_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitElectricCharge *coulombs; @property (class, readonly, copy) NSUnitElectricCharge *megaampereHours; @property (class, readonly, copy) NSUnitElectricCharge *kiloampereHours; @property (class, readonly, copy) NSUnitElectricCharge *ampereHours; @property (class, readonly, copy) NSUnitElectricCharge *milliampereHours; @property (class, readonly, copy) NSUnitElectricCharge *microampereHours; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitElectricCurrent #define _REWRITER_typedef_NSUnitElectricCurrent typedef struct objc_object NSUnitElectricCurrent; typedef struct {} _objc_exc_NSUnitElectricCurrent; #endif struct NSUnitElectricCurrent_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitElectricCurrent *megaamperes; @property (class, readonly, copy) NSUnitElectricCurrent *kiloamperes; @property (class, readonly, copy) NSUnitElectricCurrent *amperes; @property (class, readonly, copy) NSUnitElectricCurrent *milliamperes; @property (class, readonly, copy) NSUnitElectricCurrent *microamperes; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitElectricPotentialDifference #define _REWRITER_typedef_NSUnitElectricPotentialDifference typedef struct objc_object NSUnitElectricPotentialDifference; typedef struct {} _objc_exc_NSUnitElectricPotentialDifference; #endif struct NSUnitElectricPotentialDifference_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitElectricPotentialDifference *megavolts; @property (class, readonly, copy) NSUnitElectricPotentialDifference *kilovolts; @property (class, readonly, copy) NSUnitElectricPotentialDifference *volts; @property (class, readonly, copy) NSUnitElectricPotentialDifference *millivolts; @property (class, readonly, copy) NSUnitElectricPotentialDifference *microvolts; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitElectricResistance #define _REWRITER_typedef_NSUnitElectricResistance typedef struct objc_object NSUnitElectricResistance; typedef struct {} _objc_exc_NSUnitElectricResistance; #endif struct NSUnitElectricResistance_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitElectricResistance *megaohms; @property (class, readonly, copy) NSUnitElectricResistance *kiloohms; @property (class, readonly, copy) NSUnitElectricResistance *ohms; @property (class, readonly, copy) NSUnitElectricResistance *milliohms; @property (class, readonly, copy) NSUnitElectricResistance *microohms; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitEnergy #define _REWRITER_typedef_NSUnitEnergy typedef struct objc_object NSUnitEnergy; typedef struct {} _objc_exc_NSUnitEnergy; #endif struct NSUnitEnergy_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitEnergy *kilojoules; @property (class, readonly, copy) NSUnitEnergy *joules; @property (class, readonly, copy) NSUnitEnergy *kilocalories; @property (class, readonly, copy) NSUnitEnergy *calories; @property (class, readonly, copy) NSUnitEnergy *kilowattHours; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitFrequency #define _REWRITER_typedef_NSUnitFrequency typedef struct objc_object NSUnitFrequency; typedef struct {} _objc_exc_NSUnitFrequency; #endif struct NSUnitFrequency_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitFrequency *terahertz; @property (class, readonly, copy) NSUnitFrequency *gigahertz; @property (class, readonly, copy) NSUnitFrequency *megahertz; @property (class, readonly, copy) NSUnitFrequency *kilohertz; @property (class, readonly, copy) NSUnitFrequency *hertz; @property (class, readonly, copy) NSUnitFrequency *millihertz; @property (class, readonly, copy) NSUnitFrequency *microhertz; @property (class, readonly, copy) NSUnitFrequency *nanohertz; @property (class, readonly, copy) NSUnitFrequency *framesPerSecond __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitFuelEfficiency #define _REWRITER_typedef_NSUnitFuelEfficiency typedef struct objc_object NSUnitFuelEfficiency; typedef struct {} _objc_exc_NSUnitFuelEfficiency; #endif struct NSUnitFuelEfficiency_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitFuelEfficiency *litersPer100Kilometers; @property (class, readonly, copy) NSUnitFuelEfficiency *milesPerImperialGallon; @property (class, readonly, copy) NSUnitFuelEfficiency *milesPerGallon; /* @end */ __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((swift_name("UnitInformationStorage"))) #ifndef _REWRITER_typedef_NSUnitInformationStorage #define _REWRITER_typedef_NSUnitInformationStorage typedef struct objc_object NSUnitInformationStorage; typedef struct {} _objc_exc_NSUnitInformationStorage; #endif struct NSUnitInformationStorage_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (readonly, class, copy) NSUnitInformationStorage *bytes; @property (readonly, class, copy) NSUnitInformationStorage *bits; @property (readonly, class, copy) NSUnitInformationStorage *nibbles; @property (readonly, class, copy) NSUnitInformationStorage *yottabytes; @property (readonly, class, copy) NSUnitInformationStorage *zettabytes; @property (readonly, class, copy) NSUnitInformationStorage *exabytes; @property (readonly, class, copy) NSUnitInformationStorage *petabytes; @property (readonly, class, copy) NSUnitInformationStorage *terabytes; @property (readonly, class, copy) NSUnitInformationStorage *gigabytes; @property (readonly, class, copy) NSUnitInformationStorage *megabytes; @property (readonly, class, copy) NSUnitInformationStorage *kilobytes; @property (readonly, class, copy) NSUnitInformationStorage *yottabits; @property (readonly, class, copy) NSUnitInformationStorage *zettabits; @property (readonly, class, copy) NSUnitInformationStorage *exabits; @property (readonly, class, copy) NSUnitInformationStorage *petabits; @property (readonly, class, copy) NSUnitInformationStorage *terabits; @property (readonly, class, copy) NSUnitInformationStorage *gigabits; @property (readonly, class, copy) NSUnitInformationStorage *megabits; @property (readonly, class, copy) NSUnitInformationStorage *kilobits; @property (readonly, class, copy) NSUnitInformationStorage *yobibytes; @property (readonly, class, copy) NSUnitInformationStorage *zebibytes; @property (readonly, class, copy) NSUnitInformationStorage *exbibytes; @property (readonly, class, copy) NSUnitInformationStorage *pebibytes; @property (readonly, class, copy) NSUnitInformationStorage *tebibytes; @property (readonly, class, copy) NSUnitInformationStorage *gibibytes; @property (readonly, class, copy) NSUnitInformationStorage *mebibytes; @property (readonly, class, copy) NSUnitInformationStorage *kibibytes; @property (readonly, class, copy) NSUnitInformationStorage *yobibits; @property (readonly, class, copy) NSUnitInformationStorage *zebibits; @property (readonly, class, copy) NSUnitInformationStorage *exbibits; @property (readonly, class, copy) NSUnitInformationStorage *pebibits; @property (readonly, class, copy) NSUnitInformationStorage *tebibits; @property (readonly, class, copy) NSUnitInformationStorage *gibibits; @property (readonly, class, copy) NSUnitInformationStorage *mebibits; @property (readonly, class, copy) NSUnitInformationStorage *kibibits; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitLength #define _REWRITER_typedef_NSUnitLength typedef struct objc_object NSUnitLength; typedef struct {} _objc_exc_NSUnitLength; #endif struct NSUnitLength_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitLength *megameters; @property (class, readonly, copy) NSUnitLength *kilometers; @property (class, readonly, copy) NSUnitLength *hectometers; @property (class, readonly, copy) NSUnitLength *decameters; @property (class, readonly, copy) NSUnitLength *meters; @property (class, readonly, copy) NSUnitLength *decimeters; @property (class, readonly, copy) NSUnitLength *centimeters; @property (class, readonly, copy) NSUnitLength *millimeters; @property (class, readonly, copy) NSUnitLength *micrometers; @property (class, readonly, copy) NSUnitLength *nanometers; @property (class, readonly, copy) NSUnitLength *picometers; @property (class, readonly, copy) NSUnitLength *inches; @property (class, readonly, copy) NSUnitLength *feet; @property (class, readonly, copy) NSUnitLength *yards; @property (class, readonly, copy) NSUnitLength *miles; @property (class, readonly, copy) NSUnitLength *scandinavianMiles; @property (class, readonly, copy) NSUnitLength *lightyears; @property (class, readonly, copy) NSUnitLength *nauticalMiles; @property (class, readonly, copy) NSUnitLength *fathoms; @property (class, readonly, copy) NSUnitLength *furlongs; @property (class, readonly, copy) NSUnitLength *astronomicalUnits; @property (class, readonly, copy) NSUnitLength *parsecs; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitIlluminance #define _REWRITER_typedef_NSUnitIlluminance typedef struct objc_object NSUnitIlluminance; typedef struct {} _objc_exc_NSUnitIlluminance; #endif struct NSUnitIlluminance_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitIlluminance *lux; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitMass #define _REWRITER_typedef_NSUnitMass typedef struct objc_object NSUnitMass; typedef struct {} _objc_exc_NSUnitMass; #endif struct NSUnitMass_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitMass *kilograms; @property (class, readonly, copy) NSUnitMass *grams; @property (class, readonly, copy) NSUnitMass *decigrams; @property (class, readonly, copy) NSUnitMass *centigrams; @property (class, readonly, copy) NSUnitMass *milligrams; @property (class, readonly, copy) NSUnitMass *micrograms; @property (class, readonly, copy) NSUnitMass *nanograms; @property (class, readonly, copy) NSUnitMass *picograms; @property (class, readonly, copy) NSUnitMass *ounces; @property (class, readonly, copy) NSUnitMass *poundsMass; @property (class, readonly, copy) NSUnitMass *stones; @property (class, readonly, copy) NSUnitMass *metricTons; @property (class, readonly, copy) NSUnitMass *shortTons; @property (class, readonly, copy) NSUnitMass *carats; @property (class, readonly, copy) NSUnitMass *ouncesTroy; @property (class, readonly, copy) NSUnitMass *slugs; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitPower #define _REWRITER_typedef_NSUnitPower typedef struct objc_object NSUnitPower; typedef struct {} _objc_exc_NSUnitPower; #endif struct NSUnitPower_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitPower *terawatts; @property (class, readonly, copy) NSUnitPower *gigawatts; @property (class, readonly, copy) NSUnitPower *megawatts; @property (class, readonly, copy) NSUnitPower *kilowatts; @property (class, readonly, copy) NSUnitPower *watts; @property (class, readonly, copy) NSUnitPower *milliwatts; @property (class, readonly, copy) NSUnitPower *microwatts; @property (class, readonly, copy) NSUnitPower *nanowatts; @property (class, readonly, copy) NSUnitPower *picowatts; @property (class, readonly, copy) NSUnitPower *femtowatts; @property (class, readonly, copy) NSUnitPower *horsepower; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitPressure #define _REWRITER_typedef_NSUnitPressure typedef struct objc_object NSUnitPressure; typedef struct {} _objc_exc_NSUnitPressure; #endif struct NSUnitPressure_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitPressure *newtonsPerMetersSquared; @property (class, readonly, copy) NSUnitPressure *gigapascals; @property (class, readonly, copy) NSUnitPressure *megapascals; @property (class, readonly, copy) NSUnitPressure *kilopascals; @property (class, readonly, copy) NSUnitPressure *hectopascals; @property (class, readonly, copy) NSUnitPressure *inchesOfMercury; @property (class, readonly, copy) NSUnitPressure *bars; @property (class, readonly, copy) NSUnitPressure *millibars; @property (class, readonly, copy) NSUnitPressure *millimetersOfMercury; @property (class, readonly, copy) NSUnitPressure *poundsForcePerSquareInch; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitSpeed #define _REWRITER_typedef_NSUnitSpeed typedef struct objc_object NSUnitSpeed; typedef struct {} _objc_exc_NSUnitSpeed; #endif struct NSUnitSpeed_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitSpeed *metersPerSecond; @property (class, readonly, copy) NSUnitSpeed *kilometersPerHour; @property (class, readonly, copy) NSUnitSpeed *milesPerHour; @property (class, readonly, copy) NSUnitSpeed *knots; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitTemperature #define _REWRITER_typedef_NSUnitTemperature typedef struct objc_object NSUnitTemperature; typedef struct {} _objc_exc_NSUnitTemperature; #endif struct NSUnitTemperature_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitTemperature *kelvin; @property (class, readonly, copy) NSUnitTemperature *celsius; @property (class, readonly, copy) NSUnitTemperature *fahrenheit; /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSUnitVolume #define _REWRITER_typedef_NSUnitVolume typedef struct objc_object NSUnitVolume; typedef struct {} _objc_exc_NSUnitVolume; #endif struct NSUnitVolume_IMPL { struct NSDimension_IMPL NSDimension_IVARS; }; @property (class, readonly, copy) NSUnitVolume *megaliters; @property (class, readonly, copy) NSUnitVolume *kiloliters; @property (class, readonly, copy) NSUnitVolume *liters; @property (class, readonly, copy) NSUnitVolume *deciliters; @property (class, readonly, copy) NSUnitVolume *centiliters; @property (class, readonly, copy) NSUnitVolume *milliliters; @property (class, readonly, copy) NSUnitVolume *cubicKilometers; @property (class, readonly, copy) NSUnitVolume *cubicMeters; @property (class, readonly, copy) NSUnitVolume *cubicDecimeters; @property (class, readonly, copy) NSUnitVolume *cubicCentimeters; @property (class, readonly, copy) NSUnitVolume *cubicMillimeters; @property (class, readonly, copy) NSUnitVolume *cubicInches; @property (class, readonly, copy) NSUnitVolume *cubicFeet; @property (class, readonly, copy) NSUnitVolume *cubicYards; @property (class, readonly, copy) NSUnitVolume *cubicMiles; @property (class, readonly, copy) NSUnitVolume *acreFeet; @property (class, readonly, copy) NSUnitVolume *bushels; @property (class, readonly, copy) NSUnitVolume *teaspoons; @property (class, readonly, copy) NSUnitVolume *tablespoons; @property (class, readonly, copy) NSUnitVolume *fluidOunces; @property (class, readonly, copy) NSUnitVolume *cups; @property (class, readonly, copy) NSUnitVolume *pints; @property (class, readonly, copy) NSUnitVolume *quarts; @property (class, readonly, copy) NSUnitVolume *gallons; @property (class, readonly, copy) NSUnitVolume *imperialTeaspoons; @property (class, readonly, copy) NSUnitVolume *imperialTablespoons; @property (class, readonly, copy) NSUnitVolume *imperialFluidOunces; @property (class, readonly, copy) NSUnitVolume *imperialPints; @property (class, readonly, copy) NSUnitVolume *imperialQuarts; @property (class, readonly, copy) NSUnitVolume *imperialGallons; @property (class, readonly, copy) NSUnitVolume *metricCups; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSMeasurement #define _REWRITER_typedef_NSMeasurement typedef struct objc_object NSMeasurement; typedef struct {} _objc_exc_NSMeasurement; #endif struct NSMeasurement_IMPL { struct NSObject_IMPL NSObject_IVARS; UnitType _unit; double _doubleValue; }; // @property (readonly, copy) UnitType unit; // @property (readonly) double doubleValue; // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithDoubleValue:(double)doubleValue unit:(UnitType)unit __attribute__((objc_designated_initializer)); // - (BOOL)canBeConvertedToUnit:(NSUnit *)unit; // - (NSMeasurement *)measurementByConvertingToUnit:(NSUnit *)unit; // - (NSMeasurement<UnitType> *)measurementByAddingMeasurement:(NSMeasurement<UnitType> *)measurement; // - (NSMeasurement<UnitType> *)measurementBySubtractingMeasurement:(NSMeasurement<UnitType> *)measurement; /* @end */ #pragma clang assume_nonnull end // @class NSLocale; #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSRecursiveLock #define _REWRITER_typedef_NSRecursiveLock typedef struct objc_object NSRecursiveLock; typedef struct {} _objc_exc_NSRecursiveLock; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSCache #define _REWRITER_typedef_NSCache typedef struct objc_object NSCache; typedef struct {} _objc_exc_NSCache; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSNumberFormatterBehavior; enum { NSNumberFormatterBehaviorDefault = 0, NSNumberFormatterBehavior10_0 = 1000, NSNumberFormatterBehavior10_4 = 1040, }; #ifndef _REWRITER_typedef_NSNumberFormatter #define _REWRITER_typedef_NSNumberFormatter typedef struct objc_object NSNumberFormatter; typedef struct {} _objc_exc_NSNumberFormatter; #endif struct NSNumberFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; NSMutableDictionary *_attributes; CFNumberFormatterRef _formatter; NSUInteger _counter; NSNumberFormatterBehavior _behavior; NSRecursiveLock *_lock; unsigned long _stateBitMask; NSInteger _cacheGeneration; void *_reserved[8]; }; // @property NSFormattingContext formattingContext __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string range:(inout nullable NSRange *)rangep error:(out NSError **)error; // - (nullable NSString *)stringFromNumber:(NSNumber *)number; // - (nullable NSNumber *)numberFromString:(NSString *)string; typedef NSUInteger NSNumberFormatterStyle; enum { NSNumberFormatterNoStyle = kCFNumberFormatterNoStyle, NSNumberFormatterDecimalStyle = kCFNumberFormatterDecimalStyle, NSNumberFormatterCurrencyStyle = kCFNumberFormatterCurrencyStyle, NSNumberFormatterPercentStyle = kCFNumberFormatterPercentStyle, NSNumberFormatterScientificStyle = kCFNumberFormatterScientificStyle, NSNumberFormatterSpellOutStyle = kCFNumberFormatterSpellOutStyle, NSNumberFormatterOrdinalStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFNumberFormatterOrdinalStyle, NSNumberFormatterCurrencyISOCodeStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFNumberFormatterCurrencyISOCodeStyle, NSNumberFormatterCurrencyPluralStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFNumberFormatterCurrencyPluralStyle, NSNumberFormatterCurrencyAccountingStyle __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = kCFNumberFormatterCurrencyAccountingStyle, }; // + (NSString *)localizedStringFromNumber:(NSNumber *)num numberStyle:(NSNumberFormatterStyle)nstyle __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSNumberFormatterBehavior)defaultFormatterBehavior; // + (void)setDefaultFormatterBehavior:(NSNumberFormatterBehavior)behavior; // @property NSNumberFormatterStyle numberStyle; // @property (null_resettable, copy) NSLocale *locale; // @property BOOL generatesDecimalNumbers; // @property NSNumberFormatterBehavior formatterBehavior; // @property (null_resettable, copy) NSString *negativeFormat; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNegativeValues; // @property (null_resettable, copy) NSString *positiveFormat; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForPositiveValues; // @property BOOL allowsFloats; // @property (null_resettable, copy) NSString *decimalSeparator; // @property BOOL alwaysShowsDecimalSeparator; // @property (null_resettable, copy) NSString *currencyDecimalSeparator; // @property BOOL usesGroupingSeparator; // @property (null_resettable, copy) NSString *groupingSeparator; // @property (nullable, copy) NSString *zeroSymbol; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForZero; // @property (copy) NSString *nilSymbol; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNil; // @property (null_resettable, copy) NSString *notANumberSymbol; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNotANumber; // @property (copy) NSString *positiveInfinitySymbol; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForPositiveInfinity; // @property (copy) NSString *negativeInfinitySymbol; // @property (nullable, copy) NSDictionary<NSString *, id> *textAttributesForNegativeInfinity; // @property (null_resettable, copy) NSString *positivePrefix; // @property (null_resettable, copy) NSString *positiveSuffix; // @property (null_resettable, copy) NSString *negativePrefix; // @property (null_resettable, copy) NSString *negativeSuffix; // @property (null_resettable, copy) NSString *currencyCode; // @property (null_resettable, copy) NSString *currencySymbol; // @property (null_resettable, copy) NSString *internationalCurrencySymbol; // @property (null_resettable, copy) NSString *percentSymbol; // @property (null_resettable, copy) NSString *perMillSymbol; // @property (null_resettable, copy) NSString *minusSign; // @property (null_resettable, copy) NSString *plusSign; // @property (null_resettable, copy) NSString *exponentSymbol; // @property NSUInteger groupingSize; // @property NSUInteger secondaryGroupingSize; // @property (nullable, copy) NSNumber *multiplier; // @property NSUInteger formatWidth; // @property (null_resettable, copy) NSString *paddingCharacter; typedef NSUInteger NSNumberFormatterPadPosition; enum { NSNumberFormatterPadBeforePrefix = kCFNumberFormatterPadBeforePrefix, NSNumberFormatterPadAfterPrefix = kCFNumberFormatterPadAfterPrefix, NSNumberFormatterPadBeforeSuffix = kCFNumberFormatterPadBeforeSuffix, NSNumberFormatterPadAfterSuffix = kCFNumberFormatterPadAfterSuffix }; typedef NSUInteger NSNumberFormatterRoundingMode; enum { NSNumberFormatterRoundCeiling = kCFNumberFormatterRoundCeiling, NSNumberFormatterRoundFloor = kCFNumberFormatterRoundFloor, NSNumberFormatterRoundDown = kCFNumberFormatterRoundDown, NSNumberFormatterRoundUp = kCFNumberFormatterRoundUp, NSNumberFormatterRoundHalfEven = kCFNumberFormatterRoundHalfEven, NSNumberFormatterRoundHalfDown = kCFNumberFormatterRoundHalfDown, NSNumberFormatterRoundHalfUp = kCFNumberFormatterRoundHalfUp }; // @property NSNumberFormatterPadPosition paddingPosition; // @property NSNumberFormatterRoundingMode roundingMode; // @property (null_resettable, copy) NSNumber *roundingIncrement; // @property NSUInteger minimumIntegerDigits; // @property NSUInteger maximumIntegerDigits; // @property NSUInteger minimumFractionDigits; // @property NSUInteger maximumFractionDigits; // @property (nullable, copy) NSNumber *minimum; // @property (nullable, copy) NSNumber *maximum; // @property (null_resettable, copy) NSString *currencyGroupingSeparator __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (getter=isLenient) BOOL lenient __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property BOOL usesSignificantDigits __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSUInteger minimumSignificantDigits __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSUInteger maximumSignificantDigits __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (getter=isPartialStringValidationEnabled) BOOL partialStringValidationEnabled __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @class NSDecimalNumberHandler; #ifndef _REWRITER_typedef_NSDecimalNumberHandler #define _REWRITER_typedef_NSDecimalNumberHandler typedef struct objc_object NSDecimalNumberHandler; typedef struct {} _objc_exc_NSDecimalNumberHandler; #endif // @interface NSNumberFormatter (NSNumberFormatterCompatibility) // @property BOOL hasThousandSeparators; // @property (null_resettable, copy) NSString *thousandSeparator; // @property BOOL localizesFormat; // @property (copy) NSString *format; // @property (copy) NSAttributedString *attributedStringForZero; // @property (copy) NSAttributedString *attributedStringForNil; // @property (copy) NSAttributedString *attributedStringForNotANumber; // @property (copy) NSDecimalNumberHandler *roundingBehavior; /* @end */ #pragma clang assume_nonnull end // @class NSCalendar; #ifndef _REWRITER_typedef_NSCalendar #define _REWRITER_typedef_NSCalendar typedef struct objc_object NSCalendar; typedef struct {} _objc_exc_NSCalendar; #endif typedef NSString * NSLocaleKey __attribute__((swift_wrapper(enum))); // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif struct NSLocale_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (nullable id)objectForKey:(NSLocaleKey)key; // - (nullable NSString *)displayNameForKey:(NSLocaleKey)key value:(id)value; // - (instancetype)initWithLocaleIdentifier:(NSString *)string __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSLocale (NSExtendedLocale) // @property (readonly, copy) NSString *localeIdentifier; // - (NSString *)localizedStringForLocaleIdentifier:(NSString *)localeIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *languageCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForLanguageCode:(NSString *)languageCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (nullable, readonly, copy) NSString *countryCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForCountryCode:(NSString *)countryCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (nullable, readonly, copy) NSString *scriptCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForScriptCode:(NSString *)scriptCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (nullable, readonly, copy) NSString *variantCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForVariantCode:(NSString *)variantCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSCharacterSet *exemplarCharacterSet __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *calendarIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForCalendarIdentifier:(NSString *)calendarIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (nullable, readonly, copy) NSString *collationIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForCollationIdentifier:(NSString *)collationIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly) BOOL usesMetricSystem __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *decimalSeparator __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *groupingSeparator __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *currencySymbol __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (nullable, readonly, copy) NSString *currencyCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForCurrencyCode:(NSString *)currencyCode __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *collatorIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSString *)localizedStringForCollatorIdentifier:(NSString *)collatorIdentifier __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *quotationBeginDelimiter __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *quotationEndDelimiter __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *alternateQuotationBeginDelimiter __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, copy) NSString *alternateQuotationEndDelimiter __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); /* @end */ // @interface NSLocale (NSLocaleCreation) @property (class, readonly, strong) NSLocale *autoupdatingCurrentLocale __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSLocale *currentLocale; @property (class, readonly, copy) NSLocale *systemLocale; // + (instancetype)localeWithLocaleIdentifier:(NSString *)ident __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @interface NSLocale (NSLocaleGeneralInfo) @property (class, readonly, copy) NSArray<NSString *> *availableLocaleIdentifiers; @property (class, readonly, copy) NSArray<NSString *> *ISOLanguageCodes; @property (class, readonly, copy) NSArray<NSString *> *ISOCountryCodes; @property (class, readonly, copy) NSArray<NSString *> *ISOCurrencyCodes; @property (class, readonly, copy) NSArray<NSString *> *commonISOCurrencyCodes __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSArray<NSString *> *preferredLanguages __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSDictionary<NSString *, NSString *> *)componentsFromLocaleIdentifier:(NSString *)string; // + (NSString *)localeIdentifierFromComponents:(NSDictionary<NSString *, NSString *> *)dict; // + (NSString *)canonicalLocaleIdentifierFromString:(NSString *)string; // + (NSString *)canonicalLanguageIdentifierFromString:(NSString *)string; // + (nullable NSString *)localeIdentifierFromWindowsLocaleCode:(uint32_t)lcid __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (uint32_t)windowsLocaleCodeFromLocaleIdentifier:(NSString *)localeIdentifier __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSLocaleLanguageDirection; enum { NSLocaleLanguageDirectionUnknown = kCFLocaleLanguageDirectionUnknown, NSLocaleLanguageDirectionLeftToRight = kCFLocaleLanguageDirectionLeftToRight, NSLocaleLanguageDirectionRightToLeft = kCFLocaleLanguageDirectionRightToLeft, NSLocaleLanguageDirectionTopToBottom = kCFLocaleLanguageDirectionTopToBottom, NSLocaleLanguageDirectionBottomToTop = kCFLocaleLanguageDirectionBottomToTop }; // + (NSLocaleLanguageDirection)characterDirectionForLanguage:(NSString *)isoLangCode __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSLocaleLanguageDirection)lineDirectionForLanguage:(NSString *)isoLangCode __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSCurrentLocaleDidChangeNotification __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSLocaleKey const NSLocaleIdentifier; extern "C" NSLocaleKey const NSLocaleLanguageCode; extern "C" NSLocaleKey const NSLocaleCountryCode; extern "C" NSLocaleKey const NSLocaleScriptCode; extern "C" NSLocaleKey const NSLocaleVariantCode; extern "C" NSLocaleKey const NSLocaleExemplarCharacterSet; extern "C" NSLocaleKey const NSLocaleCalendar; extern "C" NSLocaleKey const NSLocaleCollationIdentifier; extern "C" NSLocaleKey const NSLocaleUsesMetricSystem; extern "C" NSLocaleKey const NSLocaleMeasurementSystem; extern "C" NSLocaleKey const NSLocaleDecimalSeparator; extern "C" NSLocaleKey const NSLocaleGroupingSeparator; extern "C" NSLocaleKey const NSLocaleCurrencySymbol; extern "C" NSLocaleKey const NSLocaleCurrencyCode; extern "C" NSLocaleKey const NSLocaleCollatorIdentifier __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSLocaleKey const NSLocaleQuotationBeginDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSLocaleKey const NSLocaleQuotationEndDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSLocaleKey const NSLocaleAlternateQuotationBeginDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSLocaleKey const NSLocaleAlternateQuotationEndDelimiterKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSGregorianCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierGregorian"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierGregorian"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierGregorian"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierGregorian"))); extern "C" NSString * const NSBuddhistCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierBuddhist"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierBuddhist"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierBuddhist"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierBuddhist"))); extern "C" NSString * const NSChineseCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierChinese"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierChinese"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierChinese"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierChinese"))); extern "C" NSString * const NSHebrewCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierHebrew"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierHebrew"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierHebrew"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierHebrew"))); extern "C" NSString * const NSIslamicCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierIslamic"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierIslamic"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierIslamic"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierIslamic"))); extern "C" NSString * const NSIslamicCivilCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierIslamicCivil"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierIslamicCivil"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierIslamicCivil"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierIslamicCivil"))); extern "C" NSString * const NSJapaneseCalendar __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="NSCalendarIdentifierJapanese"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="NSCalendarIdentifierJapanese"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierJapanese"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierJapanese"))); extern "C" NSString * const NSRepublicOfChinaCalendar __attribute__((availability(macos,introduced=10.6,deprecated=10.10,replacement="NSCalendarIdentifierRepublicOfChina"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarIdentifierRepublicOfChina"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierRepublicOfChina"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierRepublicOfChina"))); extern "C" NSString * const NSPersianCalendar __attribute__((availability(macos,introduced=10.6,deprecated=10.10,replacement="NSCalendarIdentifierPersian"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarIdentifierPersian"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierPersian"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierPersian"))); extern "C" NSString * const NSIndianCalendar __attribute__((availability(macos,introduced=10.6,deprecated=10.10,replacement="NSCalendarIdentifierIndian"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarIdentifierIndian"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierIndian"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierIndian"))); extern "C" NSString * const NSISO8601Calendar __attribute__((availability(macos,introduced=10.6,deprecated=10.10,replacement="NSCalendarIdentifierISO8601"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,replacement="NSCalendarIdentifierISO8601"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="NSCalendarIdentifierISO8601"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="NSCalendarIdentifierISO8601"))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSUInteger NSMeasurementFormatterUnitOptions; enum { NSMeasurementFormatterUnitOptionsProvidedUnit = (1UL << 0), NSMeasurementFormatterUnitOptionsNaturalScale = (1UL << 1), NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = (1UL << 2), } __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSMeasurementFormatter #define _REWRITER_typedef_NSMeasurementFormatter typedef struct objc_object NSMeasurementFormatter; typedef struct {} _objc_exc_NSMeasurementFormatter; #endif struct NSMeasurementFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; void *_formatter; }; // @property NSMeasurementFormatterUnitOptions unitOptions; // @property NSFormattingUnitStyle unitStyle; // @property (null_resettable, copy) NSLocale *locale; // @property (null_resettable, copy) NSNumberFormatter *numberFormatter; // - (NSString *)stringFromMeasurement:(NSMeasurement *)measurement; // - (NSString *)stringFromUnit:(NSUnit *)unit; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSPersonNameComponents #define _REWRITER_typedef_NSPersonNameComponents typedef struct objc_object NSPersonNameComponents; typedef struct {} _objc_exc_NSPersonNameComponents; #endif struct NSPersonNameComponents_IMPL { struct NSObject_IMPL NSObject_IVARS; id _private; }; // @property (copy, nullable) NSString *namePrefix; // @property (copy, nullable) NSString *givenName; // @property (copy, nullable) NSString *middleName; // @property (copy, nullable) NSString *familyName; // @property (copy, nullable) NSString *nameSuffix; // @property (copy, nullable) NSString *nickname; // @property (copy, nullable) NSPersonNameComponents *phoneticRepresentation; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSInteger NSPersonNameComponentsFormatterStyle; enum { NSPersonNameComponentsFormatterStyleDefault = 0, NSPersonNameComponentsFormatterStyleShort, NSPersonNameComponentsFormatterStyleMedium, NSPersonNameComponentsFormatterStyleLong, NSPersonNameComponentsFormatterStyleAbbreviated } __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSPersonNameComponentsFormatterOptions; enum { NSPersonNameComponentsFormatterPhonetic = (1UL << 1) } __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSPersonNameComponentsFormatter #define _REWRITER_typedef_NSPersonNameComponentsFormatter typedef struct objc_object NSPersonNameComponentsFormatter; typedef struct {} _objc_exc_NSPersonNameComponentsFormatter; #endif struct NSPersonNameComponentsFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; id _private; }; // @property NSPersonNameComponentsFormatterStyle style; // @property (getter=isPhonetic) BOOL phonetic; // @property (null_resettable, copy) NSLocale *locale __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #if 0 + (NSString *)localizedStringFromPersonNameComponents:(NSPersonNameComponents *)components style:(NSPersonNameComponentsFormatterStyle)nameFormatStyle options:(NSPersonNameComponentsFormatterOptions)nameOptions; #endif // - (NSString *)stringFromPersonNameComponents:(NSPersonNameComponents *)components; // - (NSAttributedString *)annotatedStringFromPersonNameComponents:(NSPersonNameComponents *)components; // - (nullable NSPersonNameComponents *)personNameComponentsFromString:(nonnull NSString *)string __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; /* @end */ extern "C" NSString * const NSPersonNameComponentKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentGivenName __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentFamilyName __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentMiddleName __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentPrefix __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentSuffix __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentNickname __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSPersonNameComponentDelimiter __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end // @class NSCalendar; #ifndef _REWRITER_typedef_NSCalendar #define _REWRITER_typedef_NSCalendar typedef struct objc_object NSCalendar; typedef struct {} _objc_exc_NSCalendar; #endif #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #ifndef _REWRITER_typedef_NSDateComponents #define _REWRITER_typedef_NSDateComponents typedef struct objc_object NSDateComponents; typedef struct {} _objc_exc_NSDateComponents; #endif #pragma clang assume_nonnull begin typedef NSInteger NSRelativeDateTimeFormatterStyle; enum { NSRelativeDateTimeFormatterStyleNumeric = 0, NSRelativeDateTimeFormatterStyleNamed, } __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); typedef NSInteger NSRelativeDateTimeFormatterUnitsStyle; enum { NSRelativeDateTimeFormatterUnitsStyleFull = 0, NSRelativeDateTimeFormatterUnitsStyleSpellOut, NSRelativeDateTimeFormatterUnitsStyleShort, NSRelativeDateTimeFormatterUnitsStyleAbbreviated, } __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) #ifndef _REWRITER_typedef_NSRelativeDateTimeFormatter #define _REWRITER_typedef_NSRelativeDateTimeFormatter typedef struct objc_object NSRelativeDateTimeFormatter; typedef struct {} _objc_exc_NSRelativeDateTimeFormatter; #endif struct NSRelativeDateTimeFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; }; // @property NSRelativeDateTimeFormatterStyle dateTimeStyle; // @property NSRelativeDateTimeFormatterUnitsStyle unitsStyle; // @property NSFormattingContext formattingContext; // @property (null_resettable, copy) NSCalendar *calendar; // @property (null_resettable, copy) NSLocale *locale; // - (NSString *)localizedStringFromDateComponents:(NSDateComponents *)dateComponents; // - (NSString *)localizedStringFromTimeInterval:(NSTimeInterval)timeInterval; // - (NSString *)localizedStringForDate:(NSDate *)date relativeToDate:(NSDate *)referenceDate; // - (nullable NSString *)stringForObjectValue:(nullable id)obj; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) #ifndef _REWRITER_typedef_NSListFormatter #define _REWRITER_typedef_NSListFormatter typedef struct objc_object NSListFormatter; typedef struct {} _objc_exc_NSListFormatter; #endif struct NSListFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; }; // @property (null_resettable, copy) NSLocale *locale; // @property (nullable, copy) NSFormatter *itemFormatter; // + (NSString *)localizedStringByJoiningStrings:(NSArray<NSString *> *)strings; // - (nullable NSString *)stringFromItems:(NSArray *)items; // - (nullable NSString *)stringForObjectValue:(nullable id)obj; /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSRoundingMode; enum { NSRoundPlain, NSRoundDown, NSRoundUp, NSRoundBankers }; typedef NSUInteger NSCalculationError; enum { NSCalculationNoError = 0, NSCalculationLossOfPrecision, NSCalculationUnderflow, NSCalculationOverflow, NSCalculationDivideByZero }; typedef struct { signed int _exponent:8; unsigned int _length:4; unsigned int _isNegative:1; unsigned int _isCompact:1; unsigned int _reserved:18; unsigned short _mantissa[(8)]; } NSDecimal; static __inline__ __attribute__((always_inline)) BOOL NSDecimalIsNotANumber(const NSDecimal *dcm) { return ((dcm->_length == 0) && dcm->_isNegative); } extern "C" void NSDecimalCopy(NSDecimal *destination, const NSDecimal *source); extern "C" void NSDecimalCompact(NSDecimal *number); extern "C" NSComparisonResult NSDecimalCompare(const NSDecimal *leftOperand, const NSDecimal *rightOperand); extern "C" void NSDecimalRound(NSDecimal *result, const NSDecimal *number, NSInteger scale, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalNormalize(NSDecimal *number1, NSDecimal *number2, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalAdd(NSDecimal *result, const NSDecimal *leftOperand, const NSDecimal *rightOperand, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalSubtract(NSDecimal *result, const NSDecimal *leftOperand, const NSDecimal *rightOperand, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalMultiply(NSDecimal *result, const NSDecimal *leftOperand, const NSDecimal *rightOperand, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalDivide(NSDecimal *result, const NSDecimal *leftOperand, const NSDecimal *rightOperand, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalPower(NSDecimal *result, const NSDecimal *number, NSUInteger power, NSRoundingMode roundingMode); extern "C" NSCalculationError NSDecimalMultiplyByPowerOf10(NSDecimal *result, const NSDecimal *number, short power, NSRoundingMode roundingMode); extern "C" NSString *NSDecimalString(const NSDecimal *dcm, id _Nullable locale); #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSCharacterSet #define _REWRITER_typedef_NSCharacterSet typedef struct objc_object NSCharacterSet; typedef struct {} _objc_exc_NSCharacterSet; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSScanner #define _REWRITER_typedef_NSScanner typedef struct objc_object NSScanner; typedef struct {} _objc_exc_NSScanner; #endif struct NSScanner_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSString *string; // @property NSUInteger scanLocation ; // @property (nullable, copy) NSCharacterSet *charactersToBeSkipped; // @property BOOL caseSensitive; // @property (nullable, retain) id locale; // - (instancetype)initWithString:(NSString *)string __attribute__((objc_designated_initializer)); /* @end */ // @interface NSScanner (NSExtendedScanner) // - (BOOL)scanInt:(nullable int *)result ; // - (BOOL)scanInteger:(nullable NSInteger *)result __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) ; // - (BOOL)scanLongLong:(nullable long long *)result; // - (BOOL)scanUnsignedLongLong:(nullable unsigned long long *)result __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) ; // - (BOOL)scanFloat:(nullable float *)result ; // - (BOOL)scanDouble:(nullable double *)result ; #if 0 - (BOOL)scanHexInt:(nullable unsigned *)result ; #endif #if 0 - (BOOL)scanHexLongLong:(nullable unsigned long long *)result __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) ; #endif #if 0 - (BOOL)scanHexFloat:(nullable float *)result __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) ; #endif #if 0 - (BOOL)scanHexDouble:(nullable double *)result __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) ; #endif // - (BOOL)scanString:(NSString *)string intoString:(NSString * _Nullable * _Nullable)result ; // - (BOOL)scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable * _Nullable)result ; // - (BOOL)scanUpToString:(NSString *)string intoString:(NSString * _Nullable * _Nullable)result ; // - (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable * _Nullable)result ; // @property (getter=isAtEnd, readonly) BOOL atEnd; // + (instancetype)scannerWithString:(NSString *)string; // + (id)localizedScannerWithString:(NSString *)string; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #pragma clang assume_nonnull begin extern "C" NSExceptionName const NSGenericException; extern "C" NSExceptionName const NSRangeException; extern "C" NSExceptionName const NSInvalidArgumentException; extern "C" NSExceptionName const NSInternalInconsistencyException; extern "C" NSExceptionName const NSMallocException; extern "C" NSExceptionName const NSObjectInaccessibleException; extern "C" NSExceptionName const NSObjectNotAvailableException; extern "C" NSExceptionName const NSDestinationInvalidException; extern "C" NSExceptionName const NSPortTimeoutException; extern "C" NSExceptionName const NSInvalidSendPortException; extern "C" NSExceptionName const NSInvalidReceivePortException; extern "C" NSExceptionName const NSPortSendException; extern "C" NSExceptionName const NSPortReceiveException; extern "C" NSExceptionName const NSOldStyleException; extern "C" NSExceptionName const NSInconsistentArchiveException; __attribute__((__objc_exception__)) #ifndef _REWRITER_typedef_NSException #define _REWRITER_typedef_NSException typedef struct objc_object NSException; typedef struct {} _objc_exc_NSException; #endif struct NSException_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *name; NSString *reason; NSDictionary *userInfo; id reserved; }; // + (NSException *)exceptionWithName:(NSExceptionName)name reason:(nullable NSString *)reason userInfo:(nullable NSDictionary *)userInfo; // - (instancetype)initWithName:(NSExceptionName)aName reason:(nullable NSString *)aReason userInfo:(nullable NSDictionary *)aUserInfo __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSExceptionName name; // @property (nullable, readonly, copy) NSString *reason; // @property (nullable, readonly, copy) NSDictionary *userInfo; // @property (readonly, copy) NSArray<NSNumber *> *callStackReturnAddresses __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *callStackSymbols __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)raise; /* @end */ // @interface NSException (NSExceptionRaisingConveniences) // + (void)raise:(NSExceptionName)name format:(NSString *)format, ... __attribute__((format(__NSString__, 2, 3))); // + (void)raise:(NSExceptionName)name format:(NSString *)format arguments:(va_list)argList __attribute__((format(__NSString__, 2, 0))); /* @end */ typedef void NSUncaughtExceptionHandler(NSException *exception); extern "C" NSUncaughtExceptionHandler * _Nullable NSGetUncaughtExceptionHandler(void); extern "C" void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler * _Nullable); // @class NSAssertionHandler; #ifndef _REWRITER_typedef_NSAssertionHandler #define _REWRITER_typedef_NSAssertionHandler typedef struct objc_object NSAssertionHandler; typedef struct {} _objc_exc_NSAssertionHandler; #endif extern "C" NSString * const NSAssertionHandlerKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSAssertionHandler #define _REWRITER_typedef_NSAssertionHandler typedef struct objc_object NSAssertionHandler; typedef struct {} _objc_exc_NSAssertionHandler; #endif struct NSAssertionHandler_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_reserved; }; @property (class, readonly, strong) NSAssertionHandler *currentHandler; // - (void)handleFailureInMethod:(SEL)selector object:(id)object file:(NSString *)fileName lineNumber:(NSInteger)line description:(nullable NSString *)format,... __attribute__((format(__NSString__, 5, 6))); // - (void)handleFailureInFunction:(NSString *)functionName file:(NSString *)fileName lineNumber:(NSInteger)line description:(nullable NSString *)format,... __attribute__((format(__NSString__, 4, 5))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" NSExceptionName const NSDecimalNumberExactnessException; extern "C" NSExceptionName const NSDecimalNumberOverflowException; extern "C" NSExceptionName const NSDecimalNumberUnderflowException; extern "C" NSExceptionName const NSDecimalNumberDivideByZeroException; // @class NSDecimalNumber; #ifndef _REWRITER_typedef_NSDecimalNumber #define _REWRITER_typedef_NSDecimalNumber typedef struct objc_object NSDecimalNumber; typedef struct {} _objc_exc_NSDecimalNumber; #endif // @protocol NSDecimalNumberBehaviors // - (NSRoundingMode)roundingMode; // - (short)scale; // - (nullable NSDecimalNumber *)exceptionDuringOperation:(SEL)operation error:(NSCalculationError)error leftOperand:(NSDecimalNumber *)leftOperand rightOperand:(nullable NSDecimalNumber *)rightOperand; /* @end */ #ifndef _REWRITER_typedef_NSDecimalNumber #define _REWRITER_typedef_NSDecimalNumber typedef struct objc_object NSDecimalNumber; typedef struct {} _objc_exc_NSDecimalNumber; #endif struct NSDecimalNumber__T_1 { int _exponent : 8; unsigned int _length : 4; unsigned int _isNegative : 1; unsigned int _isCompact : 1; unsigned int _reserved : 1; unsigned int _hasExternalRefCount : 1; unsigned int _refs : 16; } ; struct NSDecimalNumber_IMPL { struct NSNumber_IMPL NSNumber_IVARS; struct NSDecimalNumber__T_1 NSDecimalNumber__GRBF_1; unsigned short _mantissa[0]; }; // - (instancetype)initWithMantissa:(unsigned long long)mantissa exponent:(short)exponent isNegative:(BOOL)flag; // - (instancetype)initWithDecimal:(NSDecimal)dcm __attribute__((objc_designated_initializer)); // - (instancetype)initWithString:(nullable NSString *)numberValue; // - (instancetype)initWithString:(nullable NSString *)numberValue locale:(nullable id)locale; // - (NSString *)descriptionWithLocale:(nullable id)locale; // @property (readonly) NSDecimal decimalValue; // + (NSDecimalNumber *)decimalNumberWithMantissa:(unsigned long long)mantissa exponent:(short)exponent isNegative:(BOOL)flag; // + (NSDecimalNumber *)decimalNumberWithDecimal:(NSDecimal)dcm; // + (NSDecimalNumber *)decimalNumberWithString:(nullable NSString *)numberValue; // + (NSDecimalNumber *)decimalNumberWithString:(nullable NSString *)numberValue locale:(nullable id)locale; @property (class, readonly, copy) NSDecimalNumber *zero; @property (class, readonly, copy) NSDecimalNumber *one; @property (class, readonly, copy) NSDecimalNumber *minimumDecimalNumber; @property (class, readonly, copy) NSDecimalNumber *maximumDecimalNumber; @property (class, readonly, copy) NSDecimalNumber *notANumber; // - (NSDecimalNumber *)decimalNumberByAdding:(NSDecimalNumber *)decimalNumber; // - (NSDecimalNumber *)decimalNumberByAdding:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber; // - (NSDecimalNumber *)decimalNumberBySubtracting:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSDecimalNumber *)decimalNumberByMultiplyingBy:(NSDecimalNumber *)decimalNumber; // - (NSDecimalNumber *)decimalNumberByMultiplyingBy:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSDecimalNumber *)decimalNumberByDividingBy:(NSDecimalNumber *)decimalNumber; // - (NSDecimalNumber *)decimalNumberByDividingBy:(NSDecimalNumber *)decimalNumber withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power; // - (NSDecimalNumber *)decimalNumberByRaisingToPower:(NSUInteger)power withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSDecimalNumber *)decimalNumberByMultiplyingByPowerOf10:(short)power; // - (NSDecimalNumber *)decimalNumberByMultiplyingByPowerOf10:(short)power withBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSDecimalNumber *)decimalNumberByRoundingAccordingToBehavior:(nullable id <NSDecimalNumberBehaviors>)behavior; // - (NSComparisonResult)compare:(NSNumber *)decimalNumber; @property (class, strong) id <NSDecimalNumberBehaviors> defaultBehavior; // @property (readonly) const char *objCType __attribute__((objc_returns_inner_pointer)); // @property (readonly) double doubleValue; /* @end */ #ifndef _REWRITER_typedef_NSDecimalNumberHandler #define _REWRITER_typedef_NSDecimalNumberHandler typedef struct objc_object NSDecimalNumberHandler; typedef struct {} _objc_exc_NSDecimalNumberHandler; #endif struct NSDecimalNumberHandler__T_1 { int _scale : 16; unsigned int _roundingMode : 3; unsigned int _raiseOnExactness : 1; unsigned int _raiseOnOverflow : 1; unsigned int _raiseOnUnderflow : 1; unsigned int _raiseOnDivideByZero : 1; unsigned int _unused : 9; } ; struct NSDecimalNumberHandler_IMPL { struct NSObject_IMPL NSObject_IVARS; struct NSDecimalNumberHandler__T_1 NSDecimalNumberHandler__GRBF_1; void *_reserved2; void *_reserved; }; @property (class, readonly, strong) NSDecimalNumberHandler *defaultDecimalNumberHandler; // - (instancetype)initWithRoundingMode:(NSRoundingMode)roundingMode scale:(short)scale raiseOnExactness:(BOOL)exact raiseOnOverflow:(BOOL)overflow raiseOnUnderflow:(BOOL)underflow raiseOnDivideByZero:(BOOL)divideByZero __attribute__((objc_designated_initializer)); // + (instancetype)decimalNumberHandlerWithRoundingMode:(NSRoundingMode)roundingMode scale:(short)scale raiseOnExactness:(BOOL)exact raiseOnOverflow:(BOOL)overflow raiseOnUnderflow:(BOOL)underflow raiseOnDivideByZero:(BOOL)divideByZero; /* @end */ // @interface NSNumber (NSDecimalNumberExtensions) // @property (readonly) NSDecimal decimalValue; /* @end */ // @interface NSScanner (NSDecimalNumberScanning) #if 0 - (BOOL)scanDecimal:(nullable NSDecimal *)dcm ; #endif /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif typedef NSString *NSErrorDomain; #pragma clang assume_nonnull begin extern "C" NSErrorDomain const NSCocoaErrorDomain; extern "C" NSErrorDomain const NSPOSIXErrorDomain; extern "C" NSErrorDomain const NSOSStatusErrorDomain; extern "C" NSErrorDomain const NSMachErrorDomain; typedef NSString *NSErrorUserInfoKey; extern "C" NSErrorUserInfoKey const NSUnderlyingErrorKey; extern "C" NSErrorUserInfoKey const NSMultipleUnderlyingErrorsKey __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); extern "C" NSErrorUserInfoKey const NSLocalizedDescriptionKey; extern "C" NSErrorUserInfoKey const NSLocalizedFailureReasonErrorKey; extern "C" NSErrorUserInfoKey const NSLocalizedRecoverySuggestionErrorKey; extern "C" NSErrorUserInfoKey const NSLocalizedRecoveryOptionsErrorKey; extern "C" NSErrorUserInfoKey const NSRecoveryAttempterErrorKey; extern "C" NSErrorUserInfoKey const NSHelpAnchorErrorKey; extern "C" NSErrorUserInfoKey const NSDebugDescriptionErrorKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSErrorUserInfoKey const NSLocalizedFailureErrorKey __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern "C" NSErrorUserInfoKey const NSStringEncodingErrorKey ; extern "C" NSErrorUserInfoKey const NSURLErrorKey; extern "C" NSErrorUserInfoKey const NSFilePathErrorKey; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif struct NSError_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_reserved; NSInteger _code; NSString *_domain; NSDictionary *_userInfo; }; // - (instancetype)initWithDomain:(NSErrorDomain)domain code:(NSInteger)code userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)dict __attribute__((objc_designated_initializer)); // + (instancetype)errorWithDomain:(NSErrorDomain)domain code:(NSInteger)code userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)dict; // @property (readonly, copy) NSErrorDomain domain; // @property (readonly) NSInteger code; // @property (readonly, copy) NSDictionary<NSErrorUserInfoKey, id> *userInfo; // @property (readonly, copy) NSString *localizedDescription; // @property (nullable, readonly, copy) NSString *localizedFailureReason; // @property (nullable, readonly, copy) NSString *localizedRecoverySuggestion; // @property (nullable, readonly, copy) NSArray<NSString *> *localizedRecoveryOptions; // @property (nullable, readonly, strong) id recoveryAttempter; // @property (nullable, readonly, copy) NSString *helpAnchor; // @property (readonly, copy) NSArray<NSError *> *underlyingErrors __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); // + (void)setUserInfoValueProviderForDomain:(NSErrorDomain)errorDomain provider:(id _Nullable (^ _Nullable)(NSError *err, NSErrorUserInfoKey userInfoKey))provider __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (id _Nullable (^ _Nullable)(NSError *err, NSErrorUserInfoKey userInfoKey))userInfoValueProviderForDomain:(NSErrorDomain)errorDomain __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSObject(NSErrorRecoveryAttempting) // - (void)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex delegate:(nullable id)delegate didRecoverSelector:(nullable SEL)didRecoverSelector contextInfo:(nullable void *)contextInfo; // - (BOOL)attemptRecoveryFromError:(NSError *)error optionIndex:(NSUInteger)recoveryOptionIndex; /* @end */ #pragma clang assume_nonnull end // @class NSTimer; #ifndef _REWRITER_typedef_NSTimer #define _REWRITER_typedef_NSTimer typedef struct objc_object NSTimer; typedef struct {} _objc_exc_NSTimer; #endif #ifndef _REWRITER_typedef_NSPort #define _REWRITER_typedef_NSPort typedef struct objc_object NSPort; typedef struct {} _objc_exc_NSPort; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin extern "C" NSRunLoopMode const NSDefaultRunLoopMode; extern "C" NSRunLoopMode const NSRunLoopCommonModes __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSRunLoop #define _REWRITER_typedef_NSRunLoop typedef struct objc_object NSRunLoop; typedef struct {} _objc_exc_NSRunLoop; #endif struct NSRunLoop_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (class, readonly, strong) NSRunLoop *currentRunLoop; @property (class, readonly, strong) NSRunLoop *mainRunLoop __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSRunLoopMode currentMode; // - (CFRunLoopRef)getCFRunLoop __attribute__((cf_returns_not_retained)); // - (void)addTimer:(NSTimer *)timer forMode:(NSRunLoopMode)mode; // - (void)addPort:(NSPort *)aPort forMode:(NSRunLoopMode)mode; // - (void)removePort:(NSPort *)aPort forMode:(NSRunLoopMode)mode; // - (nullable NSDate *)limitDateForMode:(NSRunLoopMode)mode; // - (void)acceptInputForMode:(NSRunLoopMode)mode beforeDate:(NSDate *)limitDate; /* @end */ // @interface NSRunLoop (NSRunLoopConveniences) // - (void)run; // - (void)runUntilDate:(NSDate *)limitDate; // - (BOOL)runMode:(NSRunLoopMode)mode beforeDate:(NSDate *)limitDate; // - (void)configureAsServer __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (void)performInModes:(NSArray<NSRunLoopMode> *)modes block:(void (^)(void))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (void)performBlock:(void (^)(void))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); /* @end */ // @interface NSObject (NSDelayedPerforming) // - (void)performSelector:(SEL)aSelector withObject:(nullable id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray<NSRunLoopMode> *)modes; // - (void)performSelector:(SEL)aSelector withObject:(nullable id)anArgument afterDelay:(NSTimeInterval)delay; // + (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget selector:(SEL)aSelector object:(nullable id)anArgument; // + (void)cancelPreviousPerformRequestsWithTarget:(id)aTarget; /* @end */ // @interface NSRunLoop (NSOrderedPerform) // - (void)performSelector:(SEL)aSelector target:(id)target argument:(nullable id)arg order:(NSUInteger)order modes:(NSArray<NSRunLoopMode> *)modes; // - (void)cancelPerformSelector:(SEL)aSelector target:(id)target argument:(nullable id)arg; // - (void)cancelPerformSelectorsWithTarget:(id)target; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSFileHandle #define _REWRITER_typedef_NSFileHandle typedef struct objc_object NSFileHandle; typedef struct {} _objc_exc_NSFileHandle; #endif struct NSFileHandle_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSData *availableData; // - (instancetype)initWithFileDescriptor:(int)fd closeOnDealloc:(BOOL)closeopt __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); #if 0 - (nullable NSData *)readDataToEndOfFileAndReturnError:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((swift_private)); #endif #if 0 - (nullable NSData *)readDataUpToLength:(NSUInteger)length error:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((swift_private)); #endif #if 0 - (BOOL)writeData:(NSData *)data error:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((swift_private)); #endif #if 0 - (BOOL)getOffset:(out unsigned long long *)offsetInFile error:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((swift_private)); #endif #if 0 - (BOOL)seekToEndReturningOffset:(out unsigned long long *_Nullable)offsetInFile error:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((swift_private)); #endif #if 0 - (BOOL)seekToOffset:(unsigned long long)offset error:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); #endif #if 0 - (BOOL)truncateAtOffset:(unsigned long long)offset error:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); #endif #if 0 - (BOOL)synchronizeAndReturnError:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); #endif #if 0 - (BOOL)closeAndReturnError:(out NSError **)error __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); #endif /* @end */ // @interface NSFileHandle (NSFileHandleCreation) @property (class, readonly, strong) NSFileHandle *fileHandleWithStandardInput; @property (class, readonly, strong) NSFileHandle *fileHandleWithStandardOutput; @property (class, readonly, strong) NSFileHandle *fileHandleWithStandardError; @property (class, readonly, strong) NSFileHandle *fileHandleWithNullDevice; // + (nullable instancetype)fileHandleForReadingAtPath:(NSString *)path; // + (nullable instancetype)fileHandleForWritingAtPath:(NSString *)path; // + (nullable instancetype)fileHandleForUpdatingAtPath:(NSString *)path; // + (nullable instancetype)fileHandleForReadingFromURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable instancetype)fileHandleForWritingToURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable instancetype)fileHandleForUpdatingURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSExceptionName const NSFileHandleOperationException; extern "C" NSNotificationName const NSFileHandleReadCompletionNotification; extern "C" NSNotificationName const NSFileHandleReadToEndOfFileCompletionNotification; extern "C" NSNotificationName const NSFileHandleConnectionAcceptedNotification; extern "C" NSNotificationName const NSFileHandleDataAvailableNotification; extern "C" NSString * const NSFileHandleNotificationDataItem; extern "C" NSString * const NSFileHandleNotificationFileHandleItem; extern "C" NSString * const NSFileHandleNotificationMonitorModes __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=5.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // @interface NSFileHandle (NSFileHandleAsynchronousAccess) // - (void)readInBackgroundAndNotifyForModes:(nullable NSArray<NSRunLoopMode> *)modes; // - (void)readInBackgroundAndNotify; // - (void)readToEndOfFileInBackgroundAndNotifyForModes:(nullable NSArray<NSRunLoopMode> *)modes; // - (void)readToEndOfFileInBackgroundAndNotify; // - (void)acceptConnectionInBackgroundAndNotifyForModes:(nullable NSArray<NSRunLoopMode> *)modes; // - (void)acceptConnectionInBackgroundAndNotify; // - (void)waitForDataInBackgroundAndNotifyForModes:(nullable NSArray<NSRunLoopMode> *)modes; // - (void)waitForDataInBackgroundAndNotify; // @property (nullable, copy) void (^readabilityHandler)(NSFileHandle *) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) void (^writeabilityHandler)(NSFileHandle *) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSFileHandle (NSFileHandlePlatformSpecific) // - (instancetype)initWithFileDescriptor:(int)fd; // @property (readonly) int fileDescriptor; /* @end */ // @interface NSFileHandle ( ) #if 0 - (NSData *)readDataToEndOfFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="readDataToEndOfFileAndReturnError:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="readDataToEndOfFileAndReturnError:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="readDataToEndOfFileAndReturnError:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="readDataToEndOfFileAndReturnError:"))); #endif #if 0 - (NSData *)readDataOfLength:(NSUInteger)length __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="readDataUpToLength:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="readDataUpToLength:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="readDataUpToLength:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="readDataUpToLength:error:"))); #endif #if 0 - (void)writeData:(NSData *)data __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="writeData:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeData:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="writeData:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="writeData:error:"))); #endif // @property (readonly) unsigned long long offsetInFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="getOffset:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getOffset:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="getOffset:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="getOffset:error:"))); #if 0 - (unsigned long long)seekToEndOfFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="seekToEndReturningOffset:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="seekToEndReturningOffset:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="seekToEndReturningOffset:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="seekToEndReturningOffset:error:"))); #endif #if 0 - (void)seekToFileOffset:(unsigned long long)offset __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="seekToOffset:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="seekToOffset:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="seekToOffset:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="seekToOffset:error:"))); #endif #if 0 - (void)truncateFileAtOffset:(unsigned long long)offset __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="truncateAtOffset:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="truncateAtOffset:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="truncateAtOffset:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="truncateAtOffset:error:"))); #endif #if 0 - (void)synchronizeFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="synchronizeAndReturnError:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="synchronizeAndReturnError:"))); #endif #if 0 - (void)closeFile __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="closeAndReturnError:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="closeAndReturnError:"))); #endif /* @end */ #ifndef _REWRITER_typedef_NSPipe #define _REWRITER_typedef_NSPipe typedef struct objc_object NSPipe; typedef struct {} _objc_exc_NSPipe; #endif struct NSPipe_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, retain) NSFileHandle *fileHandleForReading; // @property (readonly, retain) NSFileHandle *fileHandleForWriting; // + (NSPipe *)pipe; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @interface NSString (NSStringPathExtensions) // + (NSString *)pathWithComponents:(NSArray<NSString *> *)components; // @property (readonly, copy) NSArray<NSString *> *pathComponents; // @property (getter=isAbsolutePath, readonly) BOOL absolutePath; // @property (readonly, copy) NSString *lastPathComponent; // @property (readonly, copy) NSString *stringByDeletingLastPathComponent; // - (NSString *)stringByAppendingPathComponent:(NSString *)str; // @property (readonly, copy) NSString *pathExtension; // @property (readonly, copy) NSString *stringByDeletingPathExtension; // - (nullable NSString *)stringByAppendingPathExtension:(NSString *)str; // @property (readonly, copy) NSString *stringByAbbreviatingWithTildeInPath; // @property (readonly, copy) NSString *stringByExpandingTildeInPath; // @property (readonly, copy) NSString *stringByStandardizingPath; // @property (readonly, copy) NSString *stringByResolvingSymlinksInPath; // - (NSArray<NSString *> *)stringsByAppendingPaths:(NSArray<NSString *> *)paths; // - (NSUInteger)completePathIntoString:(NSString * _Nullable * _Nullable)outputName caseSensitive:(BOOL)flag matchesIntoArray:(NSArray<NSString *> * _Nullable * _Nullable)outputArray filterTypes:(nullable NSArray<NSString *> *)filterTypes; // @property (readonly) const char *fileSystemRepresentation __attribute__((objc_returns_inner_pointer)); // - (BOOL)getFileSystemRepresentation:(char *)cname maxLength:(NSUInteger)max; /* @end */ // @interface NSArray<ObjectType> (NSArrayPathExtensions) // - (NSArray<NSString *> *)pathsMatchingExtensions:(NSArray<NSString *> *)filterTypes; /* @end */ extern "C" NSString *NSUserName(void); extern "C" NSString *NSFullUserName(void); extern "C" NSString *NSHomeDirectory(void); extern "C" NSString * _Nullable NSHomeDirectoryForUser(NSString * _Nullable userName); extern "C" NSString *NSTemporaryDirectory(void); extern "C" NSString *NSOpenStepRootDirectory(void); typedef NSUInteger NSSearchPathDirectory; enum { NSApplicationDirectory = 1, NSDemoApplicationDirectory, NSDeveloperApplicationDirectory, NSAdminApplicationDirectory, NSLibraryDirectory, NSDeveloperDirectory, NSUserDirectory, NSDocumentationDirectory, NSDocumentDirectory, NSCoreServiceDirectory, NSAutosavedInformationDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 11, NSDesktopDirectory = 12, NSCachesDirectory = 13, NSApplicationSupportDirectory = 14, NSDownloadsDirectory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 15, NSInputMethodsDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 16, NSMoviesDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 17, NSMusicDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 18, NSPicturesDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 19, NSPrinterDescriptionDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 20, NSSharedPublicDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 21, NSPreferencePanesDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 22, NSApplicationScriptsDirectory __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 23, NSItemReplacementDirectory __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 99, NSAllApplicationsDirectory = 100, NSAllLibrariesDirectory = 101, NSTrashDirectory __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 102 }; typedef NSUInteger NSSearchPathDomainMask; enum { NSUserDomainMask = 1, NSLocalDomainMask = 2, NSNetworkDomainMask = 4, NSSystemDomainMask = 8, NSAllDomainsMask = 0x0ffff }; extern "C" NSArray<NSString *> *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde); #pragma clang assume_nonnull end // @class NSURLHandle; #ifndef _REWRITER_typedef_NSURLHandle #define _REWRITER_typedef_NSURLHandle typedef struct objc_object NSURLHandle; typedef struct {} _objc_exc_NSURLHandle; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #ifndef _REWRITER_typedef_NSMutableData #define _REWRITER_typedef_NSMutableData typedef struct objc_object NSMutableData; typedef struct {} _objc_exc_NSMutableData; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif extern "C" NSString *NSHTTPPropertyStatusCodeKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSHTTPPropertyStatusReasonKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSHTTPPropertyServerHTTPVersionKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSHTTPPropertyRedirectionHeadersKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSHTTPPropertyErrorPageDataKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSHTTPPropertyHTTPProxy __attribute__((availability(macos,introduced=10.2,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSFTPPropertyUserLoginKey __attribute__((availability(macos,introduced=10.2,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSFTPPropertyUserPasswordKey __attribute__((availability(macos,introduced=10.2,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSFTPPropertyActiveTransferModeKey __attribute__((availability(macos,introduced=10.2,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSFTPPropertyFileOffsetKey __attribute__((availability(macos,introduced=10.2,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *NSFTPPropertyFTPProxy __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef NSUInteger NSURLHandleStatus; enum { NSURLHandleNotLoaded = 0, NSURLHandleLoadSucceeded, NSURLHandleLoadInProgress, NSURLHandleLoadFailed }; __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) // @protocol NSURLHandleClient // - (void)URLHandle:(NSURLHandle *)sender resourceDataDidBecomeAvailable:(NSData *)newBytes __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)URLHandleResourceDidBeginLoading:(NSURLHandle *)sender __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)URLHandleResourceDidFinishLoading:(NSURLHandle *)sender __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)URLHandleResourceDidCancelLoading:(NSURLHandle *)sender __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)URLHandle:(NSURLHandle *)sender resourceDidFailLoadingWithReason:(NSString *)reason __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #ifndef _REWRITER_typedef_NSURLHandle #define _REWRITER_typedef_NSURLHandle typedef struct objc_object NSURLHandle; typedef struct {} _objc_exc_NSURLHandle; #endif struct NSURLHandle_IMPL { struct NSObject_IMPL NSObject_IVARS; NSMutableArray *_clients; id _data; NSURLHandleStatus _status; NSInteger _reserved; }; // + (void)registerURLHandleClass:(Class)anURLHandleSubclass __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (Class)URLHandleClassForURL:(NSURL *)anURL __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSURLHandleStatus)status __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSString *)failureReason __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)addClient:(id <NSURLHandleClient>)client __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)removeClient:(id <NSURLHandleClient>)client __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)loadInBackground __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)cancelLoadInBackground __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSData *)resourceData __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSData *)availableResourceData __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (long long) expectedResourceDataSize __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)flushCachedData __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)backgroundLoadDidFailWithReason:(NSString *)reason __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)didLoadBytes:(NSData *)newBytes loadComplete:(BOOL)yorn __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (BOOL)canInitWithURL:(NSURL *)anURL __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSURLHandle *)cachedHandleForURL:(NSURL *)anURL __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - initWithURL:(NSURL *)anURL cached:(BOOL)willCache __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (id)propertyForKey:(NSString *)propertyKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (id)propertyForKeyIfAvailable:(NSString *)propertyKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)writeProperty:(id)propertyValue forKey:(NSString *)propertyKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)writeData:(NSData *)data __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSData *)loadInForeground __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)beginLoadInBackground __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)endLoadInBackground __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif typedef NSString * NSURLResourceKey __attribute__((swift_wrapper(struct))); #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif struct NSURL_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *_urlString; NSURL *_baseURL; void *_clients; void *_reserved; }; // - (nullable instancetype)initWithScheme:(NSString *)scheme host:(nullable NSString *)host path:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings."))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLComponents instead, which lets you create a valid URL with any valid combination of URL components and subcomponents (not just scheme, host and path), and lets you set components and subcomponents with either percent-encoded or un-percent-encoded strings."))); // - (instancetype)initFileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (instancetype)initFileURLWithPath:(NSString *)path relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (instancetype)initFileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (instancetype)initFileURLWithPath:(NSString *)path __attribute__((objc_designated_initializer)); // + (NSURL *)fileURLWithPath:(NSString *)path isDirectory:(BOOL) isDir relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSURL *)fileURLWithPath:(NSString *)path relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSURL *)fileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSURL *)fileURLWithPath:(NSString *)path; // - (instancetype)initFileURLWithFileSystemRepresentation:(const char *)path isDirectory:(BOOL)isDir relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // + (NSURL *)fileURLWithFileSystemRepresentation:(const char *)path isDirectory:(BOOL) isDir relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable instancetype)initWithString:(NSString *)URLString; // - (nullable instancetype)initWithString:(NSString *)URLString relativeToURL:(nullable NSURL *)baseURL __attribute__((objc_designated_initializer)); // + (nullable instancetype)URLWithString:(NSString *)URLString; // + (nullable instancetype)URLWithString:(NSString *)URLString relativeToURL:(nullable NSURL *)baseURL; // - (instancetype)initWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // + (NSURL *)URLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initAbsoluteURLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // + (NSURL *)absoluteURLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSData *dataRepresentation __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSString *absoluteString; // @property (readonly, copy) NSString *relativeString; // @property (nullable, readonly, copy) NSURL *baseURL; // @property (nullable, readonly, copy) NSURL *absoluteURL; // @property (nullable, readonly, copy) NSString *scheme; // @property (nullable, readonly, copy) NSString *resourceSpecifier; // @property (nullable, readonly, copy) NSString *host; // @property (nullable, readonly, copy) NSNumber *port; // @property (nullable, readonly, copy) NSString *user; // @property (nullable, readonly, copy) NSString *password; // @property (nullable, readonly, copy) NSString *path; // @property (nullable, readonly, copy) NSString *fragment; // @property (nullable, readonly, copy) NSString *parameterString __attribute__((availability(macosx,introduced=10.2,deprecated=10.15,message="The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them."))) __attribute__((availability(ios,introduced=2.0,deprecated=13.0,message="The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them."))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them."))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them."))); // @property (nullable, readonly, copy) NSString *query; // @property (nullable, readonly, copy) NSString *relativePath; // @property (readonly) BOOL hasDirectoryPath __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)getFileSystemRepresentation:(char *)buffer maxLength:(NSUInteger)maxBufferLength __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) const char *fileSystemRepresentation __attribute__((objc_returns_inner_pointer)) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, getter=isFileURL) BOOL fileURL; extern "C" NSString *NSURLFileScheme; // @property (nullable, readonly, copy) NSURL *standardizedURL; // - (BOOL)checkResourceIsReachableAndReturnError:(NSError **)error __attribute__((swift_error(none))) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isFileReferenceURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)fileReferenceURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *filePathURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)getResourceValue:(out id _Nullable * _Nonnull)value forKey:(NSURLResourceKey)key error:(out NSError ** _Nullable)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDictionary<NSURLResourceKey, id> *)resourceValuesForKeys:(NSArray<NSURLResourceKey> *)keys error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)setResourceValue:(nullable id)value forKey:(NSURLResourceKey)key error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)setResourceValues:(NSDictionary<NSURLResourceKey, id> *)keyedValues error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLKeysOfUnsetValuesKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeCachedResourceValueForKey:(NSURLResourceKey)key __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeAllCachedResourceValues __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)setTemporaryResourceValue:(nullable id)value forKey:(NSURLResourceKey)key __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLNameKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLLocalizedNameKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsRegularFileKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsDirectoryKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsSymbolicLinkKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsVolumeKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsPackageKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsApplicationKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLApplicationIsScriptableKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLIsSystemImmutableKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsUserImmutableKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsHiddenKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLHasHiddenExtensionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLCreationDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLContentAccessDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLContentModificationDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLAttributeModificationDateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLLinkCountKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLParentDirectoryURLKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeURLKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLTypeIdentifierKey __attribute__((availability(macos,introduced=10.6,deprecated=100000,message="Use NSURLContentTypeKey instead"))) __attribute__((availability(ios,introduced=4.0,deprecated=100000,message="Use NSURLContentTypeKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use NSURLContentTypeKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use NSURLContentTypeKey instead"))); extern "C" NSURLResourceKey const NSURLContentTypeKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern "C" NSURLResourceKey const NSURLLocalizedTypeDescriptionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLLabelNumberKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLLabelColorKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLLocalizedLabelKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLEffectiveIconKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLCustomIconKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLFileResourceIdentifierKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIdentifierKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLPreferredIOBlockSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsReadableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsWritableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsExecutableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLFileSecurityKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsExcludedFromBackupKey __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=5.1))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLTagNamesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLPathKey __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLCanonicalPathKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLIsMountTriggerKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLGenerationIdentifierKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLDocumentIdentifierKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLAddedToDirectoryDateKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLQuarantinePropertiesKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLFileResourceTypeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLFileContentIdentifierKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern "C" NSURLResourceKey const NSURLMayShareFileContentKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern "C" NSURLResourceKey const NSURLMayHaveExtendedAttributesKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern "C" NSURLResourceKey const NSURLIsPurgeableKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern "C" NSURLResourceKey const NSURLIsSparseKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); typedef NSString * NSURLFileResourceType __attribute__((swift_wrapper(enum))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeNamedPipe __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeCharacterSpecial __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeDirectory __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeBlockSpecial __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeRegular __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeSymbolicLink __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeSocket __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileResourceType const NSURLFileResourceTypeUnknown __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLThumbnailDictionaryKey __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=8.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the QuickLookThumbnailing framework and extension point instead"))); extern "C" NSURLResourceKey const NSURLThumbnailKey __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef NSString *NSURLThumbnailDictionaryItem __attribute__((swift_wrapper(struct))); extern "C" NSURLThumbnailDictionaryItem const NSThumbnail1024x1024SizeKey __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=8.0,message="Use the QuickLookThumbnailing framework and extension point instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the QuickLookThumbnailing framework and extension point instead"))); extern "C" NSURLResourceKey const NSURLFileSizeKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLFileAllocatedSizeKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLTotalFileSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLTotalFileAllocatedSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLIsAliasFileKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLFileProtectionKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString * NSURLFileProtectionType __attribute__((swift_wrapper(enum))); extern "C" NSURLFileProtectionType const NSURLFileProtectionNone __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileProtectionType const NSURLFileProtectionComplete __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileProtectionType const NSURLFileProtectionCompleteUnlessOpen __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLFileProtectionType const NSURLFileProtectionCompleteUntilFirstUserAuthentication __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeLocalizedFormatDescriptionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeTotalCapacityKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeAvailableCapacityKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeResourceCountKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsPersistentIDsKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsSymbolicLinksKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsHardLinksKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsJournalingKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsJournalingKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsSparseFilesKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsZeroRunsKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsCaseSensitiveNamesKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsCasePreservedNamesKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsRootDirectoryDatesKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsVolumeSizesKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsRenamingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsAdvisoryFileLockingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsExtendedSecurityKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsBrowsableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeMaximumFileSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsEjectableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsRemovableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsInternalKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsAutomountedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsLocalKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsReadOnlyKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeCreationDateKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeURLForRemountingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeUUIDStringKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeNameKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeLocalizedNameKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLVolumeIsEncryptedKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLVolumeIsRootFileSystemKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsCompressionKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsFileCloningKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsSwapRenamingKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsExclusiveRenamingKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsImmutableFilesKey __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsAccessPermissionsKey __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern "C" NSURLResourceKey const NSURLVolumeSupportsFileProtectionKey __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); extern "C" NSURLResourceKey const NSURLVolumeAvailableCapacityForImportantUsageKey __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLVolumeAvailableCapacityForOpportunisticUsageKey __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLIsUbiquitousItemKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemHasUnresolvedConflictsKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemIsDownloadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.9,message="Use NSURLUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=7.0,message="Use NSURLUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLUbiquitousItemDownloadingStatusKey instead"))); extern "C" NSURLResourceKey const NSURLUbiquitousItemIsDownloadingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemIsUploadedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemIsUploadingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemPercentDownloadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.8,message="Use NSMetadataUbiquitousItemPercentDownloadedKey instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=6.0,message="Use NSMetadataUbiquitousItemPercentDownloadedKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSMetadataUbiquitousItemPercentDownloadedKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSMetadataUbiquitousItemPercentDownloadedKey instead"))); extern "C" NSURLResourceKey const NSURLUbiquitousItemPercentUploadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.8,message="Use NSMetadataUbiquitousItemPercentUploadedKey instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=6.0,message="Use NSMetadataUbiquitousItemPercentUploadedKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSMetadataUbiquitousItemPercentUploadedKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSMetadataUbiquitousItemPercentUploadedKey instead"))); extern "C" NSURLResourceKey const NSURLUbiquitousItemDownloadingStatusKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemDownloadingErrorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemUploadingErrorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemDownloadRequestedKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemContainerDisplayNameKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLResourceKey const NSURLUbiquitousItemIsExcludedFromSyncKey __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); extern "C" NSURLResourceKey const NSURLUbiquitousItemIsSharedKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLUbiquitousSharedItemCurrentUserRoleKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLUbiquitousSharedItemCurrentUserPermissionsKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLUbiquitousSharedItemOwnerNameComponentsKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLResourceKey const NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef NSString * NSURLUbiquitousItemDownloadingStatus __attribute__((swift_wrapper(enum))); extern "C" NSURLUbiquitousItemDownloadingStatus const NSURLUbiquitousItemDownloadingStatusNotDownloaded __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLUbiquitousItemDownloadingStatus const NSURLUbiquitousItemDownloadingStatusDownloaded __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSURLUbiquitousItemDownloadingStatus const NSURLUbiquitousItemDownloadingStatusCurrent __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString * NSURLUbiquitousSharedItemRole __attribute__((swift_wrapper(enum))); extern "C" NSURLUbiquitousSharedItemRole const NSURLUbiquitousSharedItemRoleOwner __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLUbiquitousSharedItemRole const NSURLUbiquitousSharedItemRoleParticipant __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef NSString * NSURLUbiquitousSharedItemPermissions __attribute__((swift_wrapper(enum))); extern "C" NSURLUbiquitousSharedItemPermissions const NSURLUbiquitousSharedItemPermissionsReadOnly __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSURLUbiquitousSharedItemPermissions const NSURLUbiquitousSharedItemPermissionsReadWrite __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef NSUInteger NSURLBookmarkCreationOptions; enum { NSURLBookmarkCreationPreferFileIDResolution __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="Not supported"))) __attribute__((availability(ios,introduced=4.0,deprecated=7.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))) = ( 1UL << 8 ), NSURLBookmarkCreationMinimalBookmark = ( 1UL << 9 ), NSURLBookmarkCreationSuitableForBookmarkFile = ( 1UL << 10 ), NSURLBookmarkCreationWithSecurityScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(macCatalyst,introduced=13.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = ( 1 << 11 ), NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(macCatalyst,introduced=13.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = ( 1 << 12 ), NSURLBookmarkCreationWithoutImplicitSecurityScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1 << 29) } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSURLBookmarkResolutionOptions; enum { NSURLBookmarkResolutionWithoutUI = ( 1UL << 8 ), NSURLBookmarkResolutionWithoutMounting = ( 1UL << 9 ), NSURLBookmarkResolutionWithSecurityScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(macCatalyst,introduced=13.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = ( 1 << 10 ), NSURLBookmarkResolutionWithoutImplicitStartAccessing __attribute__((availability(macos,introduced=11.2))) __attribute__((availability(ios,introduced=14.2))) __attribute__((availability(watchos,introduced=7.2))) __attribute__((availability(tvos,introduced=14.2))) = ( 1 << 15 ), } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSURLBookmarkFileCreationOptions; // - (nullable NSData *)bookmarkDataWithOptions:(NSURLBookmarkCreationOptions)options includingResourceValuesForKeys:(nullable NSArray<NSURLResourceKey> *)keys relativeToURL:(nullable NSURL *)relativeURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable instancetype)initByResolvingBookmarkData:(NSData *)bookmarkData options:(NSURLBookmarkResolutionOptions)options relativeToURL:(nullable NSURL *)relativeURL bookmarkDataIsStale:(BOOL * _Nullable)isStale error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable instancetype)URLByResolvingBookmarkData:(NSData *)bookmarkData options:(NSURLBookmarkResolutionOptions)options relativeToURL:(nullable NSURL *)relativeURL bookmarkDataIsStale:(BOOL * _Nullable)isStale error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSDictionary<NSURLResourceKey, id> *)resourceValuesForKeys:(NSArray<NSURLResourceKey> *)keys fromBookmarkData:(NSData *)bookmarkData __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (BOOL)writeBookmarkData:(NSData *)bookmarkData toURL:(NSURL *)bookmarkFileURL options:(NSURLBookmarkFileCreationOptions)options error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSData *)bookmarkDataWithContentsOfURL:(NSURL *)bookmarkFileURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable instancetype)URLByResolvingAliasFileAtURL:(NSURL *)url options:(NSURLBookmarkResolutionOptions)options error:(NSError **)error __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)startAccessingSecurityScopedResource __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)stopAccessingSecurityScopedResource __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSURL (NSPromisedItems) // - (BOOL)getPromisedItemResourceValue:(id _Nullable * _Nonnull)value forKey:(NSURLResourceKey)key error:(NSError **)error __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDictionary<NSURLResourceKey, id> *)promisedItemResourceValuesForKeys:(NSArray<NSURLResourceKey> *)keys error:(NSError **)error __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)checkPromisedItemIsReachableAndReturnError:(NSError **)error __attribute__((swift_error(none))) __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSURL (NSItemProvider) <NSItemProviderReading, NSItemProviderWriting> /* @end */ __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLQueryItem #define _REWRITER_typedef_NSURLQueryItem typedef struct objc_object NSURLQueryItem; typedef struct {} _objc_exc_NSURLQueryItem; #endif struct NSURLQueryItem_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *_name; NSString *_value; }; // - (instancetype)initWithName:(NSString *)name value:(nullable NSString *)value __attribute__((objc_designated_initializer)); // + (instancetype)queryItemWithName:(NSString *)name value:(nullable NSString *)value; // @property (readonly) NSString *name; // @property (nullable, readonly) NSString *value; /* @end */ __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLComponents #define _REWRITER_typedef_NSURLComponents typedef struct objc_object NSURLComponents; typedef struct {} _objc_exc_NSURLComponents; #endif struct NSURLComponents_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)init; // - (nullable instancetype)initWithURL:(NSURL *)url resolvingAgainstBaseURL:(BOOL)resolve; // + (nullable instancetype)componentsWithURL:(NSURL *)url resolvingAgainstBaseURL:(BOOL)resolve; // - (nullable instancetype)initWithString:(NSString *)URLString; // + (nullable instancetype)componentsWithString:(NSString *)URLString; // @property (nullable, readonly, copy) NSURL *URL; // - (nullable NSURL *)URLRelativeToURL:(nullable NSURL *)baseURL; // @property (nullable, readonly, copy) NSString *string __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSString *scheme; // @property (nullable, copy) NSString *user; // @property (nullable, copy) NSString *password; // @property (nullable, copy) NSString *host; // @property (nullable, copy) NSNumber *port; // @property (nullable, copy) NSString *path; // @property (nullable, copy) NSString *query; // @property (nullable, copy) NSString *fragment; // @property (nullable, copy) NSString *percentEncodedUser; // @property (nullable, copy) NSString *percentEncodedPassword; // @property (nullable, copy) NSString *percentEncodedHost; // @property (nullable, copy) NSString *percentEncodedPath; // @property (nullable, copy) NSString *percentEncodedQuery; // @property (nullable, copy) NSString *percentEncodedFragment; // @property (readonly) NSRange rangeOfScheme __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfUser __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfPassword __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfHost __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfPort __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfPath __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfQuery __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSRange rangeOfFragment __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSArray<NSURLQueryItem *> *queryItems __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSArray<NSURLQueryItem *> *percentEncodedQueryItems __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); /* @end */ // @interface NSCharacterSet (NSURLUtilities) @property (class, readonly, copy) NSCharacterSet *URLUserAllowedCharacterSet __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSCharacterSet *URLPasswordAllowedCharacterSet __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSCharacterSet *URLHostAllowedCharacterSet __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSCharacterSet *URLPathAllowedCharacterSet __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSCharacterSet *URLQueryAllowedCharacterSet __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSCharacterSet *URLFragmentAllowedCharacterSet __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSString (NSURLUtilities) // - (nullable NSString *)stringByAddingPercentEncodingWithAllowedCharacters:(NSCharacterSet *)allowedCharacters __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSString *stringByRemovingPercentEncoding __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSString *)stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)enc __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid."))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -stringByAddingPercentEncodingWithAllowedCharacters: instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent since each URL component or subcomponent has different rules for what characters are valid."))); // - (nullable NSString *)stringByReplacingPercentEscapesUsingEncoding:(NSStringEncoding)enc __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding."))); /* @end */ // @interface NSURL (NSURLPathUtilities) // + (nullable NSURL *)fileURLWithPathComponents:(NSArray<NSString *> *)components __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSArray<NSString *> *pathComponents __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSString *lastPathComponent __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSString *pathExtension __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent isDirectory:(BOOL)isDirectory __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *URLByDeletingLastPathComponent __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLByAppendingPathExtension:(NSString *)pathExtension __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *URLByDeletingPathExtension __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *URLByStandardizingPath __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *URLByResolvingSymlinksInPath __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSFileSecurity #define _REWRITER_typedef_NSFileSecurity typedef struct objc_object NSFileSecurity; typedef struct {} _objc_exc_NSFileSecurity; #endif struct NSFileSecurity_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (nullable instancetype) initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSObject (NSURLClient) // - (void)URL:(NSURL *)sender resourceDataDidBecomeAvailable:(NSData *)newBytes __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (void)URLResourceDidFinishLoading:(NSURL *)sender __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (void)URLResourceDidCancelLoading:(NSURL *)sender __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (void)URL:(NSURL *)sender resourceDidFailLoadingWithReason:(NSString *)reason __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); /* @end */ // @interface NSURL (NSURLLoading) // - (nullable NSData *)resourceDataUsingCache:(BOOL)shouldUseCache __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (void)loadResourceDataNotifyingClient:(id)client usingCache:(BOOL)shouldUseCache __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (nullable id)propertyForKey:(NSString *)propertyKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (BOOL)setResourceData:(NSData *)data __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (BOOL)setProperty:(id)property forKey:(NSString *)propertyKey __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); // - (nullable NSURLHandle *)URLHandleUsingCache:(BOOL)shouldUseCache __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Use NSURLConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLConnection instead"))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSDirectoryEnumerator #define _REWRITER_typedef_NSDirectoryEnumerator typedef struct objc_object NSDirectoryEnumerator; typedef struct {} _objc_exc_NSDirectoryEnumerator; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #ifndef _REWRITER_typedef_NSFileProviderService #define _REWRITER_typedef_NSFileProviderService typedef struct objc_object NSFileProviderService; typedef struct {} _objc_exc_NSFileProviderService; #endif #ifndef _REWRITER_typedef_NSXPCConnection #define _REWRITER_typedef_NSXPCConnection typedef struct objc_object NSXPCConnection; typedef struct {} _objc_exc_NSXPCConnection; #endif #ifndef _REWRITER_typedef_NSLock #define _REWRITER_typedef_NSLock typedef struct objc_object NSLock; typedef struct {} _objc_exc_NSLock; #endif // @protocol NSFileManagerDelegate; typedef NSString * NSFileAttributeKey __attribute__((swift_wrapper(struct))); typedef NSString * NSFileAttributeType __attribute__((swift_wrapper(enum))); typedef NSString * NSFileProtectionType __attribute__((swift_wrapper(enum))); typedef NSString * NSFileProviderServiceName __attribute__((swift_wrapper(struct))); #pragma clang assume_nonnull begin typedef NSUInteger NSVolumeEnumerationOptions; enum { NSVolumeEnumerationSkipHiddenVolumes = 1UL << 1, NSVolumeEnumerationProduceFileReferenceURLs = 1UL << 2 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSDirectoryEnumerationOptions; enum { NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1UL << 0, NSDirectoryEnumerationSkipsPackageDescendants = 1UL << 1, NSDirectoryEnumerationSkipsHiddenFiles = 1UL << 2, NSDirectoryEnumerationIncludesDirectoriesPostOrder __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 1UL << 3, NSDirectoryEnumerationProducesRelativePathURLs __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 1UL << 4, } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSFileManagerItemReplacementOptions; enum { NSFileManagerItemReplacementUsingNewMetadataOnly = 1UL << 0, NSFileManagerItemReplacementWithoutDeletingBackupItem = 1UL << 1 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSInteger NSURLRelationship; enum { NSURLRelationshipContains, NSURLRelationshipSame, NSURLRelationshipOther } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSFileManagerUnmountOptions; enum { NSFileManagerUnmountAllPartitionsAndEjectDisk = 1UL << 0, NSFileManagerUnmountWithoutUI = 1UL << 1, } __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSFileManagerUnmountDissentingProcessIdentifierErrorKey __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern NSNotificationName const NSUbiquityIdentityDidChangeNotification __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSFileManager #define _REWRITER_typedef_NSFileManager typedef struct objc_object NSFileManager; typedef struct {} _objc_exc_NSFileManager; #endif struct NSFileManager_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (class, readonly, strong) NSFileManager *defaultManager; // - (nullable NSArray<NSURL *> *)mountedVolumeURLsIncludingResourceValuesForKeys:(nullable NSArray<NSURLResourceKey> *)propertyKeys options:(NSVolumeEnumerationOptions)options __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)unmountVolumeAtURL:(NSURL *)url options:(NSFileManagerUnmountOptions)mask completionHandler:(void (^)(NSError * _Nullable errorOrNil))completionHandler __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable NSArray<NSURL *> *)contentsOfDirectoryAtURL:(NSURL *)url includingPropertiesForKeys:(nullable NSArray<NSURLResourceKey> *)keys options:(NSDirectoryEnumerationOptions)mask error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSArray<NSURL *> *)URLsForDirectory:(NSSearchPathDirectory)directory inDomains:(NSSearchPathDomainMask)domainMask __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForDirectory:(NSSearchPathDirectory)directory inDomain:(NSSearchPathDomainMask)domain appropriateForURL:(nullable NSURL *)url create:(BOOL)shouldCreate error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)getRelationship:(NSURLRelationship *)outRelationship ofDirectoryAtURL:(NSURL *)directoryURL toItemAtURL:(NSURL *)otherURL error:(NSError **)error __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)getRelationship:(NSURLRelationship *)outRelationship ofDirectory:(NSSearchPathDirectory)directory inDomain:(NSSearchPathDomainMask)domainMask toItemAtURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)createDirectoryAtURL:(NSURL *)url withIntermediateDirectories:(BOOL)createIntermediates attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError **)error __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)createSymbolicLinkAtURL:(NSURL *)url withDestinationURL:(NSURL *)destURL error:(NSError **)error __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, assign) id <NSFileManagerDelegate> delegate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)setAttributes:(NSDictionary<NSFileAttributeKey, id> *)attributes ofItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)createSymbolicLinkAtPath:(NSString *)path withDestinationPath:(NSString *)destPath error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSString *)destinationOfSymbolicLinkAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)linkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)copyItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)moveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)linkItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)removeItemAtURL:(NSURL *)URL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)trashItemAtURL:(NSURL *)url resultingItemURL:(NSURL * _Nullable * _Nullable)outResultingURL error:(NSError **)error __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable NSDictionary *)fileAttributesAtPath:(NSString *)path traverseLink:(BOOL)yorn __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -attributesOfItemAtPath:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -attributesOfItemAtPath:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -attributesOfItemAtPath:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -attributesOfItemAtPath:error: instead"))); // - (BOOL)changeFileAttributes:(NSDictionary *)attributes atPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -setAttributes:ofItemAtPath:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -setAttributes:ofItemAtPath:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -setAttributes:ofItemAtPath:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -setAttributes:ofItemAtPath:error: instead"))); // - (nullable NSArray *)directoryContentsAtPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -contentsOfDirectoryAtPath:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -contentsOfDirectoryAtPath:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -contentsOfDirectoryAtPath:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -contentsOfDirectoryAtPath:error: instead"))); // - (nullable NSDictionary *)fileSystemAttributesAtPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -attributesOfFileSystemForPath:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -attributesOfFileSystemForPath:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -attributesOfFileSystemForPath:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -attributesOfFileSystemForPath:error: instead"))); // - (nullable NSString *)pathContentOfSymbolicLinkAtPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -destinationOfSymbolicLinkAtPath:error:"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -destinationOfSymbolicLinkAtPath:error:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -destinationOfSymbolicLinkAtPath:error:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -destinationOfSymbolicLinkAtPath:error:"))); // - (BOOL)createSymbolicLinkAtPath:(NSString *)path pathContent:(NSString *)otherpath __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -createSymbolicLinkAtPath:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -createSymbolicLinkAtPath:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -createSymbolicLinkAtPath:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -createSymbolicLinkAtPath:error: instead"))); // - (BOOL)createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use -createDirectoryAtPath:withIntermediateDirectories:attributes:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use -createDirectoryAtPath:withIntermediateDirectories:attributes:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -createDirectoryAtPath:withIntermediateDirectories:attributes:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -createDirectoryAtPath:withIntermediateDirectories:attributes:error: instead"))); // - (BOOL)linkPath:(NSString *)src toPath:(NSString *)dest handler:(nullable id)handler __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (BOOL)copyPath:(NSString *)src toPath:(NSString *)dest handler:(nullable id)handler __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (BOOL)movePath:(NSString *)src toPath:(NSString *)dest handler:(nullable id)handler __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (BOOL)removeFileAtPath:(NSString *)path handler:(nullable id)handler __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // @property (readonly, copy) NSString *currentDirectoryPath; // - (BOOL)changeCurrentDirectoryPath:(NSString *)path; // - (BOOL)fileExistsAtPath:(NSString *)path; // - (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(nullable BOOL *)isDirectory; // - (BOOL)isReadableFileAtPath:(NSString *)path; // - (BOOL)isWritableFileAtPath:(NSString *)path; // - (BOOL)isExecutableFileAtPath:(NSString *)path; // - (BOOL)isDeletableFileAtPath:(NSString *)path; // - (BOOL)contentsEqualAtPath:(NSString *)path1 andPath:(NSString *)path2; // - (NSString *)displayNameAtPath:(NSString *)path; // - (nullable NSArray<NSString *> *)componentsToDisplayForPath:(NSString *)path; // - (nullable NSDirectoryEnumerator<NSString *> *)enumeratorAtPath:(NSString *)path; // - (nullable NSDirectoryEnumerator<NSURL *> *)enumeratorAtURL:(NSURL *)url includingPropertiesForKeys:(nullable NSArray<NSURLResourceKey> *)keys options:(NSDirectoryEnumerationOptions)mask errorHandler:(nullable BOOL (^)(NSURL *url, NSError *error))handler __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSArray<NSString *> *)subpathsAtPath:(NSString *)path; // - (nullable NSData *)contentsAtPath:(NSString *)path; // - (BOOL)createFileAtPath:(NSString *)path contents:(nullable NSData *)data attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attr; // - (const char *)fileSystemRepresentationWithPath:(NSString *)path __attribute__((objc_returns_inner_pointer)); // - (NSString *)stringWithFileSystemRepresentation:(const char *)str length:(NSUInteger)len; // - (BOOL)replaceItemAtURL:(NSURL *)originalItemURL withItemAtURL:(NSURL *)newItemURL backupItemName:(nullable NSString *)backupItemName options:(NSFileManagerItemReplacementOptions)options resultingItemURL:(NSURL * _Nullable * _Nullable)resultingURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)setUbiquitous:(BOOL)flag itemAtURL:(NSURL *)url destinationURL:(NSURL *)destinationURL error:(NSError **)error __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)isUbiquitousItemAtURL:(NSURL *)url __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)startDownloadingUbiquitousItemAtURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)evictUbiquitousItemAtURL:(NSURL *)url error:(NSError **)error __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForUbiquityContainerIdentifier:(nullable NSString *)containerIdentifier __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)URLForPublishingUbiquitousItemAtURL:(NSURL *)url expirationDate:(NSDate * _Nullable * _Nullable)outDate error:(NSError **)error __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) id<NSObject,NSCopying,NSCoding> ubiquityIdentityToken __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getFileProviderServicesForItemAtURL:(NSURL *)url completionHandler:(void (^)(NSDictionary <NSFileProviderServiceName, NSFileProviderService *> * _Nullable services, NSError * _Nullable error))completionHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSFileManager (NSUserInformation) // @property (readonly, copy) NSURL *homeDirectoryForCurrentUser __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly, copy) NSURL *temporaryDirectory __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (nullable NSURL *)homeDirectoryForUser:(NSString *)userName __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @interface NSObject (NSCopyLinkMoveHandler) // - (BOOL)fileManager:(NSFileManager *)fm shouldProceedAfterError:(NSDictionary *)errorInfo __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=" Handler API no longer supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message=" Handler API no longer supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=" Handler API no longer supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=" Handler API no longer supported"))); // - (void)fileManager:(NSFileManager *)fm willProcessPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Handler API no longer supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Handler API no longer supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Handler API no longer supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Handler API no longer supported"))); /* @end */ // @protocol NSFileManagerDelegate <NSObject> /* @optional */ // - (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error copyingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error copyingItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldMoveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldMoveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error movingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error movingItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error linkingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error linkingItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldRemoveItemAtPath:(NSString *)path; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldRemoveItemAtURL:(NSURL *)URL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error removingItemAtPath:(NSString *)path; // - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error removingItemAtURL:(NSURL *)URL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #ifndef _REWRITER_typedef_NSDirectoryEnumerator #define _REWRITER_typedef_NSDirectoryEnumerator typedef struct objc_object NSDirectoryEnumerator; typedef struct {} _objc_exc_NSDirectoryEnumerator; #endif struct NSDirectoryEnumerator_IMPL { struct NSEnumerator_IMPL NSEnumerator_IVARS; }; // @property (nullable, readonly, copy) NSDictionary<NSFileAttributeKey, id> *fileAttributes; // @property (nullable, readonly, copy) NSDictionary<NSFileAttributeKey, id> *directoryAttributes; // @property (readonly) BOOL isEnumeratingDirectoryPostOrder __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (void)skipDescendents; // @property (readonly) NSUInteger level __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)skipDescendants __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSFileProviderService #define _REWRITER_typedef_NSFileProviderService typedef struct objc_object NSFileProviderService; typedef struct {} _objc_exc_NSFileProviderService; #endif struct NSFileProviderService_IMPL { struct NSObject_IMPL NSObject_IVARS; NSFileProviderServiceName _name; id _endpointCreatingProxy; dispatch_group_t _requestFinishedGroup; }; // - (void)getFileProviderConnectionWithCompletionHandler:(void (^)(NSXPCConnection * _Nullable connection, NSError * _Nullable error))completionHandler; // @property (readonly, copy) NSFileProviderServiceName name; /* @end */ extern "C" NSFileAttributeKey const NSFileType; extern "C" NSFileAttributeType const NSFileTypeDirectory; extern "C" NSFileAttributeType const NSFileTypeRegular; extern "C" NSFileAttributeType const NSFileTypeSymbolicLink; extern "C" NSFileAttributeType const NSFileTypeSocket; extern "C" NSFileAttributeType const NSFileTypeCharacterSpecial; extern "C" NSFileAttributeType const NSFileTypeBlockSpecial; extern "C" NSFileAttributeType const NSFileTypeUnknown; extern "C" NSFileAttributeKey const NSFileSize; extern "C" NSFileAttributeKey const NSFileModificationDate; extern "C" NSFileAttributeKey const NSFileReferenceCount; extern "C" NSFileAttributeKey const NSFileDeviceIdentifier; extern "C" NSFileAttributeKey const NSFileOwnerAccountName; extern "C" NSFileAttributeKey const NSFileGroupOwnerAccountName; extern "C" NSFileAttributeKey const NSFilePosixPermissions; extern "C" NSFileAttributeKey const NSFileSystemNumber; extern "C" NSFileAttributeKey const NSFileSystemFileNumber; extern "C" NSFileAttributeKey const NSFileExtensionHidden; extern "C" NSFileAttributeKey const NSFileHFSCreatorCode; extern "C" NSFileAttributeKey const NSFileHFSTypeCode; extern "C" NSFileAttributeKey const NSFileImmutable; extern "C" NSFileAttributeKey const NSFileAppendOnly; extern "C" NSFileAttributeKey const NSFileCreationDate; extern "C" NSFileAttributeKey const NSFileOwnerAccountID; extern "C" NSFileAttributeKey const NSFileGroupOwnerAccountID; extern "C" NSFileAttributeKey const NSFileBusy; extern "C" NSFileAttributeKey const NSFileProtectionKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSFileProtectionType const NSFileProtectionNone __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSFileProtectionType const NSFileProtectionComplete __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSFileProtectionType const NSFileProtectionCompleteUnlessOpen __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSFileProtectionType const NSFileProtectionCompleteUntilFirstUserAuthentication __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSFileAttributeKey const NSFileSystemSize; extern "C" NSFileAttributeKey const NSFileSystemFreeSize; extern "C" NSFileAttributeKey const NSFileSystemNodes; extern "C" NSFileAttributeKey const NSFileSystemFreeNodes; // @interface NSDictionary<KeyType, ObjectType> (NSFileAttributes) // - (unsigned long long)fileSize; // - (nullable NSDate *)fileModificationDate; // - (nullable NSString *)fileType; // - (NSUInteger)filePosixPermissions; // - (nullable NSString *)fileOwnerAccountName; // - (nullable NSString *)fileGroupOwnerAccountName; // - (NSInteger)fileSystemNumber; // - (NSUInteger)fileSystemFileNumber; // - (BOOL)fileExtensionHidden; // - (OSType)fileHFSCreatorCode; // - (OSType)fileHFSTypeCode; // - (BOOL)fileIsImmutable; // - (BOOL)fileIsAppendOnly; // - (nullable NSDate *)fileCreationDate; // - (nullable NSNumber *)fileOwnerAccountID; // - (nullable NSNumber *)fileGroupOwnerAccountID; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSUInteger NSPointerFunctionsOptions; enum { NSPointerFunctionsStrongMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (0UL << 0), NSPointerFunctionsZeroingWeakMemory __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = (1UL << 0), NSPointerFunctionsOpaqueMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (2UL << 0), NSPointerFunctionsMallocMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (3UL << 0), NSPointerFunctionsMachVirtualMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (4UL << 0), NSPointerFunctionsWeakMemory __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (5UL << 0), NSPointerFunctionsObjectPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (0UL << 8), NSPointerFunctionsOpaquePersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1UL << 8), NSPointerFunctionsObjectPointerPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (2UL << 8), NSPointerFunctionsCStringPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (3UL << 8), NSPointerFunctionsStructPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (4UL << 8), NSPointerFunctionsIntegerPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (5UL << 8), NSPointerFunctionsCopyIn __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = (1UL << 16), }; __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSPointerFunctions #define _REWRITER_typedef_NSPointerFunctions typedef struct objc_object NSPointerFunctions; typedef struct {} _objc_exc_NSPointerFunctions; #endif struct NSPointerFunctions_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithOptions:(NSPointerFunctionsOptions)options __attribute__((objc_designated_initializer)); // + (NSPointerFunctions *)pointerFunctionsWithOptions:(NSPointerFunctionsOptions)options; // @property (nullable) NSUInteger (*hashFunction)(const void *item, NSUInteger (* _Nullable size)(const void *item)); // @property (nullable) BOOL (*isEqualFunction)(const void *item1, const void*item2, NSUInteger (* _Nullable size)(const void *item)); // @property (nullable) NSUInteger (*sizeFunction)(const void *item); // @property (nullable) NSString * _Nullable (*descriptionFunction)(const void *item); // @property (nullable) void (*relinquishFunction)(const void *item, NSUInteger (* _Nullable size)(const void *item)); // @property (nullable) void * _Nonnull (*acquireFunction)(const void *src, NSUInteger (* _Nullable size)(const void *item), BOOL shouldCopy); // @property BOOL usesStrongWriteBarrier __attribute__((availability(macosx,introduced=10.5,deprecated=10.12,message="Garbage collection no longer supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=10.0,message="Garbage collection no longer supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=3.0,message="Garbage collection no longer supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=10.0,message="Garbage collection no longer supported"))); // @property BOOL usesWeakReadAndWriteBarriers __attribute__((availability(macosx,introduced=10.5,deprecated=10.12,message="Garbage collection no longer supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=10.0,message="Garbage collection no longer supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=3.0,message="Garbage collection no longer supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=10.0,message="Garbage collection no longer supported"))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #ifndef _REWRITER_typedef_NSHashTable #define _REWRITER_typedef_NSHashTable typedef struct objc_object NSHashTable; typedef struct {} _objc_exc_NSHashTable; #endif #pragma clang assume_nonnull begin static const NSPointerFunctionsOptions NSHashTableStrongMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsStrongMemory; static const NSPointerFunctionsOptions NSHashTableZeroingWeakMemory __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = NSPointerFunctionsZeroingWeakMemory; static const NSPointerFunctionsOptions NSHashTableCopyIn __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsCopyIn; static const NSPointerFunctionsOptions NSHashTableObjectPointerPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsObjectPointerPersonality; static const NSPointerFunctionsOptions NSHashTableWeakMemory __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsWeakMemory; typedef NSUInteger NSHashTableOptions; __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSHashTable #define _REWRITER_typedef_NSHashTable typedef struct objc_object NSHashTable; typedef struct {} _objc_exc_NSHashTable; #endif struct NSHashTable_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithOptions:(NSPointerFunctionsOptions)options capacity:(NSUInteger)initialCapacity __attribute__((objc_designated_initializer)); // - (instancetype)initWithPointerFunctions:(NSPointerFunctions *)functions capacity:(NSUInteger)initialCapacity __attribute__((objc_designated_initializer)); // + (NSHashTable<ObjectType> *)hashTableWithOptions:(NSPointerFunctionsOptions)options; // + (id)hashTableWithWeakObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSHashTable<ObjectType> *)weakObjectsHashTable __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSPointerFunctions *pointerFunctions; // @property (readonly) NSUInteger count; // - (nullable ObjectType)member:(nullable ObjectType)object; // - (NSEnumerator<ObjectType> *)objectEnumerator; // - (void)addObject:(nullable ObjectType)object; // - (void)removeObject:(nullable ObjectType)object; // - (void)removeAllObjects; // @property (readonly, copy) NSArray<ObjectType> *allObjects; // @property (nullable, nonatomic, readonly) ObjectType anyObject; // - (BOOL)containsObject:(nullable ObjectType)anObject; // - (BOOL)intersectsHashTable:(NSHashTable<ObjectType> *)other; // - (BOOL)isEqualToHashTable:(NSHashTable<ObjectType> *)other; // - (BOOL)isSubsetOfHashTable:(NSHashTable<ObjectType> *)other; // - (void)intersectHashTable:(NSHashTable<ObjectType> *)other; // - (void)unionHashTable:(NSHashTable<ObjectType> *)other; // - (void)minusHashTable:(NSHashTable<ObjectType> *)other; // @property (readonly, copy) NSSet<ObjectType> *setRepresentation; /* @end */ typedef struct {NSUInteger _pi; NSUInteger _si; void * _Nullable _bs;} NSHashEnumerator; extern "C" void NSFreeHashTable(NSHashTable *table); extern "C" void NSResetHashTable(NSHashTable *table); extern "C" BOOL NSCompareHashTables(NSHashTable *table1, NSHashTable *table2); extern "C" NSHashTable *NSCopyHashTableWithZone(NSHashTable *table, NSZone * _Nullable zone); extern "C" void *NSHashGet(NSHashTable *table, const void * _Nullable pointer); extern "C" void NSHashInsert(NSHashTable *table, const void * _Nullable pointer); extern "C" void NSHashInsertKnownAbsent(NSHashTable *table, const void * _Nullable pointer); extern "C" void * _Nullable NSHashInsertIfAbsent(NSHashTable *table, const void * _Nullable pointer); extern "C" void NSHashRemove(NSHashTable *table, const void * _Nullable pointer); extern "C" NSHashEnumerator NSEnumerateHashTable(NSHashTable *table); extern "C" void * _Nullable NSNextHashEnumeratorItem(NSHashEnumerator *enumerator); extern "C" void NSEndHashTableEnumeration(NSHashEnumerator *enumerator); extern "C" NSUInteger NSCountHashTable(NSHashTable *table); extern "C" NSString *NSStringFromHashTable(NSHashTable *table); extern "C" NSArray *NSAllHashTableObjects(NSHashTable *table); typedef struct { NSUInteger (* _Nullable hash)(NSHashTable *table, const void *); BOOL (* _Nullable isEqual)(NSHashTable *table, const void *, const void *); void (* _Nullable retain)(NSHashTable *table, const void *); void (* _Nullable release)(NSHashTable *table, void *); NSString * _Nullable (* _Nullable describe)(NSHashTable *table, const void *); } NSHashTableCallBacks; extern "C" NSHashTable *NSCreateHashTableWithZone(NSHashTableCallBacks callBacks, NSUInteger capacity, NSZone * _Nullable zone); extern "C" NSHashTable *NSCreateHashTable(NSHashTableCallBacks callBacks, NSUInteger capacity); extern "C" const NSHashTableCallBacks NSIntegerHashCallBacks __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" const NSHashTableCallBacks NSNonOwnedPointerHashCallBacks; extern "C" const NSHashTableCallBacks NSNonRetainedObjectHashCallBacks; extern "C" const NSHashTableCallBacks NSObjectHashCallBacks; extern "C" const NSHashTableCallBacks NSOwnedObjectIdentityHashCallBacks; extern "C" const NSHashTableCallBacks NSOwnedPointerHashCallBacks; extern "C" const NSHashTableCallBacks NSPointerToStructHashCallBacks; extern "C" const NSHashTableCallBacks NSIntHashCallBacks __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSDate; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSNumber; #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif typedef NSString * NSHTTPCookiePropertyKey __attribute__((swift_wrapper(struct))); typedef NSString * NSHTTPCookieStringPolicy __attribute__((swift_wrapper(enum))); #pragma clang assume_nonnull begin extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieName __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieValue __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieOriginURL __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieVersion __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieDomain __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookiePath __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieSecure __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieExpires __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieComment __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieCommentURL __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieDiscard __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieMaximumAge __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookiePort __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSHTTPCookiePropertyKey const NSHTTPCookieSameSitePolicy __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); extern "C" NSHTTPCookieStringPolicy const NSHTTPCookieSameSiteLax __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); extern "C" NSHTTPCookieStringPolicy const NSHTTPCookieSameSiteStrict __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @class NSHTTPCookieInternal; #ifndef _REWRITER_typedef_NSHTTPCookieInternal #define _REWRITER_typedef_NSHTTPCookieInternal typedef struct objc_object NSHTTPCookieInternal; typedef struct {} _objc_exc_NSHTTPCookieInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSHTTPCookie #define _REWRITER_typedef_NSHTTPCookie typedef struct objc_object NSHTTPCookie; typedef struct {} _objc_exc_NSHTTPCookie; #endif struct NSHTTPCookie_IMPL { struct NSObject_IMPL NSObject_IVARS; NSHTTPCookieInternal *_cookiePrivate; }; // - (nullable instancetype)initWithProperties:(NSDictionary<NSHTTPCookiePropertyKey, id> *)properties; // + (nullable NSHTTPCookie *)cookieWithProperties:(NSDictionary<NSHTTPCookiePropertyKey, id> *)properties; // + (NSDictionary<NSString *, NSString *> *)requestHeaderFieldsWithCookies:(NSArray<NSHTTPCookie *> *)cookies; // + (NSArray<NSHTTPCookie *> *)cookiesWithResponseHeaderFields:(NSDictionary<NSString *, NSString *> *)headerFields forURL:(NSURL *)URL; // @property (nullable, readonly, copy) NSDictionary<NSHTTPCookiePropertyKey, id> *properties; // @property (readonly) NSUInteger version; // @property (readonly, copy) NSString *name; // @property (readonly, copy) NSString *value; // @property (nullable, readonly, copy) NSDate *expiresDate; // @property (readonly, getter=isSessionOnly) BOOL sessionOnly; // @property (readonly, copy) NSString *domain; // @property (readonly, copy) NSString *path; // @property (readonly, getter=isSecure) BOOL secure; // @property (readonly, getter=isHTTPOnly) BOOL HTTPOnly; // @property (nullable, readonly, copy) NSString *comment; // @property (nullable, readonly, copy) NSURL *commentURL; // @property (nullable, readonly, copy) NSArray<NSNumber *> *portList; // @property (nullable, readonly, copy) NSHTTPCookieStringPolicy sameSitePolicy __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSHTTPCookie; #ifndef _REWRITER_typedef_NSHTTPCookie #define _REWRITER_typedef_NSHTTPCookie typedef struct objc_object NSHTTPCookie; typedef struct {} _objc_exc_NSHTTPCookie; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @class NSDate; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif // @class NSURLSessionTask; #ifndef _REWRITER_typedef_NSURLSessionTask #define _REWRITER_typedef_NSURLSessionTask typedef struct objc_object NSURLSessionTask; typedef struct {} _objc_exc_NSURLSessionTask; #endif // @class NSSortDescriptor; #ifndef _REWRITER_typedef_NSSortDescriptor #define _REWRITER_typedef_NSSortDescriptor typedef struct objc_object NSSortDescriptor; typedef struct {} _objc_exc_NSSortDescriptor; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSHTTPCookieAcceptPolicy; enum { NSHTTPCookieAcceptPolicyAlways, NSHTTPCookieAcceptPolicyNever, NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain }; // @class NSHTTPCookieStorageInternal; #ifndef _REWRITER_typedef_NSHTTPCookieStorageInternal #define _REWRITER_typedef_NSHTTPCookieStorageInternal typedef struct objc_object NSHTTPCookieStorageInternal; typedef struct {} _objc_exc_NSHTTPCookieStorageInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSHTTPCookieStorage #define _REWRITER_typedef_NSHTTPCookieStorage typedef struct objc_object NSHTTPCookieStorage; typedef struct {} _objc_exc_NSHTTPCookieStorage; #endif struct NSHTTPCookieStorage_IMPL { struct NSObject_IMPL NSObject_IVARS; NSHTTPCookieStorageInternal *_internal; }; @property(class, readonly, strong) NSHTTPCookieStorage *sharedHTTPCookieStorage; // + (NSHTTPCookieStorage *)sharedCookieStorageForGroupContainerIdentifier:(NSString *)identifier __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable , readonly, copy) NSArray<NSHTTPCookie *> *cookies; // - (void)setCookie:(NSHTTPCookie *)cookie; // - (void)deleteCookie:(NSHTTPCookie *)cookie; // - (void)removeCookiesSinceDate:(NSDate *)date __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSArray<NSHTTPCookie *> *)cookiesForURL:(NSURL *)URL; // - (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(nullable NSURL *)URL mainDocumentURL:(nullable NSURL *)mainDocumentURL; // @property NSHTTPCookieAcceptPolicy cookieAcceptPolicy; // - (NSArray<NSHTTPCookie *> *)sortedCookiesUsingDescriptors:(NSArray<NSSortDescriptor *> *) sortOrder __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSHTTPCookieStorage (NSURLSessionTaskAdditions) // - (void)storeCookies:(NSArray<NSHTTPCookie *> *)cookies forTask:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getCookiesForTask:(NSURLSessionTask *)task completionHandler:(void (^) (NSArray<NSHTTPCookie *> * _Nullable cookies))completionHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSHTTPCookieManagerAcceptPolicyChangedNotification __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSHTTPCookieManagerCookiesChangedNotification __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSIndexPath #define _REWRITER_typedef_NSIndexPath typedef struct objc_object NSIndexPath; typedef struct {} _objc_exc_NSIndexPath; #endif struct NSIndexPath_IMPL { struct NSObject_IMPL NSObject_IVARS; NSUInteger *_indexes; NSUInteger _length; void *_reserved; }; // + (instancetype)indexPathWithIndex:(NSUInteger)index; // + (instancetype)indexPathWithIndexes:(const NSUInteger [_Nullable])indexes length:(NSUInteger)length; // - (instancetype)initWithIndexes:(const NSUInteger [_Nullable])indexes length:(NSUInteger)length __attribute__((objc_designated_initializer)); // - (instancetype)initWithIndex:(NSUInteger)index; // - (NSIndexPath *)indexPathByAddingIndex:(NSUInteger)index; // - (NSIndexPath *)indexPathByRemovingLastIndex; // - (NSUInteger)indexAtPosition:(NSUInteger)position; // @property (readonly) NSUInteger length; // - (void)getIndexes:(NSUInteger *)indexes range:(NSRange)positionRange __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSComparisonResult)compare:(NSIndexPath *)otherObject; /* @end */ // @interface NSIndexPath (NSDeprecated) // - (void)getIndexes:(NSUInteger *)indexes __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="getIndexes:range:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getIndexes:range:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="getIndexes:range:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="getIndexes:range:"))); /* @end */ #pragma clang assume_nonnull end // @class NSMorphology; #ifndef _REWRITER_typedef_NSMorphology #define _REWRITER_typedef_NSMorphology typedef struct objc_object NSMorphology; typedef struct {} _objc_exc_NSMorphology; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)) #ifndef _REWRITER_typedef_NSInflectionRule #define _REWRITER_typedef_NSInflectionRule typedef struct objc_object NSInflectionRule; typedef struct {} _objc_exc_NSInflectionRule; #endif struct NSInflectionRule_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (id)init __attribute__((unavailable)); @property (class, readonly) NSInflectionRule *automaticRule; /* @end */ __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)) #ifndef _REWRITER_typedef_NSInflectionRuleExplicit #define _REWRITER_typedef_NSInflectionRuleExplicit typedef struct objc_object NSInflectionRuleExplicit; typedef struct {} _objc_exc_NSInflectionRuleExplicit; #endif struct NSInflectionRuleExplicit_IMPL { struct NSInflectionRule_IMPL NSInflectionRule_IVARS; }; // - (instancetype)initWithMorphology:(NSMorphology *)morphology __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSMorphology *morphology; /* @end */ // @interface NSInflectionRule (NSInflectionAvailability) #if 0 + (BOOL)canInflectLanguage:(NSString *)language __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); #endif @property (class, readonly) BOOL canInflectPreferredLocalization __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); /* @end */ #pragma clang assume_nonnull end // @class NSMethodSignature; #ifndef _REWRITER_typedef_NSMethodSignature #define _REWRITER_typedef_NSMethodSignature typedef struct objc_object NSMethodSignature; typedef struct {} _objc_exc_NSMethodSignature; #endif #pragma clang assume_nonnull begin __attribute__((availability(swift, unavailable, message="NSInvocation and related APIs not available"))) #ifndef _REWRITER_typedef_NSInvocation #define _REWRITER_typedef_NSInvocation typedef struct objc_object NSInvocation; typedef struct {} _objc_exc_NSInvocation; #endif struct NSInvocation_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSInvocation *)invocationWithMethodSignature:(NSMethodSignature *)sig; // @property (readonly, retain) NSMethodSignature *methodSignature; // - (void)retainArguments; // @property (readonly) BOOL argumentsRetained; // @property (nullable, assign) id target; // @property SEL selector; // - (void)getReturnValue:(void *)retLoc; // - (void)setReturnValue:(void *)retLoc; // - (void)getArgument:(void *)argumentLocation atIndex:(NSInteger)idx; // - (void)setArgument:(void *)argumentLocation atIndex:(NSInteger)idx; // - (void)invoke; // - (void)invokeWithTarget:(id)target; /* @end */ #pragma clang assume_nonnull end // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSJSONReadingOptions; enum { NSJSONReadingMutableContainers = (1UL << 0), NSJSONReadingMutableLeaves = (1UL << 1), NSJSONReadingFragmentsAllowed = (1UL << 2), NSJSONReadingJSON5Allowed __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) = (1UL << 3), NSJSONReadingTopLevelDictionaryAssumed __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) = (1UL << 4), NSJSONReadingAllowFragments __attribute__((availability(macos,introduced=10.7,deprecated=100000,replacement="NSJSONReadingFragmentsAllowed"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,replacement="NSJSONReadingFragmentsAllowed"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="NSJSONReadingFragmentsAllowed"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="NSJSONReadingFragmentsAllowed"))) = NSJSONReadingFragmentsAllowed, } __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSJSONWritingOptions; enum { NSJSONWritingPrettyPrinted = (1UL << 0), NSJSONWritingSortedKeys __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) = (1UL << 1), NSJSONWritingFragmentsAllowed = (1UL << 2), NSJSONWritingWithoutEscapingSlashes __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = (1UL << 3), } __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSJSONSerialization #define _REWRITER_typedef_NSJSONSerialization typedef struct objc_object NSJSONSerialization; typedef struct {} _objc_exc_NSJSONSerialization; #endif struct NSJSONSerialization_IMPL { struct NSObject_IMPL NSObject_IVARS; void *reserved[6]; }; // + (BOOL)isValidJSONObject:(id)obj; // + (nullable NSData *)dataWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt error:(NSError **)error; // + (nullable id)JSONObjectWithData:(NSData *)data options:(NSJSONReadingOptions)opt error:(NSError **)error; // + (NSInteger)writeJSONObject:(id)obj toStream:(NSOutputStream *)stream options:(NSJSONWritingOptions)opt error:(NSError **)error; // + (nullable id)JSONObjectWithStream:(NSInputStream *)stream options:(NSJSONReadingOptions)opt error:(NSError **)error; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSIndexSet #define _REWRITER_typedef_NSIndexSet typedef struct objc_object NSIndexSet; typedef struct {} _objc_exc_NSIndexSet; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSOrderedSet #define _REWRITER_typedef_NSOrderedSet typedef struct objc_object NSOrderedSet; typedef struct {} _objc_exc_NSOrderedSet; #endif struct NSOrderedSet_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger count; // - (ObjectType)objectAtIndex:(NSUInteger)idx; // - (NSUInteger)indexOfObject:(ObjectType)object; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSOrderedSet<ObjectType> (NSExtendedOrderedSet) // - (void)getObjects:(ObjectType _Nonnull __attribute__((objc_ownership(none))) [_Nullable])objects range:(NSRange)range __attribute__((availability(swift, unavailable, message="Use 'array' instead"))); // - (NSArray<ObjectType> *)objectsAtIndexes:(NSIndexSet *)indexes; // @property (nullable, nonatomic, readonly) ObjectType firstObject; // @property (nullable, nonatomic, readonly) ObjectType lastObject; // - (BOOL)isEqualToOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (BOOL)containsObject:(ObjectType)object; // - (BOOL)intersectsOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (BOOL)intersectsSet:(NSSet<ObjectType> *)set; // - (BOOL)isSubsetOfOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (BOOL)isSubsetOfSet:(NSSet<ObjectType> *)set; // - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSEnumerator<ObjectType> *)objectEnumerator; // - (NSEnumerator<ObjectType> *)reverseObjectEnumerator; // @property (readonly, copy) NSOrderedSet<ObjectType> *reversedOrderedSet; // @property (readonly, strong) NSArray<ObjectType> *array; // @property (readonly, strong) NSSet<ObjectType> *set; // - (void)enumerateObjectsUsingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block; // - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block; // - (void)enumerateObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block; // - (NSUInteger)indexOfObjectPassingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate; // - (NSUInteger)indexOfObjectWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate; // - (NSUInteger)indexOfObjectAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate; // - (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate; // - (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate; // - (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate; // - (NSUInteger)indexOfObject:(ObjectType)object inSortedRange:(NSRange)range options:(NSBinarySearchingOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmp; // - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator __attribute__((noescape)))cmptr; // - (NSArray<ObjectType> *)sortedArrayWithOptions:(NSSortOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmptr; // @property (readonly, copy) NSString *description; // - (NSString *)descriptionWithLocale:(nullable id)locale; // - (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level; /* @end */ // @interface NSOrderedSet<ObjectType> (NSOrderedSetCreation) // + (instancetype)orderedSet; // + (instancetype)orderedSetWithObject:(ObjectType)object; // + (instancetype)orderedSetWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt; // + (instancetype)orderedSetWithObjects:(ObjectType)firstObj, ... __attribute__((sentinel(0,1))); // + (instancetype)orderedSetWithOrderedSet:(NSOrderedSet<ObjectType> *)set; // + (instancetype)orderedSetWithOrderedSet:(NSOrderedSet<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag; // + (instancetype)orderedSetWithArray:(NSArray<ObjectType> *)array; // + (instancetype)orderedSetWithArray:(NSArray<ObjectType> *)array range:(NSRange)range copyItems:(BOOL)flag; // + (instancetype)orderedSetWithSet:(NSSet<ObjectType> *)set; // + (instancetype)orderedSetWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag; // - (instancetype)initWithObject:(ObjectType)object; // - (instancetype)initWithObjects:(ObjectType)firstObj, ... __attribute__((sentinel(0,1))); // - (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set; // - (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set copyItems:(BOOL)flag; // - (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag; // - (instancetype)initWithArray:(NSArray<ObjectType> *)array; // - (instancetype)initWithArray:(NSArray<ObjectType> *)set copyItems:(BOOL)flag; // - (instancetype)initWithArray:(NSArray<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag; // - (instancetype)initWithSet:(NSSet<ObjectType> *)set; // - (instancetype)initWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag; /* @end */ __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(swift, unavailable, message="NSOrderedSet diffing methods are not available in Swift, use Collection.difference(from:) instead"))) // @interface NSOrderedSet<ObjectType> (NSOrderedSetDiffing) // - (NSOrderedCollectionDifference<ObjectType> *)differenceFromOrderedSet:(NSOrderedSet<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options usingEquivalenceTest:(BOOL (__attribute__((noescape)) ^)(ObjectType obj1, ObjectType obj2))block; // - (NSOrderedCollectionDifference<ObjectType> *)differenceFromOrderedSet:(NSOrderedSet<ObjectType> *)other withOptions:(NSOrderedCollectionDifferenceCalculationOptions)options; // - (NSOrderedCollectionDifference<ObjectType> *)differenceFromOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (nullable NSOrderedSet<ObjectType> *)orderedSetByApplyingDifference:(NSOrderedCollectionDifference<ObjectType> *)difference; /* @end */ __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMutableOrderedSet #define _REWRITER_typedef_NSMutableOrderedSet typedef struct objc_object NSMutableOrderedSet; typedef struct {} _objc_exc_NSMutableOrderedSet; #endif struct NSMutableOrderedSet_IMPL { struct NSOrderedSet_IMPL NSOrderedSet_IVARS; }; // - (void)insertObject:(ObjectType)object atIndex:(NSUInteger)idx; // - (void)removeObjectAtIndex:(NSUInteger)idx; // - (void)replaceObjectAtIndex:(NSUInteger)idx withObject:(ObjectType)object; // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithCapacity:(NSUInteger)numItems __attribute__((objc_designated_initializer)); /* @end */ // @interface NSMutableOrderedSet<ObjectType> (NSExtendedMutableOrderedSet) // - (void)addObject:(ObjectType)object; // - (void)addObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)count; // - (void)addObjectsFromArray:(NSArray<ObjectType> *)array; // - (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2; // - (void)moveObjectsAtIndexes:(NSIndexSet *)indexes toIndex:(NSUInteger)idx; // - (void)insertObjects:(NSArray<ObjectType> *)objects atIndexes:(NSIndexSet *)indexes; // - (void)setObject:(ObjectType)obj atIndex:(NSUInteger)idx; // - (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)replaceObjectsInRange:(NSRange)range withObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)count; // - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withObjects:(NSArray<ObjectType> *)objects; // - (void)removeObjectsInRange:(NSRange)range; // - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes; // - (void)removeAllObjects; // - (void)removeObject:(ObjectType)object; // - (void)removeObjectsInArray:(NSArray<ObjectType> *)array; // - (void)intersectOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (void)minusOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (void)unionOrderedSet:(NSOrderedSet<ObjectType> *)other; // - (void)intersectSet:(NSSet<ObjectType> *)other; // - (void)minusSet:(NSSet<ObjectType> *)other; // - (void)unionSet:(NSSet<ObjectType> *)other; // - (void)sortUsingComparator:(NSComparator __attribute__((noescape)))cmptr; // - (void)sortWithOptions:(NSSortOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmptr; // - (void)sortRange:(NSRange)range options:(NSSortOptions)opts usingComparator:(NSComparator __attribute__((noescape)))cmptr; /* @end */ // @interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetCreation) // + (instancetype)orderedSetWithCapacity:(NSUInteger)numItems; /* @end */ __attribute__((availability(macosx,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(swift, unavailable, message="NSMutableOrderedSet diffing methods are not available in Swift"))) // @interface NSMutableOrderedSet<ObjectType> (NSMutableOrderedSetDiffing) // - (void)applyDifference:(NSOrderedCollectionDifference<ObjectType> *)difference; /* @end */ #pragma clang assume_nonnull end // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin extern "C" NSExceptionName const NSUndefinedKeyException; typedef NSString * NSKeyValueOperator __attribute__((swift_wrapper(enum))); extern "C" NSKeyValueOperator const NSAverageKeyValueOperator; extern "C" NSKeyValueOperator const NSCountKeyValueOperator; extern "C" NSKeyValueOperator const NSDistinctUnionOfArraysKeyValueOperator; extern "C" NSKeyValueOperator const NSDistinctUnionOfObjectsKeyValueOperator; extern "C" NSKeyValueOperator const NSDistinctUnionOfSetsKeyValueOperator; extern "C" NSKeyValueOperator const NSMaximumKeyValueOperator; extern "C" NSKeyValueOperator const NSMinimumKeyValueOperator; extern "C" NSKeyValueOperator const NSSumKeyValueOperator; extern "C" NSKeyValueOperator const NSUnionOfArraysKeyValueOperator; extern "C" NSKeyValueOperator const NSUnionOfObjectsKeyValueOperator; extern "C" NSKeyValueOperator const NSUnionOfSetsKeyValueOperator; // @interface NSObject(NSKeyValueCoding) @property (class, readonly) BOOL accessInstanceVariablesDirectly; // - (nullable id)valueForKey:(NSString *)key; // - (void)setValue:(nullable id)value forKey:(NSString *)key; // - (BOOL)validateValue:(inout id _Nullable * _Nonnull)ioValue forKey:(NSString *)inKey error:(out NSError **)outError; // - (NSMutableArray *)mutableArrayValueForKey:(NSString *)key; // - (NSMutableOrderedSet *)mutableOrderedSetValueForKey:(NSString *)key __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSMutableSet *)mutableSetValueForKey:(NSString *)key; // - (nullable id)valueForKeyPath:(NSString *)keyPath; // - (void)setValue:(nullable id)value forKeyPath:(NSString *)keyPath; // - (BOOL)validateValue:(inout id _Nullable * _Nonnull)ioValue forKeyPath:(NSString *)inKeyPath error:(out NSError **)outError; // - (NSMutableArray *)mutableArrayValueForKeyPath:(NSString *)keyPath; // - (NSMutableOrderedSet *)mutableOrderedSetValueForKeyPath:(NSString *)keyPath __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSMutableSet *)mutableSetValueForKeyPath:(NSString *)keyPath; // - (nullable id)valueForUndefinedKey:(NSString *)key; // - (void)setValue:(nullable id)value forUndefinedKey:(NSString *)key; // - (void)setNilValueForKey:(NSString *)key; // - (NSDictionary<NSString *, id> *)dictionaryWithValuesForKeys:(NSArray<NSString *> *)keys; // - (void)setValuesForKeysWithDictionary:(NSDictionary<NSString *, id> *)keyedValues; /* @end */ // @interface NSArray<ObjectType>(NSKeyValueCoding) // - (id)valueForKey:(NSString *)key; // - (void)setValue:(nullable id)value forKey:(NSString *)key; /* @end */ // @interface NSDictionary<KeyType, ObjectType>(NSKeyValueCoding) // - (nullable ObjectType)valueForKey:(NSString *)key; /* @end */ // @interface NSMutableDictionary<KeyType, ObjectType>(NSKeyValueCoding) // - (void)setValue:(nullable ObjectType)value forKey:(NSString *)key; /* @end */ // @interface NSOrderedSet<ObjectType>(NSKeyValueCoding) // - (id)valueForKey:(NSString *)key __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)setValue:(nullable id)value forKey:(NSString *)key __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSSet<ObjectType>(NSKeyValueCoding) // - (id)valueForKey:(NSString *)key; // - (void)setValue:(nullable id)value forKey:(NSString *)key; /* @end */ // @interface NSObject(NSDeprecatedKeyValueCoding) // + (BOOL)useStoredAccessor __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (nullable id)storedValueForKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (void)takeStoredValue:(nullable id)value forKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.4,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (void)takeValue:(nullable id)value forKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (void)takeValue:(nullable id)value forKeyPath:(NSString *)keyPath __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (nullable id)handleQueryWithUnboundKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (void)handleTakeValue:(nullable id)value forUnboundKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (void)unableToSetNilForKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (NSDictionary *)valuesForKeys:(NSArray *)keys __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); // - (void)takeValuesFromDictionary:(NSDictionary *)properties __attribute__((availability(macos,introduced=10.0,deprecated=10.3,message="Legacy KVC API"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Legacy KVC API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Legacy KVC API"))); /* @end */ #pragma clang assume_nonnull end // @class NSIndexSet; #ifndef _REWRITER_typedef_NSIndexSet #define _REWRITER_typedef_NSIndexSet typedef struct objc_object NSIndexSet; typedef struct {} _objc_exc_NSIndexSet; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSKeyValueObservingOptions; enum { NSKeyValueObservingOptionNew = 0x01, NSKeyValueObservingOptionOld = 0x02, NSKeyValueObservingOptionInitial __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x04, NSKeyValueObservingOptionPrior __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x08 }; typedef NSUInteger NSKeyValueChange; enum { NSKeyValueChangeSetting = 1, NSKeyValueChangeInsertion = 2, NSKeyValueChangeRemoval = 3, NSKeyValueChangeReplacement = 4, }; typedef NSUInteger NSKeyValueSetMutationKind; enum { NSKeyValueUnionSetMutation = 1, NSKeyValueMinusSetMutation = 2, NSKeyValueIntersectSetMutation = 3, NSKeyValueSetSetMutation = 4 }; typedef NSString * NSKeyValueChangeKey __attribute__((swift_wrapper(enum))); extern "C" NSKeyValueChangeKey const NSKeyValueChangeKindKey; extern "C" NSKeyValueChangeKey const NSKeyValueChangeNewKey; extern "C" NSKeyValueChangeKey const NSKeyValueChangeOldKey; extern "C" NSKeyValueChangeKey const NSKeyValueChangeIndexesKey; extern "C" NSKeyValueChangeKey const NSKeyValueChangeNotificationIsPriorKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @interface NSObject(NSKeyValueObserving) // - (void)observeValueForKeyPath:(nullable NSString *)keyPath ofObject:(nullable id)object change:(nullable NSDictionary<NSKeyValueChangeKey, id> *)change context:(nullable void *)context; /* @end */ // @interface NSObject(NSKeyValueObserverRegistration) // - (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context; // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath context:(nullable void *)context __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath; /* @end */ // @interface NSArray<ObjectType>(NSKeyValueObserverRegistration) // - (void)addObserver:(NSObject *)observer toObjectsAtIndexes:(NSIndexSet *)indexes forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context; // - (void)removeObserver:(NSObject *)observer fromObjectsAtIndexes:(NSIndexSet *)indexes forKeyPath:(NSString *)keyPath context:(nullable void *)context __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeObserver:(NSObject *)observer fromObjectsAtIndexes:(NSIndexSet *)indexes forKeyPath:(NSString *)keyPath; // - (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context; // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath context:(nullable void *)context __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath; /* @end */ // @interface NSOrderedSet<ObjectType>(NSKeyValueObserverRegistration) // - (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context; // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath context:(nullable void *)context __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath; /* @end */ // @interface NSSet<ObjectType>(NSKeyValueObserverRegistration) // - (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context; // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath context:(nullable void *)context __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath; /* @end */ // @interface NSObject(NSKeyValueObserverNotification) // - (void)willChangeValueForKey:(NSString *)key; // - (void)didChangeValueForKey:(NSString *)key; // - (void)willChange:(NSKeyValueChange)changeKind valuesAtIndexes:(NSIndexSet *)indexes forKey:(NSString *)key; // - (void)didChange:(NSKeyValueChange)changeKind valuesAtIndexes:(NSIndexSet *)indexes forKey:(NSString *)key; // - (void)willChangeValueForKey:(NSString *)key withSetMutation:(NSKeyValueSetMutationKind)mutationKind usingObjects:(NSSet *)objects; // - (void)didChangeValueForKey:(NSString *)key withSetMutation:(NSKeyValueSetMutationKind)mutationKind usingObjects:(NSSet *)objects; /* @end */ // @interface NSObject(NSKeyValueObservingCustomization) // + (NSSet<NSString *> *)keyPathsForValuesAffectingValueForKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (BOOL)automaticallyNotifiesObserversForKey:(NSString *)key; // @property (nullable) void *observationInfo __attribute__((objc_returns_inner_pointer)); /* @end */ // @interface NSObject(NSDeprecatedKeyValueObservingCustomization) // + (void)setKeys:(NSArray *)keys triggerChangeNotificationsForDependentKey:(NSString *)dependentKey __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Use +keyPathsForValuesAffectingValueForKey instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Use +keyPathsForValuesAffectingValueForKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use +keyPathsForValuesAffectingValueForKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use +keyPathsForValuesAffectingValueForKey instead"))); /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSPropertyListMutabilityOptions; enum { NSPropertyListImmutable = kCFPropertyListImmutable, NSPropertyListMutableContainers = kCFPropertyListMutableContainers, NSPropertyListMutableContainersAndLeaves = kCFPropertyListMutableContainersAndLeaves }; typedef NSUInteger NSPropertyListFormat; enum { NSPropertyListOpenStepFormat = kCFPropertyListOpenStepFormat, NSPropertyListXMLFormat_v1_0 = kCFPropertyListXMLFormat_v1_0, NSPropertyListBinaryFormat_v1_0 = kCFPropertyListBinaryFormat_v1_0 }; typedef NSPropertyListMutabilityOptions NSPropertyListReadOptions; typedef NSUInteger NSPropertyListWriteOptions; #ifndef _REWRITER_typedef_NSPropertyListSerialization #define _REWRITER_typedef_NSPropertyListSerialization typedef struct objc_object NSPropertyListSerialization; typedef struct {} _objc_exc_NSPropertyListSerialization; #endif struct NSPropertyListSerialization_IMPL { struct NSObject_IMPL NSObject_IVARS; void *reserved[6]; }; // + (BOOL)propertyList:(id)plist isValidForFormat:(NSPropertyListFormat)format; // + (nullable NSData *)dataWithPropertyList:(id)plist format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSInteger)writePropertyList:(id)plist toStream:(NSOutputStream *)stream format:(NSPropertyListFormat)format options:(NSPropertyListWriteOptions)opt error:(out NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable id)propertyListWithData:(NSData *)data options:(NSPropertyListReadOptions)opt format:(nullable NSPropertyListFormat *)format error:(out NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable id)propertyListWithStream:(NSInputStream *)stream options:(NSPropertyListReadOptions)opt format:(nullable NSPropertyListFormat *)format error:(out NSError **)error __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSData *)dataFromPropertyList:(id)plist format:(NSPropertyListFormat)format errorDescription:(out __attribute__((objc_ownership(strong))) NSString * _Nullable * _Nullable)errorString __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use dataWithPropertyList:format:options:error: instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use dataWithPropertyList:format:options:error: instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use dataWithPropertyList:format:options:error: instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use dataWithPropertyList:format:options:error: instead."))); // + (nullable id)propertyListFromData:(NSData *)data mutabilityOption:(NSPropertyListMutabilityOptions)opt format:(nullable NSPropertyListFormat *)format errorDescription:(out __attribute__((objc_ownership(strong))) NSString * _Nullable * _Nullable)errorString __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use propertyListWithData:options:format:error: instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use propertyListWithData:options:format:error: instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use propertyListWithData:options:format:error: instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use propertyListWithData:options:format:error: instead."))); /* @end */ #pragma clang assume_nonnull end typedef double CGFloat; typedef struct __attribute__((objc_bridge(id))) __attribute__((objc_bridge_mutable(IOSurface))) __IOSurface *IOSurfaceRef __attribute__((swift_name("IOSurfaceRef"))) ; #pragma clang assume_nonnull begin struct CGPoint { CGFloat x; CGFloat y; }; typedef struct __attribute__((objc_boxable)) CGPoint CGPoint; struct CGSize { CGFloat width; CGFloat height; }; typedef struct __attribute__((objc_boxable)) CGSize CGSize; struct CGVector { CGFloat dx; CGFloat dy; }; typedef struct __attribute__((objc_boxable)) CGVector CGVector; struct CGRect { CGPoint origin; CGSize size; }; typedef struct __attribute__((objc_boxable)) CGRect CGRect; typedef uint32_t CGRectEdge; enum { CGRectMinXEdge, CGRectMinYEdge, CGRectMaxXEdge, CGRectMaxYEdge }; extern "C" __attribute__((visibility("default"))) const CGPoint CGPointZero __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) const CGSize CGSizeZero __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) const CGRect CGRectZero __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) const CGRect CGRectNull __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) const CGRect CGRectInfinite __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=2.0))); static inline CGPoint CGPointMake(CGFloat x, CGFloat y); static inline CGSize CGSizeMake(CGFloat width, CGFloat height); static inline CGVector CGVectorMake(CGFloat dx, CGFloat dy); static inline CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetMinX(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetMidX(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetMaxX(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetMinY(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetMidY(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetMaxY(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetWidth(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGFloat CGRectGetHeight(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGPointEqualToPoint(CGPoint point1, CGPoint point2) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGSizeEqualToSize(CGSize size1, CGSize size2) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectEqualToRect(CGRect rect1, CGRect rect2) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectStandardize(CGRect rect) __attribute__ ((warn_unused_result)) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectIsEmpty(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectIsNull(CGRect rect) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectIsInfinite(CGRect rect) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectInset(CGRect rect, CGFloat dx, CGFloat dy) __attribute__ ((warn_unused_result)) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectIntegral(CGRect rect) __attribute__ ((warn_unused_result)) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectUnion(CGRect r1, CGRect r2) __attribute__ ((warn_unused_result)) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectIntersection(CGRect r1, CGRect r2) __attribute__ ((warn_unused_result)) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectOffset(CGRect rect, CGFloat dx, CGFloat dy) __attribute__ ((warn_unused_result)) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) void CGRectDivide(CGRect rect, CGRect * slice, CGRect * remainder, CGFloat amount, CGRectEdge edge) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectContainsPoint(CGRect rect, CGPoint point) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectContainsRect(CGRect rect1, CGRect rect2) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectIntersectsRect(CGRect rect1, CGRect rect2) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CFDictionaryRef CGPointCreateDictionaryRepresentation( CGPoint point) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGPointMakeWithDictionaryRepresentation( CFDictionaryRef _Nullable dict, CGPoint * _Nullable point) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CFDictionaryRef CGSizeCreateDictionaryRepresentation(CGSize size) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGSizeMakeWithDictionaryRepresentation( CFDictionaryRef _Nullable dict, CGSize * _Nullable size) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CFDictionaryRef CGRectCreateDictionaryRepresentation(CGRect) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGRectMakeWithDictionaryRepresentation( CFDictionaryRef _Nullable dict, CGRect * _Nullable rect) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))); static inline CGPoint CGPointMake(CGFloat x, CGFloat y) { CGPoint p; p.x = x; p.y = y; return p; } static inline CGSize CGSizeMake(CGFloat width, CGFloat height) { CGSize size; size.width = width; size.height = height; return size; } static inline CGVector CGVectorMake(CGFloat dx, CGFloat dy) { CGVector vector; vector.dx = dx; vector.dy = dy; return vector; } static inline CGRect CGRectMake(CGFloat x, CGFloat y, CGFloat width, CGFloat height) { CGRect rect; rect.origin.x = x; rect.origin.y = y; rect.size.width = width; rect.size.height = height; return rect; } static inline bool __CGPointEqualToPoint(CGPoint point1, CGPoint point2) { return point1.x == point2.x && point1.y == point2.y; } static inline bool __CGSizeEqualToSize(CGSize size1, CGSize size2) { return size1.width == size2.width && size1.height == size2.height; } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef CGPoint NSPoint; typedef NSPoint *NSPointPointer; typedef NSPoint *NSPointArray; typedef CGSize NSSize; typedef NSSize *NSSizePointer; typedef NSSize *NSSizeArray; typedef CGRect NSRect; typedef NSRect *NSRectPointer; typedef NSRect *NSRectArray; typedef NSUInteger NSRectEdge; enum { NSRectEdgeMinX = CGRectMinXEdge, NSRectEdgeMinY = CGRectMinYEdge, NSRectEdgeMaxX = CGRectMaxXEdge, NSRectEdgeMaxY = CGRectMaxYEdge, NSMinXEdge __attribute__((availability(swift, unavailable, message="Use NSRectEdge.MinX instead"))) = NSRectEdgeMinX, NSMinYEdge __attribute__((availability(swift, unavailable, message="Use NSRectEdge.MinY instead"))) = NSRectEdgeMinY, NSMaxXEdge __attribute__((availability(swift, unavailable, message="Use NSRectEdge.MaxX instead"))) = NSRectEdgeMaxX, NSMaxYEdge __attribute__((availability(swift, unavailable, message="Use NSRectEdge.MaxY instead"))) = NSRectEdgeMaxY, }; typedef struct NSEdgeInsets { CGFloat top; CGFloat left; CGFloat bottom; CGFloat right; } NSEdgeInsets; typedef unsigned long long NSAlignmentOptions; enum { NSAlignMinXInward = 1ULL << 0, NSAlignMinYInward = 1ULL << 1, NSAlignMaxXInward = 1ULL << 2, NSAlignMaxYInward = 1ULL << 3, NSAlignWidthInward = 1ULL << 4, NSAlignHeightInward = 1ULL << 5, NSAlignMinXOutward = 1ULL << 8, NSAlignMinYOutward = 1ULL << 9, NSAlignMaxXOutward = 1ULL << 10, NSAlignMaxYOutward = 1ULL << 11, NSAlignWidthOutward = 1ULL << 12, NSAlignHeightOutward = 1ULL << 13, NSAlignMinXNearest = 1ULL << 16, NSAlignMinYNearest = 1ULL << 17, NSAlignMaxXNearest = 1ULL << 18, NSAlignMaxYNearest = 1ULL << 19, NSAlignWidthNearest = 1ULL << 20, NSAlignHeightNearest = 1ULL << 21, NSAlignRectFlipped = 1ULL << 63, NSAlignAllEdgesInward = NSAlignMinXInward|NSAlignMaxXInward|NSAlignMinYInward|NSAlignMaxYInward, NSAlignAllEdgesOutward = NSAlignMinXOutward|NSAlignMaxXOutward|NSAlignMinYOutward|NSAlignMaxYOutward, NSAlignAllEdgesNearest = NSAlignMinXNearest|NSAlignMaxXNearest|NSAlignMinYNearest|NSAlignMaxYNearest, }; // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif extern "C" const NSPoint NSZeroPoint; extern "C" const NSSize NSZeroSize; extern "C" const NSRect NSZeroRect; extern "C" const NSEdgeInsets NSEdgeInsetsZero __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); static __inline__ __attribute__((always_inline)) NSPoint NSMakePoint(CGFloat x, CGFloat y) { NSPoint p; p.x = x; p.y = y; return p; } static __inline__ __attribute__((always_inline)) NSSize NSMakeSize(CGFloat w, CGFloat h) { NSSize s; s.width = w; s.height = h; return s; } static __inline__ __attribute__((always_inline)) NSRect NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h) { NSRect r; r.origin.x = x; r.origin.y = y; r.size.width = w; r.size.height = h; return r; } static __inline__ __attribute__((always_inline)) CGFloat NSMaxX(NSRect aRect) { return (aRect.origin.x + aRect.size.width); } static __inline__ __attribute__((always_inline)) CGFloat NSMaxY(NSRect aRect) { return (aRect.origin.y + aRect.size.height); } static __inline__ __attribute__((always_inline)) CGFloat NSMidX(NSRect aRect) { return (aRect.origin.x + aRect.size.width * (CGFloat)0.5); } static __inline__ __attribute__((always_inline)) CGFloat NSMidY(NSRect aRect) { return (aRect.origin.y + aRect.size.height * (CGFloat)0.5); } static __inline__ __attribute__((always_inline)) CGFloat NSMinX(NSRect aRect) { return (aRect.origin.x); } static __inline__ __attribute__((always_inline)) CGFloat NSMinY(NSRect aRect) { return (aRect.origin.y); } static __inline__ __attribute__((always_inline)) CGFloat NSWidth(NSRect aRect) { return (aRect.size.width); } static __inline__ __attribute__((always_inline)) CGFloat NSHeight(NSRect aRect) { return (aRect.size.height); } static __inline__ __attribute__((always_inline)) NSRect NSRectFromCGRect(CGRect cgrect) { union _ {NSRect ns; CGRect cg;}; return ((union _ *)&cgrect)->ns; } static __inline__ __attribute__((always_inline)) CGRect NSRectToCGRect(NSRect nsrect) { union _ {NSRect ns; CGRect cg;}; return ((union _ *)&nsrect)->cg; } static __inline__ __attribute__((always_inline)) NSPoint NSPointFromCGPoint(CGPoint cgpoint) { union _ {NSPoint ns; CGPoint cg;}; return ((union _ *)&cgpoint)->ns; } static __inline__ __attribute__((always_inline)) CGPoint NSPointToCGPoint(NSPoint nspoint) { union _ {NSPoint ns; CGPoint cg;}; return ((union _ *)&nspoint)->cg; } static __inline__ __attribute__((always_inline)) NSSize NSSizeFromCGSize(CGSize cgsize) { union _ {NSSize ns; CGSize cg;}; return ((union _ *)&cgsize)->ns; } static __inline__ __attribute__((always_inline)) CGSize NSSizeToCGSize(NSSize nssize) { union _ {NSSize ns; CGSize cg;}; return ((union _ *)&nssize)->cg; } static __inline__ __attribute__((always_inline)) NSEdgeInsets NSEdgeInsetsMake(CGFloat top, CGFloat left, CGFloat bottom, CGFloat right) { NSEdgeInsets e; e.top = top; e.left = left; e.bottom = bottom; e.right = right; return e; } extern "C" BOOL NSEqualPoints(NSPoint aPoint, NSPoint bPoint); extern "C" BOOL NSEqualSizes(NSSize aSize, NSSize bSize); extern "C" BOOL NSEqualRects(NSRect aRect, NSRect bRect); extern "C" BOOL NSIsEmptyRect(NSRect aRect); extern "C" BOOL NSEdgeInsetsEqual(NSEdgeInsets aInsets, NSEdgeInsets bInsets) __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSRect NSInsetRect(NSRect aRect, CGFloat dX, CGFloat dY); extern "C" NSRect NSIntegralRect(NSRect aRect); extern "C" NSRect NSIntegralRectWithOptions(NSRect aRect, NSAlignmentOptions opts) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSRect NSUnionRect(NSRect aRect, NSRect bRect); extern "C" NSRect NSIntersectionRect(NSRect aRect, NSRect bRect); extern "C" NSRect NSOffsetRect(NSRect aRect, CGFloat dX, CGFloat dY); extern "C" void NSDivideRect(NSRect inRect, NSRect *slice, NSRect *rem, CGFloat amount, NSRectEdge edge); extern "C" BOOL NSPointInRect(NSPoint aPoint, NSRect aRect); extern "C" BOOL NSMouseInRect(NSPoint aPoint, NSRect aRect, BOOL flipped); extern "C" BOOL NSContainsRect(NSRect aRect, NSRect bRect); extern "C" BOOL NSIntersectsRect(NSRect aRect, NSRect bRect); extern "C" NSString *NSStringFromPoint(NSPoint aPoint); extern "C" NSString *NSStringFromSize(NSSize aSize); extern "C" NSString *NSStringFromRect(NSRect aRect); extern "C" NSPoint NSPointFromString(NSString *aString); extern "C" NSSize NSSizeFromString(NSString *aString); extern "C" NSRect NSRectFromString(NSString *aString); // @interface NSValue (NSValueGeometryExtensions) // + (NSValue *)valueWithPoint:(NSPoint)point; // + (NSValue *)valueWithSize:(NSSize)size; // + (NSValue *)valueWithRect:(NSRect)rect; // + (NSValue *)valueWithEdgeInsets:(NSEdgeInsets)insets __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSPoint pointValue; // @property (readonly) NSSize sizeValue; // @property (readonly) NSRect rectValue; // @property (readonly) NSEdgeInsets edgeInsetsValue __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSCoder (NSGeometryCoding) // - (void)encodePoint:(NSPoint)point; // - (NSPoint)decodePoint; // - (void)encodeSize:(NSSize)size; // - (NSSize)decodeSize; // - (void)encodeRect:(NSRect)rect; // - (NSRect)decodeRect; /* @end */ // @interface NSCoder (NSGeometryKeyedCoding) // - (void)encodePoint:(NSPoint)point forKey:(NSString *)key; // - (void)encodeSize:(NSSize)size forKey:(NSString *)key; // - (void)encodeRect:(NSRect)rect forKey:(NSString *)key; // - (NSPoint)decodePointForKey:(NSString *)key; // - (NSSize)decodeSizeForKey:(NSString *)key; // - (NSRect)decodeRectForKey:(NSString *)key; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSMutableData #define _REWRITER_typedef_NSMutableData typedef struct objc_object NSMutableData; typedef struct {} _objc_exc_NSMutableData; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @protocol NSKeyedArchiverDelegate, NSKeyedUnarchiverDelegate; #pragma clang assume_nonnull begin extern "C" NSExceptionName const NSInvalidArchiveOperationException; extern "C" NSExceptionName const NSInvalidUnarchiveOperationException; extern "C" NSString * const NSKeyedArchiveRootObjectKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #ifndef _REWRITER_typedef_NSKeyedArchiver #define _REWRITER_typedef_NSKeyedArchiver typedef struct objc_object NSKeyedArchiver; typedef struct {} _objc_exc_NSKeyedArchiver; #endif struct NSKeyedArchiver_IMPL { struct NSCoder_IMPL NSCoder_IVARS; }; // - (instancetype)initRequiringSecureCoding:(BOOL)requiresSecureCoding __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // + (nullable NSData *)archivedDataWithRootObject:(id)object requiringSecureCoding:(BOOL)requiresSecureCoding error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (instancetype)init __attribute__((availability(macosx,introduced=10.12,deprecated=10.14,message="Use -initRequiringSecureCoding: instead"))) __attribute__((availability(ios,introduced=10.0,deprecated=12.0,message="Use -initRequiringSecureCoding: instead"))) __attribute__((availability(watchos,introduced=3.0,deprecated=5.0,message="Use -initRequiringSecureCoding: instead"))) __attribute__((availability(tvos,introduced=10.0,deprecated=12.0,message="Use -initRequiringSecureCoding: instead"))); // - (instancetype)initForWritingWithMutableData:(NSMutableData *)data __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use -initRequiringSecureCoding: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use -initRequiringSecureCoding: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use -initRequiringSecureCoding: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use -initRequiringSecureCoding: instead"))); // + (NSData *)archivedDataWithRootObject:(id)rootObject __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: instead"))); // + (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"))); // @property (nullable, assign) id <NSKeyedArchiverDelegate> delegate; // @property NSPropertyListFormat outputFormat; // @property (readonly, strong) NSData *encodedData __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (void)finishEncoding; // + (void)setClassName:(nullable NSString *)codedName forClass:(Class)cls; // - (void)setClassName:(nullable NSString *)codedName forClass:(Class)cls; // + (nullable NSString *)classNameForClass:(Class)cls; // - (nullable NSString *)classNameForClass:(Class)cls; // - (void)encodeObject:(nullable id)object forKey:(NSString *)key; // - (void)encodeConditionalObject:(nullable id)object forKey:(NSString *)key; // - (void)encodeBool:(BOOL)value forKey:(NSString *)key; // - (void)encodeInt:(int)value forKey:(NSString *)key; // - (void)encodeInt32:(int32_t)value forKey:(NSString *)key; // - (void)encodeInt64:(int64_t)value forKey:(NSString *)key; // - (void)encodeFloat:(float)value forKey:(NSString *)key; // - (void)encodeDouble:(double)value forKey:(NSString *)key; // - (void)encodeBytes:(nullable const uint8_t *)bytes length:(NSUInteger)length forKey:(NSString *)key; // @property (readwrite) BOOL requiresSecureCoding __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #ifndef _REWRITER_typedef_NSKeyedUnarchiver #define _REWRITER_typedef_NSKeyedUnarchiver typedef struct objc_object NSKeyedUnarchiver; typedef struct {} _objc_exc_NSKeyedUnarchiver; #endif struct NSKeyedUnarchiver_IMPL { struct NSCoder_IMPL NSCoder_IVARS; }; // - (nullable instancetype)initForReadingFromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // + (nullable id)unarchivedObjectOfClass:(Class)cls fromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((swift_private)); // + (nullable NSArray *)unarchivedArrayOfObjectsOfClass:(Class)cls fromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // + (nullable NSDictionary *)unarchivedDictionaryWithKeysOfClass:(Class)keyCls objectsOfClass:(Class)valueCls fromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // + (nullable id)unarchivedObjectOfClasses:(NSSet<Class> *)classes fromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // + (nullable NSArray *)unarchivedArrayOfObjectsOfClasses:(NSSet<Class> *)classes fromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // + (nullable NSDictionary *)unarchivedDictionaryWithKeysOfClasses:(NSSet<Class> *)keyClasses objectsOfClasses:(NSSet<Class> *)valueClasses fromData:(NSData *)data error:(NSError **)error __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((swift_private)); // - (instancetype)init __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use -initForReadingFromData:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use -initForReadingFromData:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use -initForReadingFromData:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use -initForReadingFromData:error: instead"))); // - (instancetype)initForReadingWithData:(NSData *)data __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use -initForReadingFromData:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use -initForReadingFromData:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use -initForReadingFromData:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use -initForReadingFromData:error: instead"))); // + (nullable id)unarchiveObjectWithData:(NSData *)data __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))); // + (nullable id)unarchiveTopLevelObjectWithData:(NSData *)data error:(NSError **)error __attribute__((availability(macosx,introduced=10.11,deprecated=10.14,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(swift, unavailable, message="Use 'unarchiveTopLevelObjectWithData(_:) throws' instead"))); // + (nullable id)unarchiveObjectWithFile:(NSString *)path __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Use +unarchivedObjectOfClass:fromData:error: instead"))); // @property (nullable, assign) id <NSKeyedUnarchiverDelegate> delegate; // - (void)finishDecoding; // + (void)setClass:(nullable Class)cls forClassName:(NSString *)codedName; // - (void)setClass:(nullable Class)cls forClassName:(NSString *)codedName; // + (nullable Class)classForClassName:(NSString *)codedName; // - (nullable Class)classForClassName:(NSString *)codedName; // - (BOOL)containsValueForKey:(NSString *)key; // - (nullable id)decodeObjectForKey:(NSString *)key; // - (BOOL)decodeBoolForKey:(NSString *)key; // - (int)decodeIntForKey:(NSString *)key; // - (int32_t)decodeInt32ForKey:(NSString *)key; // - (int64_t)decodeInt64ForKey:(NSString *)key; // - (float)decodeFloatForKey:(NSString *)key; // - (double)decodeDoubleForKey:(NSString *)key; // - (nullable const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(nullable NSUInteger *)lengthp __attribute__((objc_returns_inner_pointer)); // @property (readwrite) BOOL requiresSecureCoding __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readwrite) NSDecodingFailurePolicy decodingFailurePolicy __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @protocol NSKeyedArchiverDelegate <NSObject> /* @optional */ // - (nullable id)archiver:(NSKeyedArchiver *)archiver willEncodeObject:(id)object; // - (void)archiver:(NSKeyedArchiver *)archiver didEncodeObject:(nullable id)object; // - (void)archiver:(NSKeyedArchiver *)archiver willReplaceObject:(nullable id)object withObject:(nullable id)newObject; // - (void)archiverWillFinish:(NSKeyedArchiver *)archiver; // - (void)archiverDidFinish:(NSKeyedArchiver *)archiver; /* @end */ // @protocol NSKeyedUnarchiverDelegate <NSObject> /* @optional */ // - (nullable Class)unarchiver:(NSKeyedUnarchiver *)unarchiver cannotDecodeObjectOfClassName:(NSString *)name originalClasses:(NSArray<NSString *> *)classNames; // - (nullable id)unarchiver:(NSKeyedUnarchiver *)unarchiver didDecodeObject:(nullable id) __attribute__((ns_consumed)) object __attribute__((ns_returns_retained)); // - (void)unarchiver:(NSKeyedUnarchiver *)unarchiver willReplaceObject:(id)object withObject:(id)newObject; // - (void)unarchiverWillFinish:(NSKeyedUnarchiver *)unarchiver; // - (void)unarchiverDidFinish:(NSKeyedUnarchiver *)unarchiver; /* @end */ // @interface NSObject (NSKeyedArchiverObjectSubstitution) // @property (nullable, readonly) Class classForKeyedArchiver; // - (nullable id)replacementObjectForKeyedArchiver:(NSKeyedArchiver *)archiver; // + (NSArray<NSString *> *)classFallbacksForKeyedArchiver; /* @end */ // @interface NSObject (NSKeyedUnarchiverObjectSubstitution) // + (Class)classForKeyedUnarchiver; /* @end */ #pragma clang assume_nonnull end // @class NSDate; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #pragma clang assume_nonnull begin // @protocol NSLocking // - (void)lock; // - (void)unlock; /* @end */ #ifndef _REWRITER_typedef_NSLock #define _REWRITER_typedef_NSLock typedef struct objc_object NSLock; typedef struct {} _objc_exc_NSLock; #endif struct NSLock_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_priv; }; // - (BOOL)tryLock; // - (BOOL)lockBeforeDate:(NSDate *)limit; // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #ifndef _REWRITER_typedef_NSConditionLock #define _REWRITER_typedef_NSConditionLock typedef struct objc_object NSConditionLock; typedef struct {} _objc_exc_NSConditionLock; #endif struct NSConditionLock_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_priv; }; // - (instancetype)initWithCondition:(NSInteger)condition __attribute__((objc_designated_initializer)); // @property (readonly) NSInteger condition; // - (void)lockWhenCondition:(NSInteger)condition; // - (BOOL)tryLock; // - (BOOL)tryLockWhenCondition:(NSInteger)condition; // - (void)unlockWithCondition:(NSInteger)condition; // - (BOOL)lockBeforeDate:(NSDate *)limit; // - (BOOL)lockWhenCondition:(NSInteger)condition beforeDate:(NSDate *)limit; // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #ifndef _REWRITER_typedef_NSRecursiveLock #define _REWRITER_typedef_NSRecursiveLock typedef struct objc_object NSRecursiveLock; typedef struct {} _objc_exc_NSRecursiveLock; #endif struct NSRecursiveLock_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_priv; }; // - (BOOL)tryLock; // - (BOOL)lockBeforeDate:(NSDate *)limit; // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSCondition #define _REWRITER_typedef_NSCondition typedef struct objc_object NSCondition; typedef struct {} _objc_exc_NSCondition; #endif struct NSCondition_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_priv; }; // - (void)wait; // - (BOOL)waitUntilDate:(NSDate *)limit; // - (void)signal; // - (void)broadcast; // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSMapTable #define _REWRITER_typedef_NSMapTable typedef struct objc_object NSMapTable; typedef struct {} _objc_exc_NSMapTable; #endif #pragma clang assume_nonnull begin static const NSPointerFunctionsOptions NSMapTableStrongMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsStrongMemory; static const NSPointerFunctionsOptions NSMapTableZeroingWeakMemory __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = NSPointerFunctionsZeroingWeakMemory; static const NSPointerFunctionsOptions NSMapTableCopyIn __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsCopyIn; static const NSPointerFunctionsOptions NSMapTableObjectPointerPersonality __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsObjectPointerPersonality; static const NSPointerFunctionsOptions NSMapTableWeakMemory __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = NSPointerFunctionsWeakMemory; typedef NSUInteger NSMapTableOptions; __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMapTable #define _REWRITER_typedef_NSMapTable typedef struct objc_object NSMapTable; typedef struct {} _objc_exc_NSMapTable; #endif struct NSMapTable_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithKeyOptions:(NSPointerFunctionsOptions)keyOptions valueOptions:(NSPointerFunctionsOptions)valueOptions capacity:(NSUInteger)initialCapacity __attribute__((objc_designated_initializer)); // - (instancetype)initWithKeyPointerFunctions:(NSPointerFunctions *)keyFunctions valuePointerFunctions:(NSPointerFunctions *)valueFunctions capacity:(NSUInteger)initialCapacity __attribute__((objc_designated_initializer)); // + (NSMapTable<KeyType, ObjectType> *)mapTableWithKeyOptions:(NSPointerFunctionsOptions)keyOptions valueOptions:(NSPointerFunctionsOptions)valueOptions; // + (id)mapTableWithStrongToStrongObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (id)mapTableWithWeakToStrongObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (id)mapTableWithStrongToWeakObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (id)mapTableWithWeakToWeakObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSMapTable<KeyType, ObjectType> *)strongToStrongObjectsMapTable __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSMapTable<KeyType, ObjectType> *)weakToStrongObjectsMapTable __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSMapTable<KeyType, ObjectType> *)strongToWeakObjectsMapTable __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSMapTable<KeyType, ObjectType> *)weakToWeakObjectsMapTable __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSPointerFunctions *keyPointerFunctions; // @property (readonly, copy) NSPointerFunctions *valuePointerFunctions; // - (nullable ObjectType)objectForKey:(nullable KeyType)aKey; // - (void)removeObjectForKey:(nullable KeyType)aKey; // - (void)setObject:(nullable ObjectType)anObject forKey:(nullable KeyType)aKey; // @property (readonly) NSUInteger count; // - (NSEnumerator<KeyType> *)keyEnumerator; // - (nullable NSEnumerator<ObjectType> *)objectEnumerator; // - (void)removeAllObjects; // - (NSDictionary<KeyType, ObjectType> *)dictionaryRepresentation; /* @end */ typedef struct {NSUInteger _pi; NSUInteger _si; void * _Nullable _bs;} NSMapEnumerator; extern "C" void NSFreeMapTable(NSMapTable *table); extern "C" void NSResetMapTable(NSMapTable *table); extern "C" BOOL NSCompareMapTables(NSMapTable *table1, NSMapTable *table2); extern "C" NSMapTable *NSCopyMapTableWithZone(NSMapTable *table, NSZone * _Nullable zone); extern "C" BOOL NSMapMember(NSMapTable *table, const void *key, void * _Nullable * _Nullable originalKey, void * _Nullable * _Nullable value); extern "C" void * _Nullable NSMapGet(NSMapTable *table, const void * _Nullable key); extern "C" void NSMapInsert(NSMapTable *table, const void * _Nullable key, const void * _Nullable value); extern "C" void NSMapInsertKnownAbsent(NSMapTable *table, const void * _Nullable key, const void * _Nullable value); extern "C" void * _Nullable NSMapInsertIfAbsent(NSMapTable *table, const void * _Nullable key, const void * _Nullable value); extern "C" void NSMapRemove(NSMapTable *table, const void * _Nullable key); extern "C" NSMapEnumerator NSEnumerateMapTable(NSMapTable *table); extern "C" BOOL NSNextMapEnumeratorPair(NSMapEnumerator *enumerator, void * _Nullable * _Nullable key, void * _Nullable * _Nullable value); extern "C" void NSEndMapTableEnumeration(NSMapEnumerator *enumerator); extern "C" NSUInteger NSCountMapTable(NSMapTable *table); extern "C" NSString *NSStringFromMapTable(NSMapTable *table); extern "C" NSArray *NSAllMapTableKeys(NSMapTable *table); extern "C" NSArray *NSAllMapTableValues(NSMapTable *table); typedef struct { NSUInteger (* _Nullable hash)(NSMapTable *table, const void *); BOOL (* _Nullable isEqual)(NSMapTable *table, const void *, const void *); void (* _Nullable retain)(NSMapTable *table, const void *); void (* _Nullable release)(NSMapTable *table, void *); NSString * _Nullable (* _Nullable describe)(NSMapTable *table, const void *); const void * _Nullable notAKeyMarker; } NSMapTableKeyCallBacks; typedef struct { void (* _Nullable retain)(NSMapTable *table, const void *); void (* _Nullable release)(NSMapTable *table, void *); NSString * _Nullable(* _Nullable describe)(NSMapTable *table, const void *); } NSMapTableValueCallBacks; extern "C" NSMapTable *NSCreateMapTableWithZone(NSMapTableKeyCallBacks keyCallBacks, NSMapTableValueCallBacks valueCallBacks, NSUInteger capacity, NSZone * _Nullable zone); extern "C" NSMapTable *NSCreateMapTable(NSMapTableKeyCallBacks keyCallBacks, NSMapTableValueCallBacks valueCallBacks, NSUInteger capacity); extern "C" const NSMapTableKeyCallBacks NSIntegerMapKeyCallBacks __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" const NSMapTableKeyCallBacks NSNonOwnedPointerMapKeyCallBacks; extern "C" const NSMapTableKeyCallBacks NSNonOwnedPointerOrNullMapKeyCallBacks; extern "C" const NSMapTableKeyCallBacks NSNonRetainedObjectMapKeyCallBacks; extern "C" const NSMapTableKeyCallBacks NSObjectMapKeyCallBacks; extern "C" const NSMapTableKeyCallBacks NSOwnedPointerMapKeyCallBacks; extern "C" const NSMapTableKeyCallBacks NSIntMapKeyCallBacks __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); extern "C" const NSMapTableValueCallBacks NSIntegerMapValueCallBacks __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" const NSMapTableValueCallBacks NSNonOwnedPointerMapValueCallBacks; extern "C" const NSMapTableValueCallBacks NSObjectMapValueCallBacks; extern "C" const NSMapTableValueCallBacks NSNonRetainedObjectMapValueCallBacks; extern "C" const NSMapTableValueCallBacks NSOwnedPointerMapValueCallBacks; extern "C" const NSMapTableValueCallBacks NSIntMapValueCallBacks __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(swift, unavailable, message="NSInvocation and related APIs not available"))) #ifndef _REWRITER_typedef_NSMethodSignature #define _REWRITER_typedef_NSMethodSignature typedef struct objc_object NSMethodSignature; typedef struct {} _objc_exc_NSMethodSignature; #endif struct NSMethodSignature_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (nullable NSMethodSignature *)signatureWithObjCTypes:(const char *)types; // @property (readonly) NSUInteger numberOfArguments; // - (const char *)getArgumentTypeAtIndex:(NSUInteger)idx __attribute__((objc_returns_inner_pointer)); // @property (readonly) NSUInteger frameLength; // - (BOOL)isOneway; // @property (readonly) const char *methodReturnType __attribute__((objc_returns_inner_pointer)); // @property (readonly) NSUInteger methodReturnLength; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSInteger NSGrammaticalGender; enum { NSGrammaticalGenderNotSet = 0, NSGrammaticalGenderFeminine, NSGrammaticalGenderMasculine, NSGrammaticalGenderNeuter, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); typedef NSInteger NSGrammaticalPartOfSpeech; enum { NSGrammaticalPartOfSpeechNotSet = 0, NSGrammaticalPartOfSpeechDeterminer, NSGrammaticalPartOfSpeechPronoun, NSGrammaticalPartOfSpeechLetter, NSGrammaticalPartOfSpeechAdverb, NSGrammaticalPartOfSpeechParticle, NSGrammaticalPartOfSpeechAdjective, NSGrammaticalPartOfSpeechAdposition, NSGrammaticalPartOfSpeechVerb, NSGrammaticalPartOfSpeechNoun, NSGrammaticalPartOfSpeechConjunction, NSGrammaticalPartOfSpeechNumeral, NSGrammaticalPartOfSpeechInterjection, NSGrammaticalPartOfSpeechPreposition, NSGrammaticalPartOfSpeechAbbreviation, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); typedef NSInteger NSGrammaticalNumber; enum { NSGrammaticalNumberNotSet = 0, NSGrammaticalNumberSingular, NSGrammaticalNumberZero, NSGrammaticalNumberPlural, NSGrammaticalNumberPluralTwo, NSGrammaticalNumberPluralFew, NSGrammaticalNumberPluralMany, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)) #ifndef _REWRITER_typedef_NSMorphology #define _REWRITER_typedef_NSMorphology typedef struct objc_object NSMorphology; typedef struct {} _objc_exc_NSMorphology; #endif struct NSMorphology_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (nonatomic) NSGrammaticalGender grammaticalGender; // @property (nonatomic) NSGrammaticalPartOfSpeech partOfSpeech; // @property (nonatomic) NSGrammaticalNumber number; /* @end */ // @class NSMorphologyCustomPronoun; #ifndef _REWRITER_typedef_NSMorphologyCustomPronoun #define _REWRITER_typedef_NSMorphologyCustomPronoun typedef struct objc_object NSMorphologyCustomPronoun; typedef struct {} _objc_exc_NSMorphologyCustomPronoun; #endif __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) // @interface NSMorphology (NSCustomPronouns) // - (nullable NSMorphologyCustomPronoun *)customPronounForLanguage:(NSString *)language; // - (BOOL)setCustomPronoun:(nullable NSMorphologyCustomPronoun *)features forLanguage:(NSString *)language error:(NSError **)error; /* @end */ __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((swift_private)) #ifndef _REWRITER_typedef_NSMorphologyCustomPronoun #define _REWRITER_typedef_NSMorphologyCustomPronoun typedef struct objc_object NSMorphologyCustomPronoun; typedef struct {} _objc_exc_NSMorphologyCustomPronoun; #endif struct NSMorphologyCustomPronoun_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (BOOL)isSupportedForLanguage:(NSString *)language; // + (NSArray<NSString *> *)requiredKeysForLanguage:(NSString *)language; // @property(nullable, copy, nonatomic) NSString *subjectForm; // @property(nullable, copy, nonatomic) NSString *objectForm; // @property(nullable, copy, nonatomic) NSString *possessiveForm; // @property(nullable, copy, nonatomic) NSString *possessiveAdjectiveForm; // @property(nullable, copy, nonatomic) NSString *reflexiveForm; /* @end */ // @interface NSMorphology (NSMorphologyUserSettings) // @property (readonly, getter=isUnspecified) BOOL unspecified __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); @property (class, readonly) NSMorphology *userMorphology __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); /* @end */ #pragma clang assume_nonnull end // @class NSNotification; #ifndef _REWRITER_typedef_NSNotification #define _REWRITER_typedef_NSNotification typedef struct objc_object NSNotification; typedef struct {} _objc_exc_NSNotification; #endif #ifndef _REWRITER_typedef_NSNotificationCenter #define _REWRITER_typedef_NSNotificationCenter typedef struct objc_object NSNotificationCenter; typedef struct {} _objc_exc_NSNotificationCenter; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSPostingStyle; enum { NSPostWhenIdle = 1, NSPostASAP = 2, NSPostNow = 3 }; typedef NSUInteger NSNotificationCoalescing; enum { NSNotificationNoCoalescing = 0, NSNotificationCoalescingOnName = 1, NSNotificationCoalescingOnSender = 2 }; #ifndef _REWRITER_typedef_NSNotificationQueue #define _REWRITER_typedef_NSNotificationQueue typedef struct objc_object NSNotificationQueue; typedef struct {} _objc_exc_NSNotificationQueue; #endif struct NSNotificationQueue_IMPL { struct NSObject_IMPL NSObject_IVARS; id _notificationCenter; id _asapQueue; id _asapObs; id _idleQueue; id _idleObs; }; @property (class, readonly, strong) NSNotificationQueue *defaultQueue; // - (instancetype)initWithNotificationCenter:(NSNotificationCenter *)notificationCenter __attribute__((objc_designated_initializer)); // - (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle; // - (void)enqueueNotification:(NSNotification *)notification postingStyle:(NSPostingStyle)postingStyle coalesceMask:(NSNotificationCoalescing)coalesceMask forModes:(nullable NSArray<NSRunLoopMode> *)modes; // - (void)dequeueNotificationsMatching:(NSNotification *)notification coalesceMask:(NSUInteger)coalesceMask; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSNull #define _REWRITER_typedef_NSNull typedef struct objc_object NSNull; typedef struct {} _objc_exc_NSNull; #endif struct NSNull_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSNull *)null; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSOperation #define _REWRITER_typedef_NSOperation typedef struct objc_object NSOperation; typedef struct {} _objc_exc_NSOperation; #endif struct NSOperation_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (void)start; // - (void)main; // @property (readonly, getter=isCancelled) BOOL cancelled; // - (void)cancel; // @property (readonly, getter=isExecuting) BOOL executing; // @property (readonly, getter=isFinished) BOOL finished; // @property (readonly, getter=isConcurrent) BOOL concurrent; // @property (readonly, getter=isAsynchronous) BOOL asynchronous __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, getter=isReady) BOOL ready; // - (void)addDependency:(NSOperation *)op; // - (void)removeDependency:(NSOperation *)op; // @property (readonly, copy) NSArray<NSOperation *> *dependencies; typedef NSInteger NSOperationQueuePriority; enum { NSOperationQueuePriorityVeryLow = -8L, NSOperationQueuePriorityLow = -4L, NSOperationQueuePriorityNormal = 0, NSOperationQueuePriorityHigh = 4, NSOperationQueuePriorityVeryHigh = 8 }; // @property NSOperationQueuePriority queuePriority; // @property (nullable, copy) void (^completionBlock)(void) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)waitUntilFinished __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property double threadPriority __attribute__((availability(macos,introduced=10.6,deprecated=10.10,message="Not supported"))) __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // @property NSQualityOfService qualityOfService __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSBlockOperation #define _REWRITER_typedef_NSBlockOperation typedef struct objc_object NSBlockOperation; typedef struct {} _objc_exc_NSBlockOperation; #endif struct NSBlockOperation_IMPL { struct NSOperation_IMPL NSOperation_IVARS; }; // + (instancetype)blockOperationWithBlock:(void (^)(void))block; // - (void)addExecutionBlock:(void (^)(void))block; // @property (readonly, copy) NSArray<void (^)(void)> *executionBlocks; /* @end */ __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(swift, unavailable, message="NSInvocation and related APIs not available"))) #ifndef _REWRITER_typedef_NSInvocationOperation #define _REWRITER_typedef_NSInvocationOperation typedef struct objc_object NSInvocationOperation; typedef struct {} _objc_exc_NSInvocationOperation; #endif struct NSInvocationOperation_IMPL { struct NSOperation_IMPL NSOperation_IVARS; }; // - (nullable instancetype)initWithTarget:(id)target selector:(SEL)sel object:(nullable id)arg; // - (instancetype)initWithInvocation:(NSInvocation *)inv __attribute__((objc_designated_initializer)); // @property (readonly, retain) NSInvocation *invocation; // @property (nullable, readonly, retain) id result; /* @end */ extern "C" NSExceptionName const NSInvocationOperationVoidResultException __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSExceptionName const NSInvocationOperationCancelledException __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); static const NSInteger NSOperationQueueDefaultMaxConcurrentOperationCount = -1; __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif struct NSOperationQueue_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, strong) NSProgress *progress __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); // - (void)addOperation:(NSOperation *)op; // - (void)addOperations:(NSArray<NSOperation *> *)ops waitUntilFinished:(BOOL)wait __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)addOperationWithBlock:(void (^)(void))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((swift_async(none))); // - (void)addBarrierBlock:(void (^)(void))barrier __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); // @property NSInteger maxConcurrentOperationCount; // @property (getter=isSuspended) BOOL suspended; // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSQualityOfService qualityOfService __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, assign ) dispatch_queue_t underlyingQueue __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)cancelAllOperations; // - (void)waitUntilAllOperationsAreFinished; @property (class, readonly, strong, nullable) NSOperationQueue *currentQueue __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, strong) NSOperationQueue *mainQueue __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSOperationQueue (NSDeprecated) // @property (readonly, copy) NSArray<__kindof NSOperation *> *operations __attribute__((availability(macos,introduced=10.5,deprecated=100000,message="access to operations is inherently a race condition, it should not be used. For barrier style behaviors please use addBarrierBlock: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="access to operations is inherently a race condition, it should not be used. For barrier style behaviors please use addBarrierBlock: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="access to operations is inherently a race condition, it should not be used. For barrier style behaviors please use addBarrierBlock: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="access to operations is inherently a race condition, it should not be used. For barrier style behaviors please use addBarrierBlock: instead"))); // @property (readonly) NSUInteger operationCount __attribute__((availability(macos,introduced=10.6,deprecated=100000,replacement="progress.completedUnitCount"))) __attribute__((availability(ios,introduced=4.0,deprecated=100000,replacement="progress.completedUnitCount"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="progress.completedUnitCount"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="progress.completedUnitCount"))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSOrthography #define _REWRITER_typedef_NSOrthography typedef struct objc_object NSOrthography; typedef struct {} _objc_exc_NSOrthography; #endif struct NSOrthography_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSString *dominantScript; // @property (readonly, copy) NSDictionary<NSString *, NSArray<NSString *> *> *languageMap; // - (instancetype)initWithDominantScript:(NSString *)script languageMap:(NSDictionary<NSString *, NSArray<NSString *> *> *)map __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); /* @end */ // @interface NSOrthography (NSOrthographyExtended) // - (nullable NSArray<NSString *> *)languagesForScript:(NSString *)script __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSString *)dominantLanguageForScript:(NSString *)script __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *dominantLanguage __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *allScripts __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray<NSString *> *allLanguages __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (instancetype)defaultOrthographyForLanguage:(NSString *)language __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); /* @end */ // @interface NSOrthography (NSOrthographyCreation) // + (instancetype)orthographyWithDominantScript:(NSString *)script languageMap:(NSDictionary<NSString *, NSArray<NSString *> *> *)map __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSPointerArray #define _REWRITER_typedef_NSPointerArray typedef struct objc_object NSPointerArray; typedef struct {} _objc_exc_NSPointerArray; #endif struct NSPointerArray_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithOptions:(NSPointerFunctionsOptions)options __attribute__((objc_designated_initializer)); // - (instancetype)initWithPointerFunctions:(NSPointerFunctions *)functions __attribute__((objc_designated_initializer)); // + (NSPointerArray *)pointerArrayWithOptions:(NSPointerFunctionsOptions)options; // + (NSPointerArray *)pointerArrayWithPointerFunctions:(NSPointerFunctions *)functions; // @property (readonly, copy) NSPointerFunctions *pointerFunctions; // - (nullable void *)pointerAtIndex:(NSUInteger)index; // - (void)addPointer:(nullable void *)pointer; // - (void)removePointerAtIndex:(NSUInteger)index; // - (void)insertPointer:(nullable void *)item atIndex:(NSUInteger)index; // - (void)replacePointerAtIndex:(NSUInteger)index withPointer:(nullable void *)item; // - (void)compact; // @property NSUInteger count; /* @end */ // @interface NSPointerArray (NSPointerArrayConveniences) // + (id) pointerArrayWithStrongObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (id) pointerArrayWithWeakObjects __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="GC no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSPointerArray *)strongObjectsPointerArray __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSPointerArray *)weakObjectsPointerArray __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray *allObjects; /* @end */ #pragma clang assume_nonnull end typedef int NSSocketNativeHandle; // @class NSRunLoop; #ifndef _REWRITER_typedef_NSRunLoop #define _REWRITER_typedef_NSRunLoop typedef struct objc_object NSRunLoop; typedef struct {} _objc_exc_NSRunLoop; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif // @class NSConnection; #ifndef _REWRITER_typedef_NSConnection #define _REWRITER_typedef_NSConnection typedef struct objc_object NSConnection; typedef struct {} _objc_exc_NSConnection; #endif #ifndef _REWRITER_typedef_NSPortMessage #define _REWRITER_typedef_NSPortMessage typedef struct objc_object NSPortMessage; typedef struct {} _objc_exc_NSPortMessage; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @protocol NSPortDelegate, NSMachPortDelegate; #pragma clang assume_nonnull begin extern "C" NSNotificationName const NSPortDidBecomeInvalidNotification; #ifndef _REWRITER_typedef_NSPort #define _REWRITER_typedef_NSPort typedef struct objc_object NSPort; typedef struct {} _objc_exc_NSPort; #endif struct NSPort_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSPort *)port; // - (void)invalidate; // @property (readonly, getter=isValid) BOOL valid; // - (void)setDelegate:(nullable id <NSPortDelegate>)anObject; // - (nullable id <NSPortDelegate>)delegate; // - (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode; // - (void)removeFromRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode; // @property (readonly) NSUInteger reservedSpaceLength; // - (BOOL)sendBeforeDate:(NSDate *)limitDate components:(nullable NSMutableArray *)components from:(nullable NSPort *) receivePort reserved:(NSUInteger)headerSpaceReserved; // - (BOOL)sendBeforeDate:(NSDate *)limitDate msgid:(NSUInteger)msgID components:(nullable NSMutableArray *)components from:(nullable NSPort *)receivePort reserved:(NSUInteger)headerSpaceReserved; // - (void)addConnection:(NSConnection *)conn toRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); // - (void)removeConnection:(NSConnection *)conn fromRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); /* @end */ // @protocol NSPortDelegate <NSObject> /* @optional */ // - (void)handlePortMessage:(NSPortMessage *)message; /* @end */ __attribute__((objc_arc_weak_reference_unavailable)) #ifndef _REWRITER_typedef_NSMachPort #define _REWRITER_typedef_NSMachPort typedef struct objc_object NSMachPort; typedef struct {} _objc_exc_NSMachPort; #endif struct NSMachPort_IMPL { struct NSPort_IMPL NSPort_IVARS; id _delegate; NSUInteger _flags; uint32_t _machPort; NSUInteger _reserved; }; // + (NSPort *)portWithMachPort:(uint32_t)machPort; // - (instancetype)initWithMachPort:(uint32_t)machPort __attribute__((objc_designated_initializer)); // - (void)setDelegate:(nullable id <NSMachPortDelegate>)anObject; // - (nullable id <NSMachPortDelegate>)delegate; typedef NSUInteger NSMachPortOptions; enum { NSMachPortDeallocateNone = 0, NSMachPortDeallocateSendRight = (1UL << 0), NSMachPortDeallocateReceiveRight = (1UL << 1) } __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSPort *)portWithMachPort:(uint32_t)machPort options:(NSMachPortOptions)f __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithMachPort:(uint32_t)machPort options:(NSMachPortOptions)f __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // @property (readonly) uint32_t machPort; // - (void)scheduleInRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode; // - (void)removeFromRunLoop:(NSRunLoop *)runLoop forMode:(NSRunLoopMode)mode; /* @end */ // @protocol NSMachPortDelegate <NSPortDelegate> /* @optional */ // - (void)handleMachMessage:(void *)msg; /* @end */ __attribute__((objc_arc_weak_reference_unavailable)) #ifndef _REWRITER_typedef_NSMessagePort #define _REWRITER_typedef_NSMessagePort typedef struct objc_object NSMessagePort; typedef struct {} _objc_exc_NSMessagePort; #endif struct NSMessagePort_IMPL { struct NSPort_IMPL NSPort_IVARS; void *_port; id _delegate; }; /* @end */ #ifndef _REWRITER_typedef_NSSocketPort #define _REWRITER_typedef_NSSocketPort typedef struct objc_object NSSocketPort; typedef struct {} _objc_exc_NSSocketPort; #endif struct NSSocketPort_IMPL { struct NSPort_IMPL NSPort_IVARS; void *_receiver; id _connectors; void *_loops; void *_data; id _signature; id _delegate; id _lock; NSUInteger _maxSize; NSUInteger _useCount; NSUInteger _reserved; }; // - (instancetype)init; // - (nullable instancetype)initWithTCPPort:(unsigned short)port; // - (nullable instancetype)initWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol address:(NSData *)address __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol socket:(NSSocketNativeHandle)sock __attribute__((objc_designated_initializer)); // - (nullable instancetype)initRemoteWithTCPPort:(unsigned short)port host:(nullable NSString *)hostName; // - (instancetype)initRemoteWithProtocolFamily:(int)family socketType:(int)type protocol:(int)protocol address:(NSData *)address __attribute__((objc_designated_initializer)); // @property (readonly) int protocolFamily; // @property (readonly) int socketType; // @property (readonly) int protocol; // @property (readonly, copy) NSData *address; // @property (readonly) NSSocketNativeHandle socket; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin enum { NSWindowsNTOperatingSystem = 1, NSWindows95OperatingSystem, NSSolarisOperatingSystem, NSHPUXOperatingSystem, NSMACHOperatingSystem, NSSunOSOperatingSystem, NSOSF1OperatingSystem } __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); typedef struct { NSInteger majorVersion; NSInteger minorVersion; NSInteger patchVersion; } NSOperatingSystemVersion; // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSProcessInfo #define _REWRITER_typedef_NSProcessInfo typedef struct objc_object NSProcessInfo; typedef struct {} _objc_exc_NSProcessInfo; #endif struct NSProcessInfo_IMPL { struct NSObject_IMPL NSObject_IVARS; NSDictionary *environment; NSArray *arguments; NSString *hostName; NSString *name; NSInteger automaticTerminationOptOutCounter; }; @property (class, readonly, strong) NSProcessInfo *processInfo; // @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment; // @property (readonly, copy) NSArray<NSString *> *arguments; // @property (readonly, copy) NSString *hostName; // @property (copy) NSString *processName; // @property (readonly) int processIdentifier; // @property (readonly, copy) NSString *globallyUniqueString; // - (NSUInteger)operatingSystem __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="-operatingSystem always returns NSMACHOperatingSystem, use -operatingSystemVersion or -isOperatingSystemAtLeastVersion: instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="-operatingSystem always returns NSMACHOperatingSystem, use -operatingSystemVersion or -isOperatingSystemAtLeastVersion: instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="-operatingSystem always returns NSMACHOperatingSystem, use -operatingSystemVersion or -isOperatingSystemAtLeastVersion: instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="-operatingSystem always returns NSMACHOperatingSystem, use -operatingSystemVersion or -isOperatingSystemAtLeastVersion: instead"))); // - (NSString *)operatingSystemName __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="-operatingSystemName always returns NSMACHOperatingSystem, use -operatingSystemVersionString instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="-operatingSystemName always returns NSMACHOperatingSystem, use -operatingSystemVersionString instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="-operatingSystemName always returns NSMACHOperatingSystem, use -operatingSystemVersionString instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="-operatingSystemName always returns NSMACHOperatingSystem, use -operatingSystemVersionString instead"))); // @property (readonly, copy) NSString *operatingSystemVersionString; // @property (readonly) NSOperatingSystemVersion operatingSystemVersion __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSUInteger processorCount __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSUInteger activeProcessorCount __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) unsigned long long physicalMemory __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL) isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSTimeInterval systemUptime __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)disableSuddenTermination __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)enableSuddenTermination __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)disableAutomaticTermination:(NSString *)reason __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)enableAutomaticTermination:(NSString *)reason __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property BOOL automaticTerminationSupportEnabled __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ typedef uint64_t NSActivityOptions; enum { NSActivityIdleDisplaySleepDisabled = (1ULL << 40), NSActivityIdleSystemSleepDisabled = (1ULL << 20), NSActivitySuddenTerminationDisabled = (1ULL << 14), NSActivityAutomaticTerminationDisabled = (1ULL << 15), NSActivityUserInitiated = (0x00FFFFFFULL | NSActivityIdleSystemSleepDisabled), NSActivityUserInitiatedAllowingIdleSystemSleep = (NSActivityUserInitiated & ~NSActivityIdleSystemSleepDisabled), NSActivityBackground = 0x000000FFULL, NSActivityLatencyCritical = 0xFF00000000ULL, } __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @interface NSProcessInfo (NSProcessInfoActivity) // - (id <NSObject>)beginActivityWithOptions:(NSActivityOptions)options reason:(NSString *)reason __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)endActivity:(id <NSObject>)activity __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)performActivityWithOptions:(NSActivityOptions)options reason:(NSString *)reason usingBlock:(void (^)(void))block __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)performExpiringActivityWithReason:(NSString *)reason usingBlock:(void(^)(BOOL expired))block __attribute__((availability(ios,introduced=8.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); /* @end */ // @interface NSProcessInfo (NSUserInformation) // @property (readonly, copy) NSString *userName __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly, copy) NSString *fullUserName __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ typedef NSInteger NSProcessInfoThermalState; enum { NSProcessInfoThermalStateNominal, NSProcessInfoThermalStateFair, NSProcessInfoThermalStateSerious, NSProcessInfoThermalStateCritical } __attribute__((availability(macosx,introduced=10.10.3))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @interface NSProcessInfo (NSProcessInfoThermalState) // @property (readonly) NSProcessInfoThermalState thermalState __attribute__((availability(macosx,introduced=10.10.3))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); /* @end */ // @interface NSProcessInfo (NSProcessInfoPowerState) // @property (readonly, getter=isLowPowerModeEnabled) BOOL lowPowerModeEnabled __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSProcessInfoThermalStateDidChangeNotification __attribute__((availability(macosx,introduced=10.10.3))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); extern "C" NSNotificationName const NSProcessInfoPowerStateDidChangeNotification __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @interface NSProcessInfo (NSProcessInfoPlatform) // @property (readonly, getter=isMacCatalystApp) BOOL macCatalystApp __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly, getter=isiOSAppOnMac) BOOL iOSAppOnMac __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); /* @end */ #pragma clang assume_nonnull end // @class NSMethodSignature; #ifndef _REWRITER_typedef_NSMethodSignature #define _REWRITER_typedef_NSMethodSignature typedef struct objc_object NSMethodSignature; typedef struct {} _objc_exc_NSMethodSignature; #endif #ifndef _REWRITER_typedef_NSInvocation #define _REWRITER_typedef_NSInvocation typedef struct objc_object NSInvocation; typedef struct {} _objc_exc_NSInvocation; #endif #pragma clang assume_nonnull begin __attribute__((objc_root_class)) #ifndef _REWRITER_typedef_NSProxy #define _REWRITER_typedef_NSProxy typedef struct objc_object NSProxy; typedef struct {} _objc_exc_NSProxy; #endif struct NSProxy_IMPL { Class isa; }; // + (id)alloc; // + (id)allocWithZone:(nullable NSZone *)zone ; // + (Class)class; // - (void)forwardInvocation:(NSInvocation *)invocation; // - (nullable NSMethodSignature *)methodSignatureForSelector:(SEL)sel __attribute__((availability(swift, unavailable, message="NSInvocation and related APIs not available"))); // - (void)dealloc; // - (void)finalize; // @property (readonly, copy) NSString *description; // @property (readonly, copy) NSString *debugDescription; // + (BOOL)respondsToSelector:(SEL)aSelector; // - (BOOL)allowsWeakReference __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)retainWeakReference __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif #ifndef _REWRITER_typedef_NSOrthography #define _REWRITER_typedef_NSOrthography typedef struct objc_object NSOrthography; typedef struct {} _objc_exc_NSOrthography; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSRegularExpression #define _REWRITER_typedef_NSRegularExpression typedef struct objc_object NSRegularExpression; typedef struct {} _objc_exc_NSRegularExpression; #endif #pragma clang assume_nonnull begin typedef uint64_t NSTextCheckingType; enum { NSTextCheckingTypeOrthography = 1ULL << 0, NSTextCheckingTypeSpelling = 1ULL << 1, NSTextCheckingTypeGrammar = 1ULL << 2, NSTextCheckingTypeDate = 1ULL << 3, NSTextCheckingTypeAddress = 1ULL << 4, NSTextCheckingTypeLink = 1ULL << 5, NSTextCheckingTypeQuote = 1ULL << 6, NSTextCheckingTypeDash = 1ULL << 7, NSTextCheckingTypeReplacement = 1ULL << 8, NSTextCheckingTypeCorrection = 1ULL << 9, NSTextCheckingTypeRegularExpression __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1ULL << 10, NSTextCheckingTypePhoneNumber __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1ULL << 11, NSTextCheckingTypeTransitInformation __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1ULL << 12 }; typedef uint64_t NSTextCheckingTypes; enum { NSTextCheckingAllSystemTypes = 0xffffffffULL, NSTextCheckingAllCustomTypes = 0xffffffffULL << 32, NSTextCheckingAllTypes = (NSTextCheckingAllSystemTypes | NSTextCheckingAllCustomTypes) }; typedef NSString *NSTextCheckingKey __attribute__((swift_wrapper(struct))); __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSTextCheckingResult #define _REWRITER_typedef_NSTextCheckingResult typedef struct objc_object NSTextCheckingResult; typedef struct {} _objc_exc_NSTextCheckingResult; #endif struct NSTextCheckingResult_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSTextCheckingType resultType; // @property (readonly) NSRange range; /* @end */ // @interface NSTextCheckingResult (NSTextCheckingResultOptional) // @property (nullable, readonly, copy) NSOrthography *orthography; // @property (nullable, readonly, copy) NSArray<NSDictionary<NSString *, id> *> *grammarDetails; // @property (nullable, readonly, copy) NSDate *date; // @property (nullable, readonly, copy) NSTimeZone *timeZone; // @property (readonly) NSTimeInterval duration; // @property (nullable, readonly, copy) NSDictionary<NSTextCheckingKey, NSString *> *components __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURL *URL; // @property (nullable, readonly, copy) NSString *replacementString; // @property (nullable, readonly, copy) NSArray<NSString *> *alternativeStrings __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSRegularExpression *regularExpression __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSString *phoneNumber __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSUInteger numberOfRanges __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSRange)rangeAtIndex:(NSUInteger)idx __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSRange)rangeWithName:(NSString *)name __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // - (NSTextCheckingResult *)resultByAdjustingRangesWithOffset:(NSInteger)offset __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSDictionary<NSTextCheckingKey, NSString *> *addressComponents; /* @end */ extern "C" NSTextCheckingKey const NSTextCheckingNameKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingJobTitleKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingOrganizationKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingStreetKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingCityKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingStateKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingZIPKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingCountryKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingPhoneKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingAirlineKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSTextCheckingKey const NSTextCheckingFlightKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @interface NSTextCheckingResult (NSTextCheckingResultCreation) // + (NSTextCheckingResult *)orthographyCheckingResultWithRange:(NSRange)range orthography:(NSOrthography *)orthography; // + (NSTextCheckingResult *)spellCheckingResultWithRange:(NSRange)range; // + (NSTextCheckingResult *)grammarCheckingResultWithRange:(NSRange)range details:(NSArray<NSDictionary<NSString *, id> *> *)details; // + (NSTextCheckingResult *)dateCheckingResultWithRange:(NSRange)range date:(NSDate *)date; // + (NSTextCheckingResult *)dateCheckingResultWithRange:(NSRange)range date:(NSDate *)date timeZone:(NSTimeZone *)timeZone duration:(NSTimeInterval)duration; // + (NSTextCheckingResult *)addressCheckingResultWithRange:(NSRange)range components:(NSDictionary<NSTextCheckingKey, NSString *> *)components; // + (NSTextCheckingResult *)linkCheckingResultWithRange:(NSRange)range URL:(NSURL *)url; // + (NSTextCheckingResult *)quoteCheckingResultWithRange:(NSRange)range replacementString:(NSString *)replacementString; // + (NSTextCheckingResult *)dashCheckingResultWithRange:(NSRange)range replacementString:(NSString *)replacementString; // + (NSTextCheckingResult *)replacementCheckingResultWithRange:(NSRange)range replacementString:(NSString *)replacementString; // + (NSTextCheckingResult *)correctionCheckingResultWithRange:(NSRange)range replacementString:(NSString *)replacementString; // + (NSTextCheckingResult *)correctionCheckingResultWithRange:(NSRange)range replacementString:(NSString *)replacementString alternativeStrings:(NSArray<NSString *> *)alternativeStrings __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSTextCheckingResult *)regularExpressionCheckingResultWithRanges:(NSRangePointer)ranges count:(NSUInteger)count regularExpression:(NSRegularExpression *)regularExpression __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSTextCheckingResult *)phoneNumberCheckingResultWithRange:(NSRange)range phoneNumber:(NSString *)phoneNumber __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSTextCheckingResult *)transitInformationCheckingResultWithRange:(NSRange)range components:(NSDictionary<NSTextCheckingKey, NSString *> *)components __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSRegularExpressionOptions; enum { NSRegularExpressionCaseInsensitive = 1 << 0, NSRegularExpressionAllowCommentsAndWhitespace = 1 << 1, NSRegularExpressionIgnoreMetacharacters = 1 << 2, NSRegularExpressionDotMatchesLineSeparators = 1 << 3, NSRegularExpressionAnchorsMatchLines = 1 << 4, NSRegularExpressionUseUnixLineSeparators = 1 << 5, NSRegularExpressionUseUnicodeWordBoundaries = 1 << 6 }; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSRegularExpression #define _REWRITER_typedef_NSRegularExpression typedef struct objc_object NSRegularExpression; typedef struct {} _objc_exc_NSRegularExpression; #endif struct NSRegularExpression_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *_pattern; NSUInteger _options; void *_internal; id _reserved1; int32_t _checkout; int32_t _reserved2; }; // + (nullable NSRegularExpression *)regularExpressionWithPattern:(NSString *)pattern options:(NSRegularExpressionOptions)options error:(NSError **)error; // - (nullable instancetype)initWithPattern:(NSString *)pattern options:(NSRegularExpressionOptions)options error:(NSError **)error __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSString *pattern; // @property (readonly) NSRegularExpressionOptions options; // @property (readonly) NSUInteger numberOfCaptureGroups; // + (NSString *)escapedPatternForString:(NSString *)string; /* @end */ typedef NSUInteger NSMatchingOptions; enum { NSMatchingReportProgress = 1 << 0, NSMatchingReportCompletion = 1 << 1, NSMatchingAnchored = 1 << 2, NSMatchingWithTransparentBounds = 1 << 3, NSMatchingWithoutAnchoringBounds = 1 << 4 }; typedef NSUInteger NSMatchingFlags; enum { NSMatchingProgress = 1 << 0, NSMatchingCompleted = 1 << 1, NSMatchingHitEnd = 1 << 2, NSMatchingRequiredEnd = 1 << 3, NSMatchingInternalError = 1 << 4 }; // @interface NSRegularExpression (NSMatching) // - (void)enumerateMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range usingBlock:(void (__attribute__((noescape)) ^)(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL *stop))block; // - (NSArray<NSTextCheckingResult *> *)matchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range; // - (NSUInteger)numberOfMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range; // - (nullable NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range; // - (NSRange)rangeOfFirstMatchInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range; /* @end */ // @interface NSRegularExpression (NSReplacement) // - (NSString *)stringByReplacingMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range withTemplate:(NSString *)templ; // - (NSUInteger)replaceMatchesInString:(NSMutableString *)string options:(NSMatchingOptions)options range:(NSRange)range withTemplate:(NSString *)templ; // - (NSString *)replacementStringForResult:(NSTextCheckingResult *)result inString:(NSString *)string offset:(NSInteger)offset template:(NSString *)templ; // + (NSString *)escapedTemplateForString:(NSString *)string; /* @end */ __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSDataDetector #define _REWRITER_typedef_NSDataDetector typedef struct objc_object NSDataDetector; typedef struct {} _objc_exc_NSDataDetector; #endif struct NSDataDetector_IMPL { struct NSRegularExpression_IMPL NSRegularExpression_IVARS; NSTextCheckingTypes _types; }; // + (nullable NSDataDetector *)dataDetectorWithTypes:(NSTextCheckingTypes)checkingTypes error:(NSError **)error; // - (nullable instancetype)initWithTypes:(NSTextCheckingTypes)checkingTypes error:(NSError **)error __attribute__((objc_designated_initializer)); // @property (readonly) NSTextCheckingTypes checkingTypes; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSSortDescriptor #define _REWRITER_typedef_NSSortDescriptor typedef struct objc_object NSSortDescriptor; typedef struct {} _objc_exc_NSSortDescriptor; #endif struct NSSortDescriptor_IMPL { struct NSObject_IMPL NSObject_IVARS; NSUInteger _sortDescriptorFlags; NSString *_key; SEL _selector; id _selectorOrBlock; }; // + (instancetype)sortDescriptorWithKey:(nullable NSString *)key ascending:(BOOL)ascending __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (instancetype)sortDescriptorWithKey:(nullable NSString *)key ascending:(BOOL)ascending selector:(nullable SEL)selector __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithKey:(nullable NSString *)key ascending:(BOOL)ascending; // - (instancetype)initWithKey:(nullable NSString *)key ascending:(BOOL)ascending selector:(nullable SEL)selector; // - (nullable instancetype)initWithCoder:(NSCoder *)coder; // @property (nullable, readonly, copy) NSString *key; // @property (readonly) BOOL ascending; // @property (nullable, readonly) SEL selector; // - (void)allowEvaluation __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (instancetype)sortDescriptorWithKey:(nullable NSString *)key ascending:(BOOL)ascending comparator:(NSComparator)cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithKey:(nullable NSString *)key ascending:(BOOL)ascending comparator:(NSComparator)cmptr __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSComparator comparator __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSComparisonResult)compareObject:(id)object1 toObject:(id)object2; // @property (readonly, retain) id reversedSortDescriptor; /* @end */ // @interface NSSet<ObjectType> (NSSortDescriptorSorting) // - (NSArray<ObjectType> *)sortedArrayUsingDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSArray<ObjectType> (NSSortDescriptorSorting) // - (NSArray<ObjectType> *)sortedArrayUsingDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors; /* @end */ // @interface NSMutableArray<ObjectType> (NSSortDescriptorSorting) // - (void)sortUsingDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors; /* @end */ // @interface NSOrderedSet<ObjectType> (NSKeyValueSorting) // - (NSArray<ObjectType> *)sortedArrayUsingDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableOrderedSet<ObjectType> (NSKeyValueSorting) // - (void)sortUsingDescriptors:(NSArray<NSSortDescriptor *> *)sortDescriptors __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSHost #define _REWRITER_typedef_NSHost typedef struct objc_object NSHost; typedef struct {} _objc_exc_NSHost; #endif #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif #ifndef _REWRITER_typedef_NSRunLoop #define _REWRITER_typedef_NSRunLoop typedef struct objc_object NSRunLoop; typedef struct {} _objc_exc_NSRunLoop; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @protocol NSStreamDelegate; typedef NSString * NSStreamPropertyKey __attribute__((swift_wrapper(struct))); #pragma clang assume_nonnull begin typedef NSUInteger NSStreamStatus; enum { NSStreamStatusNotOpen = 0, NSStreamStatusOpening = 1, NSStreamStatusOpen = 2, NSStreamStatusReading = 3, NSStreamStatusWriting = 4, NSStreamStatusAtEnd = 5, NSStreamStatusClosed = 6, NSStreamStatusError = 7 }; typedef NSUInteger NSStreamEvent; enum { NSStreamEventNone = 0, NSStreamEventOpenCompleted = 1UL << 0, NSStreamEventHasBytesAvailable = 1UL << 1, NSStreamEventHasSpaceAvailable = 1UL << 2, NSStreamEventErrorOccurred = 1UL << 3, NSStreamEventEndEncountered = 1UL << 4 }; #ifndef _REWRITER_typedef_NSStream #define _REWRITER_typedef_NSStream typedef struct objc_object NSStream; typedef struct {} _objc_exc_NSStream; #endif struct NSStream_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (void)open; // - (void)close; // @property (nullable, assign) id <NSStreamDelegate> delegate; // - (nullable id)propertyForKey:(NSStreamPropertyKey)key; // - (BOOL)setProperty:(nullable id)property forKey:(NSStreamPropertyKey)key; // - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode; // - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode; // @property (readonly) NSStreamStatus streamStatus; // @property (nullable, readonly, copy) NSError *streamError; /* @end */ #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif struct NSInputStream_IMPL { struct NSStream_IMPL NSStream_IVARS; }; // - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len; // - (BOOL)getBuffer:(uint8_t * _Nullable * _Nonnull)buffer length:(NSUInteger *)len; // @property (readonly) BOOL hasBytesAvailable; // - (instancetype)initWithData:(NSData *)data __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); /* @end */ #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif struct NSOutputStream_IMPL { struct NSStream_IMPL NSStream_IVARS; }; // - (NSInteger)write:(const uint8_t *)buffer maxLength:(NSUInteger)len; // @property (readonly) BOOL hasSpaceAvailable; // - (instancetype)initToMemory __attribute__((objc_designated_initializer)); // - (instancetype)initToBuffer:(uint8_t *)buffer capacity:(NSUInteger)capacity __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithURL:(NSURL *)url append:(BOOL)shouldAppend __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); /* @end */ // @interface NSStream (NSSocketStreamCreationExtensions) // + (void)getStreamsToHostWithName:(NSString *)hostname port:(NSInteger)port inputStream:(NSInputStream * _Nullable * _Nullable)inputStream outputStream:(NSOutputStream * _Nullable * _Nullable)outputStream __attribute__((availability(macos,introduced=10.10,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(ios,introduced=8.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(watchos,unavailable))); // + (void)getStreamsToHost:(NSHost *)host port:(NSInteger)port inputStream:(NSInputStream * _Nullable * _Nullable)inputStream outputStream:(NSOutputStream * _Nullable * _Nullable)outputStream __attribute__((availability(macos,introduced=10.3,deprecated=10.10,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @interface NSStream (NSStreamBoundPairCreationExtensions) // + (void)getBoundStreamsWithBufferSize:(NSUInteger)bufferSize inputStream:(NSInputStream * _Nullable * _Nullable)inputStream outputStream:(NSOutputStream * _Nullable * _Nullable)outputStream __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSInputStream (NSInputStreamExtensions) // - (nullable instancetype)initWithFileAtPath:(NSString *)path; // + (nullable instancetype)inputStreamWithData:(NSData *)data; // + (nullable instancetype)inputStreamWithFileAtPath:(NSString *)path; // + (nullable instancetype)inputStreamWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSOutputStream (NSOutputStreamExtensions) // - (nullable instancetype)initToFileAtPath:(NSString *)path append:(BOOL)shouldAppend; // + (instancetype)outputStreamToMemory; // + (instancetype)outputStreamToBuffer:(uint8_t *)buffer capacity:(NSUInteger)capacity; // + (instancetype)outputStreamToFileAtPath:(NSString *)path append:(BOOL)shouldAppend; // + (nullable instancetype)outputStreamWithURL:(NSURL *)url append:(BOOL)shouldAppend __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @protocol NSStreamDelegate <NSObject> /* @optional */ // - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode; /* @end */ extern "C" NSStreamPropertyKey const NSStreamSocketSecurityLevelKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString * NSStreamSocketSecurityLevel __attribute__((swift_wrapper(enum))); extern "C" NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelNone __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelSSLv2 __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelSSLv3 __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelTLSv1 __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelNegotiatedSSL __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamPropertyKey const NSStreamSOCKSProxyConfigurationKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString * NSStreamSOCKSProxyConfiguration __attribute__((swift_wrapper(enum))); extern "C" NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyHostKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyPortKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyVersionKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyUserKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyPasswordKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString * NSStreamSOCKSProxyVersion __attribute__((swift_wrapper(enum))); extern "C" NSStreamSOCKSProxyVersion const NSStreamSOCKSProxyVersion4 __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamSOCKSProxyVersion const NSStreamSOCKSProxyVersion5 __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamPropertyKey const NSStreamDataWrittenToMemoryStreamKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamPropertyKey const NSStreamFileCurrentOffsetKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSErrorDomain const NSStreamSocketSSLErrorDomain __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSErrorDomain const NSStreamSOCKSErrorDomain __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamPropertyKey const NSStreamNetworkServiceType __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSString * NSStreamNetworkServiceTypeValue __attribute__((swift_wrapper(enum))); extern "C" NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeVoIP __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeVideo __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeBackground __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeVoice __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeCallSignaling __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSThread #define _REWRITER_typedef_NSThread typedef struct objc_object NSThread; typedef struct {} _objc_exc_NSThread; #endif struct NSThread_IMPL { struct NSObject_IMPL NSObject_IVARS; id _private; uint8_t _bytes[44]; }; @property (class, readonly, strong) NSThread *currentThread; // + (void)detachNewThreadWithBlock:(void (^)(void))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((swift_async(none))); // + (void)detachNewThreadSelector:(SEL)selector toTarget:(id)target withObject:(nullable id)argument; // + (BOOL)isMultiThreaded; // @property (readonly, retain) NSMutableDictionary *threadDictionary; // + (void)sleepUntilDate:(NSDate *)date; // + (void)sleepForTimeInterval:(NSTimeInterval)ti; // + (void)exit; // + (double)threadPriority; // + (BOOL)setThreadPriority:(double)p; // @property double threadPriority __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSQualityOfService qualityOfService __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSArray<NSNumber *> *callStackReturnAddresses __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, copy) NSArray<NSString *> *callStackSymbols __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSString *name __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSUInteger stackSize __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL isMainThread __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly) BOOL isMainThread __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); @property (class, readonly, strong) NSThread *mainThread __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)init __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (instancetype)initWithTarget:(id)target selector:(SEL)selector object:(nullable id)argument __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithBlock:(void (^)(void))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (readonly, getter=isExecuting) BOOL executing __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, getter=isFinished) BOOL finished __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, getter=isCancelled) BOOL cancelled __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)cancel __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)start __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)main __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSWillBecomeMultiThreadedNotification; extern "C" NSNotificationName const NSDidBecomeSingleThreadedNotification; extern "C" NSNotificationName const NSThreadWillExitNotification; // @interface NSObject (NSThreadPerformAdditions) // - (void)performSelectorOnMainThread:(SEL)aSelector withObject:(nullable id)arg waitUntilDone:(BOOL)wait modes:(nullable NSArray<NSString *> *)array; // - (void)performSelectorOnMainThread:(SEL)aSelector withObject:(nullable id)arg waitUntilDone:(BOOL)wait; // - (void)performSelector:(SEL)aSelector onThread:(NSThread *)thr withObject:(nullable id)arg waitUntilDone:(BOOL)wait modes:(nullable NSArray<NSString *> *)array __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)performSelector:(SEL)aSelector onThread:(NSThread *)thr withObject:(nullable id)arg waitUntilDone:(BOOL)wait __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)performSelectorInBackground:(SEL)aSelector withObject:(nullable id)arg __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSLocale #define _REWRITER_typedef_NSLocale typedef struct objc_object NSLocale; typedef struct {} _objc_exc_NSLocale; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif struct NSTimeZone_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, copy) NSString *name; // @property (readonly, copy) NSData *data; // - (NSInteger)secondsFromGMTForDate:(NSDate *)aDate; // - (nullable NSString *)abbreviationForDate:(NSDate *)aDate; // - (BOOL)isDaylightSavingTimeForDate:(NSDate *)aDate; // - (NSTimeInterval)daylightSavingTimeOffsetForDate:(NSDate *)aDate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSDate *)nextDaylightSavingTimeTransitionAfterDate:(NSDate *)aDate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSTimeZone (NSExtendedTimeZone) @property (class, readonly, copy) NSTimeZone *systemTimeZone; // + (void)resetSystemTimeZone; @property (class, copy) NSTimeZone *defaultTimeZone; @property (class, readonly, copy) NSTimeZone *localTimeZone; @property (class, readonly, copy) NSArray<NSString *> *knownTimeZoneNames; @property (class, copy) NSDictionary<NSString *, NSString *> *abbreviationDictionary __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSDictionary<NSString *, NSString *> *)abbreviationDictionary; @property (class, readonly, copy) NSString *timeZoneDataVersion __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSInteger secondsFromGMT; // @property (nullable, readonly, copy) NSString *abbreviation; // @property (readonly, getter=isDaylightSavingTime) BOOL daylightSavingTime; // @property (readonly) NSTimeInterval daylightSavingTimeOffset __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSDate *nextDaylightSavingTimeTransition __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *description; // - (BOOL)isEqualToTimeZone:(NSTimeZone *)aTimeZone; typedef NSInteger NSTimeZoneNameStyle; enum { NSTimeZoneNameStyleStandard, NSTimeZoneNameStyleShortStandard, NSTimeZoneNameStyleDaylightSaving, NSTimeZoneNameStyleShortDaylightSaving, NSTimeZoneNameStyleGeneric, NSTimeZoneNameStyleShortGeneric }; // - (nullable NSString *)localizedName:(NSTimeZoneNameStyle)style locale:(nullable NSLocale *)locale __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSTimeZone (NSTimeZoneCreation) // + (nullable instancetype)timeZoneWithName:(NSString *)tzName; // + (nullable instancetype)timeZoneWithName:(NSString *)tzName data:(nullable NSData *)aData; // - (nullable instancetype)initWithName:(NSString *)tzName; // - (nullable instancetype)initWithName:(NSString *)tzName data:(nullable NSData *)aData; // + (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds; // + (nullable instancetype)timeZoneWithAbbreviation:(NSString *)abbreviation; /* @end */ extern "C" NSNotificationName const NSSystemTimeZoneDidChangeNotification __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSTimer #define _REWRITER_typedef_NSTimer typedef struct objc_object NSTimer; typedef struct {} _objc_exc_NSTimer; #endif struct NSTimer_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo; // + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInvocation *)invocation repeats:(BOOL)yesOrNo; // + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(nullable id)userInfo repeats:(BOOL)yesOrNo; // + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(nullable id)userInfo repeats:(BOOL)yesOrNo; // + (NSTimer *)timerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *timer))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *timer))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (instancetype)initWithFireDate:(NSDate *)date interval:(NSTimeInterval)interval repeats:(BOOL)repeats block:(void (^)(NSTimer *timer))block __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (instancetype)initWithFireDate:(NSDate *)date interval:(NSTimeInterval)ti target:(id)t selector:(SEL)s userInfo:(nullable id)ui repeats:(BOOL)rep __attribute__((objc_designated_initializer)); // - (void)fire; // @property (copy) NSDate *fireDate; // @property (readonly) NSTimeInterval timeInterval; // @property NSTimeInterval tolerance __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)invalidate; // @property (readonly, getter=isValid) BOOL valid; // @property (nullable, readonly, retain) id userInfo; /* @end */ #pragma clang assume_nonnull end // @class NSURLAuthenticationChallenge; #ifndef _REWRITER_typedef_NSURLAuthenticationChallenge #define _REWRITER_typedef_NSURLAuthenticationChallenge typedef struct objc_object NSURLAuthenticationChallenge; typedef struct {} _objc_exc_NSURLAuthenticationChallenge; #endif // @class NSURLCredential; #ifndef _REWRITER_typedef_NSURLCredential #define _REWRITER_typedef_NSURLCredential typedef struct objc_object NSURLCredential; typedef struct {} _objc_exc_NSURLCredential; #endif // @class NSURLProtectionSpace; #ifndef _REWRITER_typedef_NSURLProtectionSpace #define _REWRITER_typedef_NSURLProtectionSpace typedef struct objc_object NSURLProtectionSpace; typedef struct {} _objc_exc_NSURLProtectionSpace; #endif // @class NSURLResponse; #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLAuthenticationChallengeSender <NSObject> // - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; /* @optional */ // - (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge; /* @end */ // @class NSURLAuthenticationChallengeInternal; #ifndef _REWRITER_typedef_NSURLAuthenticationChallengeInternal #define _REWRITER_typedef_NSURLAuthenticationChallengeInternal typedef struct objc_object NSURLAuthenticationChallengeInternal; typedef struct {} _objc_exc_NSURLAuthenticationChallengeInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLAuthenticationChallenge #define _REWRITER_typedef_NSURLAuthenticationChallenge typedef struct objc_object NSURLAuthenticationChallenge; typedef struct {} _objc_exc_NSURLAuthenticationChallenge; #endif struct NSURLAuthenticationChallenge_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLAuthenticationChallengeInternal *_internal; }; // - (instancetype)initWithProtectionSpace:(NSURLProtectionSpace *)space proposedCredential:(nullable NSURLCredential *)credential previousFailureCount:(NSInteger)previousFailureCount failureResponse:(nullable NSURLResponse *)response error:(nullable NSError *)error sender:(id<NSURLAuthenticationChallengeSender>)sender; // - (instancetype)initWithAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge sender:(id<NSURLAuthenticationChallengeSender>)sender; // @property (readonly, copy) NSURLProtectionSpace *protectionSpace; // @property (nullable, readonly, copy) NSURLCredential *proposedCredential; // @property (readonly) NSInteger previousFailureCount; // @property (nullable, readonly, copy) NSURLResponse *failureResponse; // @property (nullable, readonly, copy) NSError *error; // @property (nullable, readonly, retain) id<NSURLAuthenticationChallengeSender> sender; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSUInteger NSURLCacheStoragePolicy; enum { NSURLCacheStorageAllowed, NSURLCacheStorageAllowedInMemoryOnly, NSURLCacheStorageNotAllowed, }; // @class NSCachedURLResponseInternal; #ifndef _REWRITER_typedef_NSCachedURLResponseInternal #define _REWRITER_typedef_NSCachedURLResponseInternal typedef struct objc_object NSCachedURLResponseInternal; typedef struct {} _objc_exc_NSCachedURLResponseInternal; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSURLRequest; #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif // @class NSURLResponse; #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif // @class NSDate; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif // @class NSURLSessionDataTask; #ifndef _REWRITER_typedef_NSURLSessionDataTask #define _REWRITER_typedef_NSURLSessionDataTask typedef struct objc_object NSURLSessionDataTask; typedef struct {} _objc_exc_NSURLSessionDataTask; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSCachedURLResponse #define _REWRITER_typedef_NSCachedURLResponse typedef struct objc_object NSCachedURLResponse; typedef struct {} _objc_exc_NSCachedURLResponse; #endif struct NSCachedURLResponse_IMPL { struct NSObject_IMPL NSObject_IVARS; NSCachedURLResponseInternal *_internal; }; // - (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data; // - (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data userInfo:(nullable NSDictionary *)userInfo storagePolicy:(NSURLCacheStoragePolicy)storagePolicy; // @property (readonly, copy) NSURLResponse *response; // @property (readonly, copy) NSData *data; // @property (nullable, readonly, copy) NSDictionary *userInfo; // @property (readonly) NSURLCacheStoragePolicy storagePolicy; /* @end */ // @class NSURLRequest; #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif // @class NSURLCacheInternal; #ifndef _REWRITER_typedef_NSURLCacheInternal #define _REWRITER_typedef_NSURLCacheInternal typedef struct objc_object NSURLCacheInternal; typedef struct {} _objc_exc_NSURLCacheInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLCache #define _REWRITER_typedef_NSURLCache typedef struct objc_object NSURLCache; typedef struct {} _objc_exc_NSURLCache; #endif struct NSURLCache_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLCacheInternal *_internal; }; @property (class, strong) NSURLCache *sharedURLCache; // - (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity diskPath:(nullable NSString *)path __attribute__((availability(macos,introduced=10.2,deprecated=100000,replacement="initWithMemoryCapacity:diskCapacity:directoryURL:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="initWithMemoryCapacity:diskCapacity:directoryURL:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="initWithMemoryCapacity:diskCapacity:directoryURL:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="initWithMemoryCapacity:diskCapacity:directoryURL:"))); // - (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity directoryURL:(nullable NSURL *)directoryURL __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request; // - (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request; // - (void)removeCachedResponseForRequest:(NSURLRequest *)request; // - (void)removeAllCachedResponses; // - (void)removeCachedResponsesSinceDate:(NSDate *)date __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSUInteger memoryCapacity; // @property NSUInteger diskCapacity; // @property (readonly) NSUInteger currentMemoryUsage; // @property (readonly) NSUInteger currentDiskUsage; /* @end */ // @interface NSURLCache (NSURLSessionTaskAdditions) // - (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forDataTask:(NSURLSessionDataTask *)dataTask __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask completionHandler:(void (^) (NSCachedURLResponse * _Nullable cachedResponse))completionHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @class NSCachedURLResponse; #ifndef _REWRITER_typedef_NSCachedURLResponse #define _REWRITER_typedef_NSCachedURLResponse typedef struct objc_object NSCachedURLResponse; typedef struct {} _objc_exc_NSCachedURLResponse; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @class NSURLAuthenticationChallenge; #ifndef _REWRITER_typedef_NSURLAuthenticationChallenge #define _REWRITER_typedef_NSURLAuthenticationChallenge typedef struct objc_object NSURLAuthenticationChallenge; typedef struct {} _objc_exc_NSURLAuthenticationChallenge; #endif // @class NSURLConnectionInternal; #ifndef _REWRITER_typedef_NSURLConnectionInternal #define _REWRITER_typedef_NSURLConnectionInternal typedef struct objc_object NSURLConnectionInternal; typedef struct {} _objc_exc_NSURLConnectionInternal; #endif // @class NSURLRequest; #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif // @class NSURLResponse; #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif // @class NSRunLoop; #ifndef _REWRITER_typedef_NSRunLoop #define _REWRITER_typedef_NSRunLoop typedef struct objc_object NSRunLoop; typedef struct {} _objc_exc_NSRunLoop; #endif // @class NSInputStream; #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif // @class NSURLProtectionSpace; #ifndef _REWRITER_typedef_NSURLProtectionSpace #define _REWRITER_typedef_NSURLProtectionSpace typedef struct objc_object NSURLProtectionSpace; typedef struct {} _objc_exc_NSURLProtectionSpace; #endif // @class NSOperationQueue; #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif // @protocol NSURLConnectionDelegate; #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLConnection #define _REWRITER_typedef_NSURLConnection typedef struct objc_object NSURLConnection; typedef struct {} _objc_exc_NSURLConnection; #endif struct NSURLConnection_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLConnectionInternal *_internal; }; // - (nullable instancetype)initWithRequest:(NSURLRequest *)request delegate:(nullable id)delegate startImmediately:(BOOL)startImmediately __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(watchos,unavailable))); // - (nullable instancetype)initWithRequest:(NSURLRequest *)request delegate:(nullable id)delegate __attribute__((availability(macos,introduced=10.3,deprecated=10.11,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(watchos,unavailable))); // + (nullable NSURLConnection*)connectionWithRequest:(NSURLRequest *)request delegate:(nullable id)delegate __attribute__((availability(macos,introduced=10.3,deprecated=10.11,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLSession (see NSURLSession.h)"))) __attribute__((availability(watchos,unavailable))); // @property (readonly, copy) NSURLRequest *originalRequest __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSURLRequest *currentRequest __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)start __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)cancel; // - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)unscheduleFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)setDelegateQueue:(nullable NSOperationQueue*) queue __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (BOOL)canHandleRequest:(NSURLRequest *)request; /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLConnectionDelegate <NSObject> /* @optional */ // - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error; // - (BOOL)connectionShouldUseCredentialStorage:(NSURLConnection *)connection; // - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace __attribute__((availability(macos,introduced=10.6,deprecated=10.10,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(ios,introduced=3.0,deprecated=8.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))); // - (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))); // - (void)connection:(NSURLConnection *)connection didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -connection:willSendRequestForAuthenticationChallenge: instead."))); /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLConnectionDataDelegate <NSURLConnectionDelegate> /* @optional */ // - (nullable NSURLRequest *)connection:(NSURLConnection *)connection willSendRequest:(NSURLRequest *)request redirectResponse:(nullable NSURLResponse *)response; // - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response; // - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data; // - (nullable NSInputStream *)connection:(NSURLConnection *)connection needNewBodyStream:(NSURLRequest *)request; #if 0 - (void)connection:(NSURLConnection *)connection didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite; #endif // - (nullable NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse; // - (void)connectionDidFinishLoading:(NSURLConnection *)connection; /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLConnectionDownloadDelegate <NSURLConnectionDelegate> /* @optional */ // - (void)connection:(NSURLConnection *)connection didWriteData:(long long)bytesWritten totalBytesWritten:(long long)totalBytesWritten expectedTotalBytes:(long long) expectedTotalBytes; // - (void)connectionDidResumeDownloading:(NSURLConnection *)connection totalBytesWritten:(long long)totalBytesWritten expectedTotalBytes:(long long) expectedTotalBytes; /* @required */ // - (void)connectionDidFinishDownloading:(NSURLConnection *)connection destinationURL:(NSURL *) destinationURL; /* @end */ // @interface NSURLConnection (NSURLConnectionSynchronousLoading) // + (nullable NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse * _Nullable * _Nullable)response error:(NSError **)error __attribute__((availability(macos,introduced=10.3,deprecated=10.11,message="Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"))) __attribute__((availability(watchos,unavailable))); /* @end */ // @interface NSURLConnection (NSURLConnectionQueuedLoading) #if 0 + (void)sendAsynchronousRequest:(NSURLRequest*) request queue:(NSOperationQueue*) queue completionHandler:(void (^)(NSURLResponse* _Nullable response, NSData* _Nullable data, NSError* _Nullable connectionError)) handler __attribute__((availability(macos,introduced=10.7,deprecated=10.11,message="Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"))) __attribute__((availability(ios,introduced=5.0,deprecated=9.0,message="Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use [NSURLSession dataTaskWithRequest:completionHandler:] (see NSURLSession.h"))) __attribute__((availability(watchos,unavailable))); #endif /* @end */ #pragma clang assume_nonnull end extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) __SecCertificate *SecCertificateRef; typedef struct __SecCertificate OpaqueSecCertificateRef; typedef struct __attribute__((objc_bridge(id))) __SecIdentity *SecIdentityRef; typedef struct __SecIdentity OpaqueSecIdentityRef; typedef struct __attribute__((objc_bridge(id))) __SecKey *SecKeyRef; typedef struct __SecKey OpaqueSecKeyRef; typedef struct __attribute__((objc_bridge(id))) __SecPolicy *SecPolicyRef; typedef struct __attribute__((objc_bridge(id))) __SecAccessControl *SecAccessControlRef; typedef struct __attribute__((objc_bridge(id))) __SecKeychain *SecKeychainRef __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef struct __attribute__((objc_bridge(id))) __SecKeychainItem *SecKeychainItemRef __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __attribute__((objc_bridge(id))) __SecKeychainSearch *SecKeychainSearchRef __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef OSType SecKeychainAttrType __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); struct __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))) SecKeychainAttribute { SecKeychainAttrType tag; UInt32 length; void * _Nullable data; }; typedef struct SecKeychainAttribute SecKeychainAttribute __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef SecKeychainAttribute *SecKeychainAttributePtr __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); struct __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))) SecKeychainAttributeList { UInt32 count; SecKeychainAttribute * _Nullable attr; }; typedef struct SecKeychainAttributeList SecKeychainAttributeList __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef UInt32 SecKeychainStatus __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __attribute__((objc_bridge(id))) __SecTrustedApplication *SecTrustedApplicationRef __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __attribute__((objc_bridge(id))) __SecAccess *SecAccessRef __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __SecAccess OpaqueSecAccessRef; typedef struct __attribute__((objc_bridge(id))) __SecACL *SecACLRef __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __attribute__((objc_bridge(id))) __SecPassword *SecPasswordRef __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); struct __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))) SecKeychainAttributeInfo { UInt32 count; UInt32 *tag; UInt32 * _Nullable format; }; typedef struct SecKeychainAttributeInfo SecKeychainAttributeInfo __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); _Nullable CFStringRef SecCopyErrorMessageString(OSStatus status, void * _Nullable reserved) __attribute__((availability(macosx,introduced=10.3))); enum { errSecSuccess = 0, errSecUnimplemented = -4, errSecDiskFull = -34, errSecDskFull __attribute__((deprecated("use errSecDiskFull"))) = errSecDiskFull, errSecIO = -36, errSecOpWr = -49, errSecParam = -50, errSecWrPerm = -61, errSecAllocate = -108, errSecUserCanceled = -128, errSecBadReq = -909, errSecInternalComponent = -2070, errSecCoreFoundationUnknown = -4960, errSecMissingEntitlement = -34018, errSecRestrictedAPI = -34020, errSecNotAvailable = -25291, errSecReadOnly = -25292, errSecAuthFailed = -25293, errSecNoSuchKeychain = -25294, errSecInvalidKeychain = -25295, errSecDuplicateKeychain = -25296, errSecDuplicateCallback = -25297, errSecInvalidCallback = -25298, errSecDuplicateItem = -25299, errSecItemNotFound = -25300, errSecBufferTooSmall = -25301, errSecDataTooLarge = -25302, errSecNoSuchAttr = -25303, errSecInvalidItemRef = -25304, errSecInvalidSearchRef = -25305, errSecNoSuchClass = -25306, errSecNoDefaultKeychain = -25307, errSecInteractionNotAllowed = -25308, errSecReadOnlyAttr = -25309, errSecWrongSecVersion = -25310, errSecKeySizeNotAllowed = -25311, errSecNoStorageModule = -25312, errSecNoCertificateModule = -25313, errSecNoPolicyModule = -25314, errSecInteractionRequired = -25315, errSecDataNotAvailable = -25316, errSecDataNotModifiable = -25317, errSecCreateChainFailed = -25318, errSecInvalidPrefsDomain = -25319, errSecInDarkWake = -25320, errSecACLNotSimple = -25240, errSecPolicyNotFound = -25241, errSecInvalidTrustSetting = -25242, errSecNoAccessForItem = -25243, errSecInvalidOwnerEdit = -25244, errSecTrustNotAvailable = -25245, errSecUnsupportedFormat = -25256, errSecUnknownFormat = -25257, errSecKeyIsSensitive = -25258, errSecMultiplePrivKeys = -25259, errSecPassphraseRequired = -25260, errSecInvalidPasswordRef = -25261, errSecInvalidTrustSettings = -25262, errSecNoTrustSettings = -25263, errSecPkcs12VerifyFailure = -25264, errSecNotSigner = -26267, errSecDecode = -26275, errSecServiceNotAvailable = -67585, errSecInsufficientClientID = -67586, errSecDeviceReset = -67587, errSecDeviceFailed = -67588, errSecAppleAddAppACLSubject = -67589, errSecApplePublicKeyIncomplete = -67590, errSecAppleSignatureMismatch = -67591, errSecAppleInvalidKeyStartDate = -67592, errSecAppleInvalidKeyEndDate = -67593, errSecConversionError = -67594, errSecAppleSSLv2Rollback = -67595, errSecQuotaExceeded = -67596, errSecFileTooBig = -67597, errSecInvalidDatabaseBlob = -67598, errSecInvalidKeyBlob = -67599, errSecIncompatibleDatabaseBlob = -67600, errSecIncompatibleKeyBlob = -67601, errSecHostNameMismatch = -67602, errSecUnknownCriticalExtensionFlag = -67603, errSecNoBasicConstraints = -67604, errSecNoBasicConstraintsCA = -67605, errSecInvalidAuthorityKeyID = -67606, errSecInvalidSubjectKeyID = -67607, errSecInvalidKeyUsageForPolicy = -67608, errSecInvalidExtendedKeyUsage = -67609, errSecInvalidIDLinkage = -67610, errSecPathLengthConstraintExceeded = -67611, errSecInvalidRoot = -67612, errSecCRLExpired = -67613, errSecCRLNotValidYet = -67614, errSecCRLNotFound = -67615, errSecCRLServerDown = -67616, errSecCRLBadURI = -67617, errSecUnknownCertExtension = -67618, errSecUnknownCRLExtension = -67619, errSecCRLNotTrusted = -67620, errSecCRLPolicyFailed = -67621, errSecIDPFailure = -67622, errSecSMIMEEmailAddressesNotFound = -67623, errSecSMIMEBadExtendedKeyUsage = -67624, errSecSMIMEBadKeyUsage = -67625, errSecSMIMEKeyUsageNotCritical = -67626, errSecSMIMENoEmailAddress = -67627, errSecSMIMESubjAltNameNotCritical = -67628, errSecSSLBadExtendedKeyUsage = -67629, errSecOCSPBadResponse = -67630, errSecOCSPBadRequest = -67631, errSecOCSPUnavailable = -67632, errSecOCSPStatusUnrecognized = -67633, errSecEndOfData = -67634, errSecIncompleteCertRevocationCheck = -67635, errSecNetworkFailure = -67636, errSecOCSPNotTrustedToAnchor = -67637, errSecRecordModified = -67638, errSecOCSPSignatureError = -67639, errSecOCSPNoSigner = -67640, errSecOCSPResponderMalformedReq = -67641, errSecOCSPResponderInternalError = -67642, errSecOCSPResponderTryLater = -67643, errSecOCSPResponderSignatureRequired = -67644, errSecOCSPResponderUnauthorized = -67645, errSecOCSPResponseNonceMismatch = -67646, errSecCodeSigningBadCertChainLength = -67647, errSecCodeSigningNoBasicConstraints = -67648, errSecCodeSigningBadPathLengthConstraint = -67649, errSecCodeSigningNoExtendedKeyUsage = -67650, errSecCodeSigningDevelopment = -67651, errSecResourceSignBadCertChainLength = -67652, errSecResourceSignBadExtKeyUsage = -67653, errSecTrustSettingDeny = -67654, errSecInvalidSubjectName = -67655, errSecUnknownQualifiedCertStatement = -67656, errSecMobileMeRequestQueued = -67657, errSecMobileMeRequestRedirected = -67658, errSecMobileMeServerError = -67659, errSecMobileMeServerNotAvailable = -67660, errSecMobileMeServerAlreadyExists = -67661, errSecMobileMeServerServiceErr = -67662, errSecMobileMeRequestAlreadyPending = -67663, errSecMobileMeNoRequestPending = -67664, errSecMobileMeCSRVerifyFailure = -67665, errSecMobileMeFailedConsistencyCheck = -67666, errSecNotInitialized = -67667, errSecInvalidHandleUsage = -67668, errSecPVCReferentNotFound = -67669, errSecFunctionIntegrityFail = -67670, errSecInternalError = -67671, errSecMemoryError = -67672, errSecInvalidData = -67673, errSecMDSError = -67674, errSecInvalidPointer = -67675, errSecSelfCheckFailed = -67676, errSecFunctionFailed = -67677, errSecModuleManifestVerifyFailed = -67678, errSecInvalidGUID = -67679, errSecInvalidHandle = -67680, errSecInvalidDBList = -67681, errSecInvalidPassthroughID = -67682, errSecInvalidNetworkAddress = -67683, errSecCRLAlreadySigned = -67684, errSecInvalidNumberOfFields = -67685, errSecVerificationFailure = -67686, errSecUnknownTag = -67687, errSecInvalidSignature = -67688, errSecInvalidName = -67689, errSecInvalidCertificateRef = -67690, errSecInvalidCertificateGroup = -67691, errSecTagNotFound = -67692, errSecInvalidQuery = -67693, errSecInvalidValue = -67694, errSecCallbackFailed = -67695, errSecACLDeleteFailed = -67696, errSecACLReplaceFailed = -67697, errSecACLAddFailed = -67698, errSecACLChangeFailed = -67699, errSecInvalidAccessCredentials = -67700, errSecInvalidRecord = -67701, errSecInvalidACL = -67702, errSecInvalidSampleValue = -67703, errSecIncompatibleVersion = -67704, errSecPrivilegeNotGranted = -67705, errSecInvalidScope = -67706, errSecPVCAlreadyConfigured = -67707, errSecInvalidPVC = -67708, errSecEMMLoadFailed = -67709, errSecEMMUnloadFailed = -67710, errSecAddinLoadFailed = -67711, errSecInvalidKeyRef = -67712, errSecInvalidKeyHierarchy = -67713, errSecAddinUnloadFailed = -67714, errSecLibraryReferenceNotFound = -67715, errSecInvalidAddinFunctionTable = -67716, errSecInvalidServiceMask = -67717, errSecModuleNotLoaded = -67718, errSecInvalidSubServiceID = -67719, errSecAttributeNotInContext = -67720, errSecModuleManagerInitializeFailed = -67721, errSecModuleManagerNotFound = -67722, errSecEventNotificationCallbackNotFound = -67723, errSecInputLengthError = -67724, errSecOutputLengthError = -67725, errSecPrivilegeNotSupported = -67726, errSecDeviceError = -67727, errSecAttachHandleBusy = -67728, errSecNotLoggedIn = -67729, errSecAlgorithmMismatch = -67730, errSecKeyUsageIncorrect = -67731, errSecKeyBlobTypeIncorrect = -67732, errSecKeyHeaderInconsistent = -67733, errSecUnsupportedKeyFormat = -67734, errSecUnsupportedKeySize = -67735, errSecInvalidKeyUsageMask = -67736, errSecUnsupportedKeyUsageMask = -67737, errSecInvalidKeyAttributeMask = -67738, errSecUnsupportedKeyAttributeMask = -67739, errSecInvalidKeyLabel = -67740, errSecUnsupportedKeyLabel = -67741, errSecInvalidKeyFormat = -67742, errSecUnsupportedVectorOfBuffers = -67743, errSecInvalidInputVector = -67744, errSecInvalidOutputVector = -67745, errSecInvalidContext = -67746, errSecInvalidAlgorithm = -67747, errSecInvalidAttributeKey = -67748, errSecMissingAttributeKey = -67749, errSecInvalidAttributeInitVector = -67750, errSecMissingAttributeInitVector = -67751, errSecInvalidAttributeSalt = -67752, errSecMissingAttributeSalt = -67753, errSecInvalidAttributePadding = -67754, errSecMissingAttributePadding = -67755, errSecInvalidAttributeRandom = -67756, errSecMissingAttributeRandom = -67757, errSecInvalidAttributeSeed = -67758, errSecMissingAttributeSeed = -67759, errSecInvalidAttributePassphrase = -67760, errSecMissingAttributePassphrase = -67761, errSecInvalidAttributeKeyLength = -67762, errSecMissingAttributeKeyLength = -67763, errSecInvalidAttributeBlockSize = -67764, errSecMissingAttributeBlockSize = -67765, errSecInvalidAttributeOutputSize = -67766, errSecMissingAttributeOutputSize = -67767, errSecInvalidAttributeRounds = -67768, errSecMissingAttributeRounds = -67769, errSecInvalidAlgorithmParms = -67770, errSecMissingAlgorithmParms = -67771, errSecInvalidAttributeLabel = -67772, errSecMissingAttributeLabel = -67773, errSecInvalidAttributeKeyType = -67774, errSecMissingAttributeKeyType = -67775, errSecInvalidAttributeMode = -67776, errSecMissingAttributeMode = -67777, errSecInvalidAttributeEffectiveBits = -67778, errSecMissingAttributeEffectiveBits = -67779, errSecInvalidAttributeStartDate = -67780, errSecMissingAttributeStartDate = -67781, errSecInvalidAttributeEndDate = -67782, errSecMissingAttributeEndDate = -67783, errSecInvalidAttributeVersion = -67784, errSecMissingAttributeVersion = -67785, errSecInvalidAttributePrime = -67786, errSecMissingAttributePrime = -67787, errSecInvalidAttributeBase = -67788, errSecMissingAttributeBase = -67789, errSecInvalidAttributeSubprime = -67790, errSecMissingAttributeSubprime = -67791, errSecInvalidAttributeIterationCount = -67792, errSecMissingAttributeIterationCount = -67793, errSecInvalidAttributeDLDBHandle = -67794, errSecMissingAttributeDLDBHandle = -67795, errSecInvalidAttributeAccessCredentials = -67796, errSecMissingAttributeAccessCredentials = -67797, errSecInvalidAttributePublicKeyFormat = -67798, errSecMissingAttributePublicKeyFormat = -67799, errSecInvalidAttributePrivateKeyFormat = -67800, errSecMissingAttributePrivateKeyFormat = -67801, errSecInvalidAttributeSymmetricKeyFormat = -67802, errSecMissingAttributeSymmetricKeyFormat = -67803, errSecInvalidAttributeWrappedKeyFormat = -67804, errSecMissingAttributeWrappedKeyFormat = -67805, errSecStagedOperationInProgress = -67806, errSecStagedOperationNotStarted = -67807, errSecVerifyFailed = -67808, errSecQuerySizeUnknown = -67809, errSecBlockSizeMismatch = -67810, errSecPublicKeyInconsistent = -67811, errSecDeviceVerifyFailed = -67812, errSecInvalidLoginName = -67813, errSecAlreadyLoggedIn = -67814, errSecInvalidDigestAlgorithm = -67815, errSecInvalidCRLGroup = -67816, errSecCertificateCannotOperate = -67817, errSecCertificateExpired = -67818, errSecCertificateNotValidYet = -67819, errSecCertificateRevoked = -67820, errSecCertificateSuspended = -67821, errSecInsufficientCredentials = -67822, errSecInvalidAction = -67823, errSecInvalidAuthority = -67824, errSecVerifyActionFailed = -67825, errSecInvalidCertAuthority = -67826, errSecInvalidCRLAuthority = -67827, errSecInvaldCRLAuthority __attribute__((availability(macos,introduced=10.11,deprecated=12.0,replacement="errSecInvalidCRLAuthority"))) __attribute__((availability(ios,introduced=4,deprecated=15,replacement="errSecInvalidCRLAuthority"))) = errSecInvalidCRLAuthority, errSecInvalidCRLEncoding = -67828, errSecInvalidCRLType = -67829, errSecInvalidCRL = -67830, errSecInvalidFormType = -67831, errSecInvalidID = -67832, errSecInvalidIdentifier = -67833, errSecInvalidIndex = -67834, errSecInvalidPolicyIdentifiers = -67835, errSecInvalidTimeString = -67836, errSecInvalidReason = -67837, errSecInvalidRequestInputs = -67838, errSecInvalidResponseVector = -67839, errSecInvalidStopOnPolicy = -67840, errSecInvalidTuple = -67841, errSecMultipleValuesUnsupported = -67842, errSecNotTrusted = -67843, errSecNoDefaultAuthority = -67844, errSecRejectedForm = -67845, errSecRequestLost = -67846, errSecRequestRejected = -67847, errSecUnsupportedAddressType = -67848, errSecUnsupportedService = -67849, errSecInvalidTupleGroup = -67850, errSecInvalidBaseACLs = -67851, errSecInvalidTupleCredentials = -67852, errSecInvalidTupleCredendtials __attribute__((availability(macos,introduced=10.11,deprecated=12.0,replacement="errSecInvalidTupleCredentials"))) __attribute__((availability(ios,introduced=4,deprecated=15,replacement="errSecInvalidTupleCredentials"))) = errSecInvalidTupleCredentials, errSecInvalidEncoding = -67853, errSecInvalidValidityPeriod = -67854, errSecInvalidRequestor = -67855, errSecRequestDescriptor = -67856, errSecInvalidBundleInfo = -67857, errSecInvalidCRLIndex = -67858, errSecNoFieldValues = -67859, errSecUnsupportedFieldFormat = -67860, errSecUnsupportedIndexInfo = -67861, errSecUnsupportedLocality = -67862, errSecUnsupportedNumAttributes = -67863, errSecUnsupportedNumIndexes = -67864, errSecUnsupportedNumRecordTypes = -67865, errSecFieldSpecifiedMultiple = -67866, errSecIncompatibleFieldFormat = -67867, errSecInvalidParsingModule = -67868, errSecDatabaseLocked = -67869, errSecDatastoreIsOpen = -67870, errSecMissingValue = -67871, errSecUnsupportedQueryLimits = -67872, errSecUnsupportedNumSelectionPreds = -67873, errSecUnsupportedOperator = -67874, errSecInvalidDBLocation = -67875, errSecInvalidAccessRequest = -67876, errSecInvalidIndexInfo = -67877, errSecInvalidNewOwner = -67878, errSecInvalidModifyMode = -67879, errSecMissingRequiredExtension = -67880, errSecExtendedKeyUsageNotCritical = -67881, errSecTimestampMissing = -67882, errSecTimestampInvalid = -67883, errSecTimestampNotTrusted = -67884, errSecTimestampServiceNotAvailable = -67885, errSecTimestampBadAlg = -67886, errSecTimestampBadRequest = -67887, errSecTimestampBadDataFormat = -67888, errSecTimestampTimeNotAvailable = -67889, errSecTimestampUnacceptedPolicy = -67890, errSecTimestampUnacceptedExtension = -67891, errSecTimestampAddInfoNotAvailable = -67892, errSecTimestampSystemFailure = -67893, errSecSigningTimeMissing = -67894, errSecTimestampRejection = -67895, errSecTimestampWaiting = -67896, errSecTimestampRevocationWarning = -67897, errSecTimestampRevocationNotification = -67898, errSecCertificatePolicyNotAllowed = -67899, errSecCertificateNameNotAllowed = -67900, errSecCertificateValidityPeriodTooLong = -67901, errSecCertificateIsCA = -67902, errSecCertificateDuplicateExtension = -67903, }; enum { errSSLProtocol = -9800, errSSLNegotiation = -9801, errSSLFatalAlert = -9802, errSSLWouldBlock = -9803, errSSLSessionNotFound = -9804, errSSLClosedGraceful = -9805, errSSLClosedAbort = -9806, errSSLXCertChainInvalid = -9807, errSSLBadCert = -9808, errSSLCrypto = -9809, errSSLInternal = -9810, errSSLModuleAttach = -9811, errSSLUnknownRootCert = -9812, errSSLNoRootCert = -9813, errSSLCertExpired = -9814, errSSLCertNotYetValid = -9815, errSSLClosedNoNotify = -9816, errSSLBufferOverflow = -9817, errSSLBadCipherSuite = -9818, errSSLPeerUnexpectedMsg = -9819, errSSLPeerBadRecordMac = -9820, errSSLPeerDecryptionFail = -9821, errSSLPeerRecordOverflow = -9822, errSSLPeerDecompressFail = -9823, errSSLPeerHandshakeFail = -9824, errSSLPeerBadCert = -9825, errSSLPeerUnsupportedCert = -9826, errSSLPeerCertRevoked = -9827, errSSLPeerCertExpired = -9828, errSSLPeerCertUnknown = -9829, errSSLIllegalParam = -9830, errSSLPeerUnknownCA = -9831, errSSLPeerAccessDenied = -9832, errSSLPeerDecodeError = -9833, errSSLPeerDecryptError = -9834, errSSLPeerExportRestriction = -9835, errSSLPeerProtocolVersion = -9836, errSSLPeerInsufficientSecurity = -9837, errSSLPeerInternalError = -9838, errSSLPeerUserCancelled = -9839, errSSLPeerNoRenegotiation = -9840, errSSLPeerAuthCompleted = -9841, errSSLClientCertRequested = -9842, errSSLHostNameMismatch = -9843, errSSLConnectionRefused = -9844, errSSLDecryptionFail = -9845, errSSLBadRecordMac = -9846, errSSLRecordOverflow = -9847, errSSLBadConfiguration = -9848, errSSLUnexpectedRecord = -9849, errSSLWeakPeerEphemeralDHKey = -9850, errSSLClientHelloReceived = -9851, errSSLTransportReset = -9852, errSSLNetworkTimeout = -9853, errSSLConfigurationFailed = -9854, errSSLUnsupportedExtension = -9855, errSSLUnexpectedMessage = -9856, errSSLDecompressFail = -9857, errSSLHandshakeFail = -9858, errSSLDecodeError = -9859, errSSLInappropriateFallback = -9860, errSSLMissingExtension = -9861, errSSLBadCertificateStatusResponse = -9862, errSSLCertificateRequired = -9863, errSSLUnknownPSKIdentity = -9864, errSSLUnrecognizedName = -9865, errSSLATSViolation = -9880, errSSLATSMinimumVersionViolation = -9881, errSSLATSCiphersuiteViolation = -9882, errSSLATSMinimumKeySizeViolation = -9883, errSSLATSLeafCertificateHashAlgorithmViolation = -9884, errSSLATSCertificateHashAlgorithmViolation = -9885, errSSLATSCertificateTrustViolation = -9886, errSSLEarlyDataRejected = -9890, }; #pragma clang assume_nonnull end } extern "C" { typedef int64_t sint64; typedef uint64_t uint64; typedef int32_t sint32; typedef int16_t sint16; typedef int8_t sint8; typedef uint32_t uint32; typedef uint16_t uint16; typedef uint8_t uint8; typedef intptr_t CSSM_INTPTR; typedef size_t CSSM_SIZE; } typedef struct cssm_data { size_t Length; uint8_t * _Nullable Data; } SecAsn1Item __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))), SecAsn1Oid __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) { SecAsn1Oid algorithm; SecAsn1Item parameters; } SecAsn1AlgId __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef struct __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) { SecAsn1AlgId algorithm; SecAsn1Item subjectPublicKey; } SecAsn1PubKeyInfo __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang diagnostic pop #pragma clang assume_nonnull begin typedef struct SecAsn1Template_struct { uint32_t kind; uint32_t offset; const void *sub; uint32_t size; } SecAsn1Template __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef const SecAsn1Template * SecAsn1TemplateChooser( void *arg, Boolean enc, const char *buf, size_t len, void *dest) __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef SecAsn1TemplateChooser * SecAsn1TemplateChooserPtr __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="SecAsn1 is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang assume_nonnull end extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef CSSM_INTPTR CSSM_HANDLE, *CSSM_HANDLE_PTR; typedef uint64 CSSM_LONG_HANDLE, *CSSM_LONG_HANDLE_PTR; typedef CSSM_HANDLE CSSM_MODULE_HANDLE, *CSSM_MODULE_HANDLE_PTR; typedef CSSM_LONG_HANDLE CSSM_CC_HANDLE; typedef CSSM_MODULE_HANDLE CSSM_CSP_HANDLE; typedef CSSM_MODULE_HANDLE CSSM_TP_HANDLE; typedef CSSM_MODULE_HANDLE CSSM_AC_HANDLE; typedef CSSM_MODULE_HANDLE CSSM_CL_HANDLE; typedef CSSM_MODULE_HANDLE CSSM_DL_HANDLE; typedef CSSM_MODULE_HANDLE CSSM_DB_HANDLE; enum { CSSM_INVALID_HANDLE = 0 }; typedef sint32 CSSM_BOOL; enum { CSSM_FALSE = 0, CSSM_TRUE = !CSSM_FALSE }; typedef sint32 CSSM_RETURN; enum { CSSM_OK = 0 }; enum { CSSM_MODULE_STRING_SIZE = 64 }; typedef char CSSM_STRING [CSSM_MODULE_STRING_SIZE + 4]; typedef SecAsn1Item *CSSM_DATA_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_guid { uint32 Data1; uint16 Data2; uint16 Data3; uint8 Data4[8]; } CSSM_GUID __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_GUID_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_BITMASK; typedef CSSM_BITMASK CSSM_KEY_HIERARCHY; enum { CSSM_KEY_HIERARCHY_NONE = 0, CSSM_KEY_HIERARCHY_INTEG = 1, CSSM_KEY_HIERARCHY_EXPORT = 2 }; typedef CSSM_BITMASK CSSM_PVC_MODE; enum { CSSM_PVC_NONE = 0, CSSM_PVC_APP = 1, CSSM_PVC_SP = 2 }; typedef uint32 CSSM_PRIVILEGE_SCOPE; enum { CSSM_PRIVILEGE_SCOPE_NONE = 0, CSSM_PRIVILEGE_SCOPE_PROCESS = 1, CSSM_PRIVILEGE_SCOPE_THREAD = 2 }; typedef struct cssm_version { uint32 Major; uint32 Minor; } CSSM_VERSION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_VERSION_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_SERVICE_MASK; enum { CSSM_SERVICE_CSSM = 0x1, CSSM_SERVICE_CSP = 0x2, CSSM_SERVICE_DL = 0x4, CSSM_SERVICE_CL = 0x8, CSSM_SERVICE_TP = 0x10, CSSM_SERVICE_AC = 0x20, CSSM_SERVICE_KR = 0x40 }; typedef CSSM_SERVICE_MASK CSSM_SERVICE_TYPE; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_subservice_uid { CSSM_GUID Guid; CSSM_VERSION Version; uint32 SubserviceId; CSSM_SERVICE_TYPE SubserviceType; } CSSM_SUBSERVICE_UID __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SUBSERVICE_UID_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_MODULE_EVENT, *CSSM_MODULE_EVENT_PTR; enum { CSSM_NOTIFY_INSERT = 1, CSSM_NOTIFY_REMOVE = 2, CSSM_NOTIFY_FAULT = 3 }; typedef CSSM_RETURN ( *CSSM_API_ModuleEventHandler) (const CSSM_GUID *ModuleGuid, void* AppNotifyCallbackCtx, uint32 SubserviceId, CSSM_SERVICE_TYPE ServiceType, CSSM_MODULE_EVENT EventType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_ATTACH_FLAGS; enum { CSSM_ATTACH_READ_ONLY = 0x00000001 }; typedef uint64 CSSM_PRIVILEGE; typedef CSSM_PRIVILEGE CSSM_USEE_TAG; enum { CSSM_USEE_LAST = 0xFF, CSSM_USEE_NONE = 0, CSSM_USEE_DOMESTIC = 1, CSSM_USEE_FINANCIAL = 2, CSSM_USEE_KRLE = 3, CSSM_USEE_KRENT = 4, CSSM_USEE_SSL = 5, CSSM_USEE_AUTHENTICATION = 6, CSSM_USEE_KEYEXCH = 7, CSSM_USEE_MEDICAL = 8, CSSM_USEE_INSURANCE = 9, CSSM_USEE_WEAK = 10 }; typedef uint32 CSSM_NET_ADDRESS_TYPE; enum { CSSM_ADDR_NONE = 0, CSSM_ADDR_CUSTOM = 1, CSSM_ADDR_URL = 2, CSSM_ADDR_SOCKADDR = 3, CSSM_ADDR_NAME = 4 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_net_address { CSSM_NET_ADDRESS_TYPE AddressType; SecAsn1Item Address; } CSSM_NET_ADDRESS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_NET_ADDRESS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_NET_PROTOCOL; enum { CSSM_NET_PROTO_NONE = 0, CSSM_NET_PROTO_CUSTOM = 1, CSSM_NET_PROTO_UNSPECIFIED = 2, CSSM_NET_PROTO_LDAP = 3, CSSM_NET_PROTO_LDAPS = 4, CSSM_NET_PROTO_LDAPNS = 5, CSSM_NET_PROTO_X500DAP = 6, CSSM_NET_PROTO_FTP = 7, CSSM_NET_PROTO_FTPS = 8, CSSM_NET_PROTO_OCSP = 9, CSSM_NET_PROTO_CMP = 10, CSSM_NET_PROTO_CMPS = 11 }; typedef CSSM_RETURN ( *CSSM_CALLBACK) (CSSM_DATA_PTR OutData, void *CallerCtx) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_crypto_data { SecAsn1Item Param; CSSM_CALLBACK Callback; void *CallerCtx; } CSSM_CRYPTO_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CRYPTO_DATA_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef sint32 CSSM_WORDID_TYPE; enum { CSSM_WORDID__UNK_ = -1, CSSM_WORDID__NLU_ = 0, CSSM_WORDID__STAR_ = 1, CSSM_WORDID_A = 2, CSSM_WORDID_ACL = 3, CSSM_WORDID_ALPHA = 4, CSSM_WORDID_B = 5, CSSM_WORDID_BER = 6, CSSM_WORDID_BINARY = 7, CSSM_WORDID_BIOMETRIC = 8, CSSM_WORDID_C = 9, CSSM_WORDID_CANCELED = 10, CSSM_WORDID_CERT = 11, CSSM_WORDID_COMMENT = 12, CSSM_WORDID_CRL = 13, CSSM_WORDID_CUSTOM = 14, CSSM_WORDID_D = 15, CSSM_WORDID_DATE = 16, CSSM_WORDID_DB_DELETE = 17, CSSM_WORDID_DB_EXEC_STORED_QUERY = 18, CSSM_WORDID_DB_INSERT = 19, CSSM_WORDID_DB_MODIFY = 20, CSSM_WORDID_DB_READ = 21, CSSM_WORDID_DBS_CREATE = 22, CSSM_WORDID_DBS_DELETE = 23, CSSM_WORDID_DECRYPT = 24, CSSM_WORDID_DELETE = 25, CSSM_WORDID_DELTA_CRL = 26, CSSM_WORDID_DER = 27, CSSM_WORDID_DERIVE = 28, CSSM_WORDID_DISPLAY = 29, CSSM_WORDID_DO = 30, CSSM_WORDID_DSA = 31, CSSM_WORDID_DSA_SHA1 = 32, CSSM_WORDID_E = 33, CSSM_WORDID_ELGAMAL = 34, CSSM_WORDID_ENCRYPT = 35, CSSM_WORDID_ENTRY = 36, CSSM_WORDID_EXPORT_CLEAR = 37, CSSM_WORDID_EXPORT_WRAPPED = 38, CSSM_WORDID_G = 39, CSSM_WORDID_GE = 40, CSSM_WORDID_GENKEY = 41, CSSM_WORDID_HASH = 42, CSSM_WORDID_HASHED_PASSWORD = 43, CSSM_WORDID_HASHED_SUBJECT = 44, CSSM_WORDID_HAVAL = 45, CSSM_WORDID_IBCHASH = 46, CSSM_WORDID_IMPORT_CLEAR = 47, CSSM_WORDID_IMPORT_WRAPPED = 48, CSSM_WORDID_INTEL = 49, CSSM_WORDID_ISSUER = 50, CSSM_WORDID_ISSUER_INFO = 51, CSSM_WORDID_K_OF_N = 52, CSSM_WORDID_KEA = 53, CSSM_WORDID_KEYHOLDER = 54, CSSM_WORDID_L = 55, CSSM_WORDID_LE = 56, CSSM_WORDID_LOGIN = 57, CSSM_WORDID_LOGIN_NAME = 58, CSSM_WORDID_MAC = 59, CSSM_WORDID_MD2 = 60, CSSM_WORDID_MD2WITHRSA = 61, CSSM_WORDID_MD4 = 62, CSSM_WORDID_MD5 = 63, CSSM_WORDID_MD5WITHRSA = 64, CSSM_WORDID_N = 65, CSSM_WORDID_NAME = 66, CSSM_WORDID_NDR = 67, CSSM_WORDID_NHASH = 68, CSSM_WORDID_NOT_AFTER = 69, CSSM_WORDID_NOT_BEFORE = 70, CSSM_WORDID_NULL = 71, CSSM_WORDID_NUMERIC = 72, CSSM_WORDID_OBJECT_HASH = 73, CSSM_WORDID_ONE_TIME = 74, CSSM_WORDID_ONLINE = 75, CSSM_WORDID_OWNER = 76, CSSM_WORDID_P = 77, CSSM_WORDID_PAM_NAME = 78, CSSM_WORDID_PASSWORD = 79, CSSM_WORDID_PGP = 80, CSSM_WORDID_PREFIX = 81, CSSM_WORDID_PRIVATE_KEY = 82, CSSM_WORDID_PROMPTED_BIOMETRIC = 83, CSSM_WORDID_PROMPTED_PASSWORD = 84, CSSM_WORDID_PROPAGATE = 85, CSSM_WORDID_PROTECTED_BIOMETRIC = 86, CSSM_WORDID_PROTECTED_PASSWORD = 87, CSSM_WORDID_PROTECTED_PIN = 88, CSSM_WORDID_PUBLIC_KEY = 89, CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90, CSSM_WORDID_Q = 91, CSSM_WORDID_RANGE = 92, CSSM_WORDID_REVAL = 93, CSSM_WORDID_RIPEMAC = 94, CSSM_WORDID_RIPEMD = 95, CSSM_WORDID_RIPEMD160 = 96, CSSM_WORDID_RSA = 97, CSSM_WORDID_RSA_ISO9796 = 98, CSSM_WORDID_RSA_PKCS = 99, CSSM_WORDID_RSA_PKCS_MD5 = 100, CSSM_WORDID_RSA_PKCS_SHA1 = 101, CSSM_WORDID_RSA_PKCS1 = 102, CSSM_WORDID_RSA_PKCS1_MD5 = 103, CSSM_WORDID_RSA_PKCS1_SHA1 = 104, CSSM_WORDID_RSA_PKCS1_SIG = 105, CSSM_WORDID_RSA_RAW = 106, CSSM_WORDID_SDSIV1 = 107, CSSM_WORDID_SEQUENCE = 108, CSSM_WORDID_SET = 109, CSSM_WORDID_SEXPR = 110, CSSM_WORDID_SHA1 = 111, CSSM_WORDID_SHA1WITHDSA = 112, CSSM_WORDID_SHA1WITHECDSA = 113, CSSM_WORDID_SHA1WITHRSA = 114, CSSM_WORDID_SIGN = 115, CSSM_WORDID_SIGNATURE = 116, CSSM_WORDID_SIGNED_NONCE = 117, CSSM_WORDID_SIGNED_SECRET = 118, CSSM_WORDID_SPKI = 119, CSSM_WORDID_SUBJECT = 120, CSSM_WORDID_SUBJECT_INFO = 121, CSSM_WORDID_TAG = 122, CSSM_WORDID_THRESHOLD = 123, CSSM_WORDID_TIME = 124, CSSM_WORDID_URI = 125, CSSM_WORDID_VERSION = 126, CSSM_WORDID_X509_ATTRIBUTE = 127, CSSM_WORDID_X509V1 = 128, CSSM_WORDID_X509V2 = 129, CSSM_WORDID_X509V3 = 130, CSSM_WORDID_X9_ATTRIBUTE = 131, CSSM_WORDID_VENDOR_START = 0x00010000, CSSM_WORDID_VENDOR_END = 0x7FFF0000 }; typedef uint32 CSSM_LIST_ELEMENT_TYPE, *CSSM_LIST_ELEMENT_TYPE_PTR; enum { CSSM_LIST_ELEMENT_DATUM = 0x00, CSSM_LIST_ELEMENT_SUBLIST = 0x01, CSSM_LIST_ELEMENT_WORDID = 0x02 }; typedef uint32 CSSM_LIST_TYPE, *CSSM_LIST_TYPE_PTR; enum { CSSM_LIST_TYPE_UNKNOWN = 0, CSSM_LIST_TYPE_CUSTOM = 1, CSSM_LIST_TYPE_SEXPR = 2 }; typedef struct cssm_list_element *CSSM_LIST_ELEMENT_PTR; typedef struct cssm_list { CSSM_LIST_TYPE ListType; CSSM_LIST_ELEMENT_PTR Head; CSSM_LIST_ELEMENT_PTR Tail; } CSSM_LIST __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_LIST_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_list_element { struct cssm_list_element *NextElement; CSSM_WORDID_TYPE WordID; CSSM_LIST_ELEMENT_TYPE ElementType; union { CSSM_LIST Sublist; SecAsn1Item Word; } Element; } CSSM_LIST_ELEMENT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) { CSSM_LIST Issuer; CSSM_LIST Subject; CSSM_BOOL Delegate; CSSM_LIST AuthorizationTag; CSSM_LIST ValidityPeriod; } CSSM_TUPLE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TUPLE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tuplegroup { uint32 NumberOfTuples; CSSM_TUPLE_PTR Tuples; } CSSM_TUPLEGROUP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TUPLEGROUP_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_WORDID_TYPE CSSM_SAMPLE_TYPE; enum { CSSM_SAMPLE_TYPE_PASSWORD = CSSM_WORDID_PASSWORD, CSSM_SAMPLE_TYPE_HASHED_PASSWORD = CSSM_WORDID_HASHED_PASSWORD, CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = CSSM_WORDID_PROTECTED_PASSWORD, CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = CSSM_WORDID_PROMPTED_PASSWORD, CSSM_SAMPLE_TYPE_SIGNED_NONCE = CSSM_WORDID_SIGNED_NONCE, CSSM_SAMPLE_TYPE_SIGNED_SECRET = CSSM_WORDID_SIGNED_SECRET, CSSM_SAMPLE_TYPE_BIOMETRIC = CSSM_WORDID_BIOMETRIC, CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = CSSM_WORDID_PROTECTED_BIOMETRIC, CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = CSSM_WORDID_PROMPTED_BIOMETRIC, CSSM_SAMPLE_TYPE_THRESHOLD = CSSM_WORDID_THRESHOLD }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_sample { CSSM_LIST TypedSample; const CSSM_SUBSERVICE_UID *Verifier; } CSSM_SAMPLE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SAMPLE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_samplegroup { uint32 NumberOfSamples; const CSSM_SAMPLE *Samples; } CSSM_SAMPLEGROUP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SAMPLEGROUP_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef void *( *CSSM_MALLOC) (CSSM_SIZE size, void *allocref); typedef void ( *CSSM_FREE) (void *memblock, void *allocref); typedef void *( *CSSM_REALLOC) (void *memblock, CSSM_SIZE size, void *allocref); typedef void *( *CSSM_CALLOC) (uint32 num, CSSM_SIZE size, void *allocref); typedef struct cssm_memory_funcs { CSSM_MALLOC malloc_func; CSSM_FREE free_func; CSSM_REALLOC realloc_func; CSSM_CALLOC calloc_func; void *AllocRef; } CSSM_MEMORY_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_MEMORY_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_MEMORY_FUNCS CSSM_API_MEMORY_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_API_MEMORY_FUNCS *CSSM_API_MEMORY_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_RETURN ( * CSSM_CHALLENGE_CALLBACK) (const CSSM_LIST *Challenge, CSSM_SAMPLEGROUP_PTR Response, void *CallerCtx, const CSSM_MEMORY_FUNCS *MemFuncs) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CERT_TYPE, *CSSM_CERT_TYPE_PTR; enum { CSSM_CERT_UNKNOWN = 0x00, CSSM_CERT_X_509v1 = 0x01, CSSM_CERT_X_509v2 = 0x02, CSSM_CERT_X_509v3 = 0x03, CSSM_CERT_PGP = 0x04, CSSM_CERT_SPKI = 0x05, CSSM_CERT_SDSIv1 = 0x06, CSSM_CERT_Intel = 0x08, CSSM_CERT_X_509_ATTRIBUTE = 0x09, CSSM_CERT_X9_ATTRIBUTE = 0x0A, CSSM_CERT_TUPLE = 0x0B, CSSM_CERT_ACL_ENTRY = 0x0C, CSSM_CERT_MULTIPLE = 0x7FFE, CSSM_CERT_LAST = 0x7FFF, CSSM_CL_CUSTOM_CERT_TYPE = 0x08000 }; typedef uint32 CSSM_CERT_ENCODING, *CSSM_CERT_ENCODING_PTR; enum { CSSM_CERT_ENCODING_UNKNOWN = 0x00, CSSM_CERT_ENCODING_CUSTOM = 0x01, CSSM_CERT_ENCODING_BER = 0x02, CSSM_CERT_ENCODING_DER = 0x03, CSSM_CERT_ENCODING_NDR = 0x04, CSSM_CERT_ENCODING_SEXPR = 0x05, CSSM_CERT_ENCODING_PGP = 0x06, CSSM_CERT_ENCODING_MULTIPLE = 0x7FFE, CSSM_CERT_ENCODING_LAST = 0x7FFF, CSSM_CL_CUSTOM_CERT_ENCODING = 0x8000 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_encoded_cert { CSSM_CERT_TYPE CertType; CSSM_CERT_ENCODING CertEncoding; SecAsn1Item CertBlob; } CSSM_ENCODED_CERT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ENCODED_CERT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CERT_PARSE_FORMAT, *CSSM_CERT_PARSE_FORMAT_PTR; enum { CSSM_CERT_PARSE_FORMAT_NONE = 0x00, CSSM_CERT_PARSE_FORMAT_CUSTOM = 0x01, CSSM_CERT_PARSE_FORMAT_SEXPR = 0x02, CSSM_CERT_PARSE_FORMAT_COMPLEX = 0x03, CSSM_CERT_PARSE_FORMAT_OID_NAMED = 0x04, CSSM_CERT_PARSE_FORMAT_TUPLE = 0x05, CSSM_CERT_PARSE_FORMAT_MULTIPLE = 0x7FFE, CSSM_CERT_PARSE_FORMAT_LAST = 0x7FFF, CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 0x8000 }; typedef struct cssm_parsed_cert { CSSM_CERT_TYPE CertType; CSSM_CERT_PARSE_FORMAT ParsedCertFormat; void *ParsedCert; } CSSM_PARSED_CERT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_PARSED_CERT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_cert_pair { CSSM_ENCODED_CERT EncodedCert; CSSM_PARSED_CERT ParsedCert; } CSSM_CERT_PAIR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CERT_PAIR_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CERTGROUP_TYPE, *CSSM_CERTGROUP_TYPE_PTR; enum { CSSM_CERTGROUP_DATA = 0x00, CSSM_CERTGROUP_ENCODED_CERT = 0x01, CSSM_CERTGROUP_PARSED_CERT = 0x02, CSSM_CERTGROUP_CERT_PAIR = 0x03 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_certgroup { CSSM_CERT_TYPE CertType; CSSM_CERT_ENCODING CertEncoding; uint32 NumCerts; union { CSSM_DATA_PTR CertList; CSSM_ENCODED_CERT_PTR EncodedCertList; CSSM_PARSED_CERT_PTR ParsedCertList; CSSM_CERT_PAIR_PTR PairCertList; } GroupList; CSSM_CERTGROUP_TYPE CertGroupType; void *Reserved; } CSSM_CERTGROUP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CERTGROUP_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_base_certs { CSSM_TP_HANDLE TPHandle; CSSM_CL_HANDLE CLHandle; CSSM_CERTGROUP Certs; } CSSM_BASE_CERTS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_BASE_CERTS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_access_credentials { CSSM_STRING EntryTag; CSSM_BASE_CERTS BaseCerts; CSSM_SAMPLEGROUP Samples; CSSM_CHALLENGE_CALLBACK Callback; void *CallerCtx; } CSSM_ACCESS_CREDENTIALS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACCESS_CREDENTIALS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef sint32 CSSM_ACL_SUBJECT_TYPE; enum { CSSM_ACL_SUBJECT_TYPE_ANY = CSSM_WORDID__STAR_, CSSM_ACL_SUBJECT_TYPE_THRESHOLD = CSSM_WORDID_THRESHOLD, CSSM_ACL_SUBJECT_TYPE_PASSWORD = CSSM_WORDID_PASSWORD, CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = CSSM_WORDID_PROTECTED_PASSWORD, CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = CSSM_WORDID_PROMPTED_PASSWORD, CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = CSSM_WORDID_PUBLIC_KEY, CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = CSSM_WORDID_HASHED_SUBJECT, CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = CSSM_WORDID_BIOMETRIC, CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = CSSM_WORDID_PROTECTED_BIOMETRIC, CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = CSSM_WORDID_PROMPTED_BIOMETRIC, CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = CSSM_WORDID_LOGIN_NAME, CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = CSSM_WORDID_PAM_NAME }; typedef sint32 CSSM_ACL_AUTHORIZATION_TAG; enum { CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 0x00010000, CSSM_ACL_AUTHORIZATION_ANY = CSSM_WORDID__STAR_, CSSM_ACL_AUTHORIZATION_LOGIN = CSSM_WORDID_LOGIN, CSSM_ACL_AUTHORIZATION_GENKEY = CSSM_WORDID_GENKEY, CSSM_ACL_AUTHORIZATION_DELETE = CSSM_WORDID_DELETE, CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = CSSM_WORDID_EXPORT_WRAPPED, CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = CSSM_WORDID_EXPORT_CLEAR, CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = CSSM_WORDID_IMPORT_WRAPPED, CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = CSSM_WORDID_IMPORT_CLEAR, CSSM_ACL_AUTHORIZATION_SIGN = CSSM_WORDID_SIGN, CSSM_ACL_AUTHORIZATION_ENCRYPT = CSSM_WORDID_ENCRYPT, CSSM_ACL_AUTHORIZATION_DECRYPT = CSSM_WORDID_DECRYPT, CSSM_ACL_AUTHORIZATION_MAC = CSSM_WORDID_MAC, CSSM_ACL_AUTHORIZATION_DERIVE = CSSM_WORDID_DERIVE, CSSM_ACL_AUTHORIZATION_DBS_CREATE = CSSM_WORDID_DBS_CREATE, CSSM_ACL_AUTHORIZATION_DBS_DELETE = CSSM_WORDID_DBS_DELETE, CSSM_ACL_AUTHORIZATION_DB_READ = CSSM_WORDID_DB_READ, CSSM_ACL_AUTHORIZATION_DB_INSERT = CSSM_WORDID_DB_INSERT, CSSM_ACL_AUTHORIZATION_DB_MODIFY = CSSM_WORDID_DB_MODIFY, CSSM_ACL_AUTHORIZATION_DB_DELETE = CSSM_WORDID_DB_DELETE }; typedef struct cssm_authorizationgroup { uint32 NumberOfAuthTags; CSSM_ACL_AUTHORIZATION_TAG *AuthTags; } CSSM_AUTHORIZATIONGROUP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_AUTHORIZATIONGROUP_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_acl_validity_period { SecAsn1Item StartDate; SecAsn1Item EndDate; } CSSM_ACL_VALIDITY_PERIOD __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACL_VALIDITY_PERIOD_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_acl_entry_prototype { CSSM_LIST TypedSubject; CSSM_BOOL Delegate; CSSM_AUTHORIZATIONGROUP Authorization; CSSM_ACL_VALIDITY_PERIOD TimeRange; CSSM_STRING EntryTag; } CSSM_ACL_ENTRY_PROTOTYPE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACL_ENTRY_PROTOTYPE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_acl_owner_prototype { CSSM_LIST TypedSubject; CSSM_BOOL Delegate; } CSSM_ACL_OWNER_PROTOTYPE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACL_OWNER_PROTOTYPE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_RETURN ( * CSSM_ACL_SUBJECT_CALLBACK) (const CSSM_LIST *SubjectRequest, CSSM_LIST_PTR SubjectResponse, void *CallerContext, const CSSM_MEMORY_FUNCS *MemFuncs) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_acl_entry_input { CSSM_ACL_ENTRY_PROTOTYPE Prototype; CSSM_ACL_SUBJECT_CALLBACK Callback; void *CallerContext; } CSSM_ACL_ENTRY_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACL_ENTRY_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_resource_control_context { CSSM_ACCESS_CREDENTIALS_PTR AccessCred; CSSM_ACL_ENTRY_INPUT InitialAclEntry; } CSSM_RESOURCE_CONTROL_CONTEXT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_RESOURCE_CONTROL_CONTEXT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_HANDLE CSSM_ACL_HANDLE; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_acl_entry_info { CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; CSSM_ACL_HANDLE EntryHandle; } CSSM_ACL_ENTRY_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACL_ENTRY_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_ACL_EDIT_MODE; enum { CSSM_ACL_EDIT_MODE_ADD = 1, CSSM_ACL_EDIT_MODE_DELETE = 2, CSSM_ACL_EDIT_MODE_REPLACE = 3 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_acl_edit { CSSM_ACL_EDIT_MODE EditMode; CSSM_ACL_HANDLE OldEntryHandle; const CSSM_ACL_ENTRY_INPUT *NewEntry; } CSSM_ACL_EDIT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ACL_EDIT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef void ( *CSSM_PROC_ADDR) (void); typedef CSSM_PROC_ADDR *CSSM_PROC_ADDR_PTR; typedef struct cssm_func_name_addr { CSSM_STRING Name; CSSM_PROC_ADDR Address; } CSSM_FUNC_NAME_ADDR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_FUNC_NAME_ADDR_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_date { uint8 Year[4]; uint8 Month[2]; uint8 Day[2]; } CSSM_DATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DATE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_range { uint32 Min; uint32 Max; } CSSM_RANGE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_RANGE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_query_size_data { uint32 SizeInputBlock; uint32 SizeOutputBlock; } CSSM_QUERY_SIZE_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_QUERY_SIZE_DATA_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_HEADERVERSION; enum { CSSM_KEYHEADER_VERSION = 2 }; typedef struct cssm_key_size { uint32 LogicalKeySizeInBits; uint32 EffectiveKeySizeInBits; } CSSM_KEY_SIZE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KEY_SIZE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_KEYBLOB_TYPE; enum { CSSM_KEYBLOB_RAW = 0, CSSM_KEYBLOB_REFERENCE = 2, CSSM_KEYBLOB_WRAPPED = 3, CSSM_KEYBLOB_OTHER = 0xFFFFFFFF }; typedef uint32 CSSM_KEYBLOB_FORMAT; enum { CSSM_KEYBLOB_RAW_FORMAT_NONE = 0, CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1, CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2, CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3, CSSM_KEYBLOB_RAW_FORMAT_PGP = 4, CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5, CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6, CSSM_KEYBLOB_RAW_FORMAT_CCA = 9, CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10, CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11, CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12, CSSM_KEYBLOB_RAW_FORMAT_OTHER = 0xFFFFFFFF }; enum { CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0, CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1, CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2, CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3, CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = 0xFFFFFFFF }; enum { CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0, CSSM_KEYBLOB_REF_FORMAT_STRING = 1, CSSM_KEYBLOB_REF_FORMAT_SPKI = 2, CSSM_KEYBLOB_REF_FORMAT_OTHER = 0xFFFFFFFF }; typedef uint32 CSSM_KEYCLASS; enum { CSSM_KEYCLASS_PUBLIC_KEY = 0, CSSM_KEYCLASS_PRIVATE_KEY = 1, CSSM_KEYCLASS_SESSION_KEY = 2, CSSM_KEYCLASS_SECRET_PART = 3, CSSM_KEYCLASS_OTHER = 0xFFFFFFFF }; typedef uint32 CSSM_KEYATTR_FLAGS; enum { CSSM_KEYATTR_RETURN_DEFAULT = 0x00000000, CSSM_KEYATTR_RETURN_DATA = 0x10000000, CSSM_KEYATTR_RETURN_REF = 0x20000000, CSSM_KEYATTR_RETURN_NONE = 0x40000000, CSSM_KEYATTR_PERMANENT = 0x00000001, CSSM_KEYATTR_PRIVATE = 0x00000002, CSSM_KEYATTR_MODIFIABLE = 0x00000004, CSSM_KEYATTR_SENSITIVE = 0x00000008, CSSM_KEYATTR_EXTRACTABLE = 0x00000020, CSSM_KEYATTR_ALWAYS_SENSITIVE = 0x00000010, CSSM_KEYATTR_NEVER_EXTRACTABLE = 0x00000040 }; typedef uint32 CSSM_KEYUSE; enum { CSSM_KEYUSE_ANY = 0x80000000, CSSM_KEYUSE_ENCRYPT = 0x00000001, CSSM_KEYUSE_DECRYPT = 0x00000002, CSSM_KEYUSE_SIGN = 0x00000004, CSSM_KEYUSE_VERIFY = 0x00000008, CSSM_KEYUSE_SIGN_RECOVER = 0x00000010, CSSM_KEYUSE_VERIFY_RECOVER = 0x00000020, CSSM_KEYUSE_WRAP = 0x00000040, CSSM_KEYUSE_UNWRAP = 0x00000080, CSSM_KEYUSE_DERIVE = 0x00000100 }; typedef uint32 CSSM_ALGORITHMS; enum { CSSM_ALGID_NONE = 0, CSSM_ALGID_CUSTOM = CSSM_ALGID_NONE + 1, CSSM_ALGID_DH = CSSM_ALGID_NONE + 2, CSSM_ALGID_PH = CSSM_ALGID_NONE + 3, CSSM_ALGID_KEA = CSSM_ALGID_NONE + 4, CSSM_ALGID_MD2 = CSSM_ALGID_NONE + 5, CSSM_ALGID_MD4 = CSSM_ALGID_NONE + 6, CSSM_ALGID_MD5 = CSSM_ALGID_NONE + 7, CSSM_ALGID_SHA1 = CSSM_ALGID_NONE + 8, CSSM_ALGID_NHASH = CSSM_ALGID_NONE + 9, CSSM_ALGID_HAVAL = CSSM_ALGID_NONE + 10, CSSM_ALGID_RIPEMD = CSSM_ALGID_NONE + 11, CSSM_ALGID_IBCHASH = CSSM_ALGID_NONE + 12, CSSM_ALGID_RIPEMAC = CSSM_ALGID_NONE + 13, CSSM_ALGID_DES = CSSM_ALGID_NONE + 14, CSSM_ALGID_DESX = CSSM_ALGID_NONE + 15, CSSM_ALGID_RDES = CSSM_ALGID_NONE + 16, CSSM_ALGID_3DES_3KEY_EDE = CSSM_ALGID_NONE + 17, CSSM_ALGID_3DES_2KEY_EDE = CSSM_ALGID_NONE + 18, CSSM_ALGID_3DES_1KEY_EEE = CSSM_ALGID_NONE + 19, CSSM_ALGID_3DES_3KEY = CSSM_ALGID_3DES_3KEY_EDE, CSSM_ALGID_3DES_3KEY_EEE = CSSM_ALGID_NONE + 20, CSSM_ALGID_3DES_2KEY = CSSM_ALGID_3DES_2KEY_EDE, CSSM_ALGID_3DES_2KEY_EEE = CSSM_ALGID_NONE + 21, CSSM_ALGID_3DES_1KEY = CSSM_ALGID_3DES_3KEY_EEE, CSSM_ALGID_IDEA = CSSM_ALGID_NONE + 22, CSSM_ALGID_RC2 = CSSM_ALGID_NONE + 23, CSSM_ALGID_RC5 = CSSM_ALGID_NONE + 24, CSSM_ALGID_RC4 = CSSM_ALGID_NONE + 25, CSSM_ALGID_SEAL = CSSM_ALGID_NONE + 26, CSSM_ALGID_CAST = CSSM_ALGID_NONE + 27, CSSM_ALGID_BLOWFISH = CSSM_ALGID_NONE + 28, CSSM_ALGID_SKIPJACK = CSSM_ALGID_NONE + 29, CSSM_ALGID_LUCIFER = CSSM_ALGID_NONE + 30, CSSM_ALGID_MADRYGA = CSSM_ALGID_NONE + 31, CSSM_ALGID_FEAL = CSSM_ALGID_NONE + 32, CSSM_ALGID_REDOC = CSSM_ALGID_NONE + 33, CSSM_ALGID_REDOC3 = CSSM_ALGID_NONE + 34, CSSM_ALGID_LOKI = CSSM_ALGID_NONE + 35, CSSM_ALGID_KHUFU = CSSM_ALGID_NONE + 36, CSSM_ALGID_KHAFRE = CSSM_ALGID_NONE + 37, CSSM_ALGID_MMB = CSSM_ALGID_NONE + 38, CSSM_ALGID_GOST = CSSM_ALGID_NONE + 39, CSSM_ALGID_SAFER = CSSM_ALGID_NONE + 40, CSSM_ALGID_CRAB = CSSM_ALGID_NONE + 41, CSSM_ALGID_RSA = CSSM_ALGID_NONE + 42, CSSM_ALGID_DSA = CSSM_ALGID_NONE + 43, CSSM_ALGID_MD5WithRSA = CSSM_ALGID_NONE + 44, CSSM_ALGID_MD2WithRSA = CSSM_ALGID_NONE + 45, CSSM_ALGID_ElGamal = CSSM_ALGID_NONE + 46, CSSM_ALGID_MD2Random = CSSM_ALGID_NONE + 47, CSSM_ALGID_MD5Random = CSSM_ALGID_NONE + 48, CSSM_ALGID_SHARandom = CSSM_ALGID_NONE + 49, CSSM_ALGID_DESRandom = CSSM_ALGID_NONE + 50, CSSM_ALGID_SHA1WithRSA = CSSM_ALGID_NONE + 51, CSSM_ALGID_CDMF = CSSM_ALGID_NONE + 52, CSSM_ALGID_CAST3 = CSSM_ALGID_NONE + 53, CSSM_ALGID_CAST5 = CSSM_ALGID_NONE + 54, CSSM_ALGID_GenericSecret = CSSM_ALGID_NONE + 55, CSSM_ALGID_ConcatBaseAndKey = CSSM_ALGID_NONE + 56, CSSM_ALGID_ConcatKeyAndBase = CSSM_ALGID_NONE + 57, CSSM_ALGID_ConcatBaseAndData = CSSM_ALGID_NONE + 58, CSSM_ALGID_ConcatDataAndBase = CSSM_ALGID_NONE + 59, CSSM_ALGID_XORBaseAndData = CSSM_ALGID_NONE + 60, CSSM_ALGID_ExtractFromKey = CSSM_ALGID_NONE + 61, CSSM_ALGID_SSL3PrePrimaryGen = CSSM_ALGID_NONE + 62, CSSM_ALGID_SSL3PreMasterGen __attribute__((availability(macos,introduced=10.0,deprecated=12.0,replacement="CSSM_ALGID_SSL3PrePrimaryGen"))) = CSSM_ALGID_SSL3PrePrimaryGen, CSSM_ALGID_SSL3PrimaryDerive = CSSM_ALGID_NONE + 63, CSSM_ALGID_SSL3MasterDerive __attribute__((availability(macos,introduced=10.0,deprecated=12.0,replacement="CSSM_ALGID_SSL3PrimaryDerive"))) = CSSM_ALGID_SSL3PrimaryDerive, CSSM_ALGID_SSL3KeyAndMacDerive = CSSM_ALGID_NONE + 64, CSSM_ALGID_SSL3MD5_MAC = CSSM_ALGID_NONE + 65, CSSM_ALGID_SSL3SHA1_MAC = CSSM_ALGID_NONE + 66, CSSM_ALGID_PKCS5_PBKDF1_MD5 = CSSM_ALGID_NONE + 67, CSSM_ALGID_PKCS5_PBKDF1_MD2 = CSSM_ALGID_NONE + 68, CSSM_ALGID_PKCS5_PBKDF1_SHA1 = CSSM_ALGID_NONE + 69, CSSM_ALGID_WrapLynks = CSSM_ALGID_NONE + 70, CSSM_ALGID_WrapSET_OAEP = CSSM_ALGID_NONE + 71, CSSM_ALGID_BATON = CSSM_ALGID_NONE + 72, CSSM_ALGID_ECDSA = CSSM_ALGID_NONE + 73, CSSM_ALGID_MAYFLY = CSSM_ALGID_NONE + 74, CSSM_ALGID_JUNIPER = CSSM_ALGID_NONE + 75, CSSM_ALGID_FASTHASH = CSSM_ALGID_NONE + 76, CSSM_ALGID_3DES = CSSM_ALGID_NONE + 77, CSSM_ALGID_SSL3MD5 = CSSM_ALGID_NONE + 78, CSSM_ALGID_SSL3SHA1 = CSSM_ALGID_NONE + 79, CSSM_ALGID_FortezzaTimestamp = CSSM_ALGID_NONE + 80, CSSM_ALGID_SHA1WithDSA = CSSM_ALGID_NONE + 81, CSSM_ALGID_SHA1WithECDSA = CSSM_ALGID_NONE + 82, CSSM_ALGID_DSA_BSAFE = CSSM_ALGID_NONE + 83, CSSM_ALGID_ECDH = CSSM_ALGID_NONE + 84, CSSM_ALGID_ECMQV = CSSM_ALGID_NONE + 85, CSSM_ALGID_PKCS12_SHA1_PBE = CSSM_ALGID_NONE + 86, CSSM_ALGID_ECNRA = CSSM_ALGID_NONE + 87, CSSM_ALGID_SHA1WithECNRA = CSSM_ALGID_NONE + 88, CSSM_ALGID_ECES = CSSM_ALGID_NONE + 89, CSSM_ALGID_ECAES = CSSM_ALGID_NONE + 90, CSSM_ALGID_SHA1HMAC = CSSM_ALGID_NONE + 91, CSSM_ALGID_FIPS186Random = CSSM_ALGID_NONE + 92, CSSM_ALGID_ECC = CSSM_ALGID_NONE + 93, CSSM_ALGID_MQV = CSSM_ALGID_NONE + 94, CSSM_ALGID_NRA = CSSM_ALGID_NONE + 95, CSSM_ALGID_IntelPlatformRandom = CSSM_ALGID_NONE + 96, CSSM_ALGID_UTC = CSSM_ALGID_NONE + 97, CSSM_ALGID_HAVAL3 = CSSM_ALGID_NONE + 98, CSSM_ALGID_HAVAL4 = CSSM_ALGID_NONE + 99, CSSM_ALGID_HAVAL5 = CSSM_ALGID_NONE + 100, CSSM_ALGID_TIGER = CSSM_ALGID_NONE + 101, CSSM_ALGID_MD5HMAC = CSSM_ALGID_NONE + 102, CSSM_ALGID_PKCS5_PBKDF2 = CSSM_ALGID_NONE + 103, CSSM_ALGID_RUNNING_COUNTER = CSSM_ALGID_NONE + 104, CSSM_ALGID_LAST = CSSM_ALGID_NONE + 0x7FFFFFFF, CSSM_ALGID_VENDOR_DEFINED = CSSM_ALGID_NONE + 0x80000000 } __attribute__((availability(macos,introduced=10.0))); typedef uint32 CSSM_ENCRYPT_MODE; enum { CSSM_ALGMODE_NONE = 0, CSSM_ALGMODE_CUSTOM = CSSM_ALGMODE_NONE + 1, CSSM_ALGMODE_ECB = CSSM_ALGMODE_NONE + 2, CSSM_ALGMODE_ECBPad = CSSM_ALGMODE_NONE + 3, CSSM_ALGMODE_CBC = CSSM_ALGMODE_NONE + 4, CSSM_ALGMODE_CBC_IV8 = CSSM_ALGMODE_NONE + 5, CSSM_ALGMODE_CBCPadIV8 = CSSM_ALGMODE_NONE + 6, CSSM_ALGMODE_CFB = CSSM_ALGMODE_NONE + 7, CSSM_ALGMODE_CFB_IV8 = CSSM_ALGMODE_NONE + 8, CSSM_ALGMODE_CFBPadIV8 = CSSM_ALGMODE_NONE + 9, CSSM_ALGMODE_OFB = CSSM_ALGMODE_NONE + 10, CSSM_ALGMODE_OFB_IV8 = CSSM_ALGMODE_NONE + 11, CSSM_ALGMODE_OFBPadIV8 = CSSM_ALGMODE_NONE + 12, CSSM_ALGMODE_COUNTER = CSSM_ALGMODE_NONE + 13, CSSM_ALGMODE_BC = CSSM_ALGMODE_NONE + 14, CSSM_ALGMODE_PCBC = CSSM_ALGMODE_NONE + 15, CSSM_ALGMODE_CBCC = CSSM_ALGMODE_NONE + 16, CSSM_ALGMODE_OFBNLF = CSSM_ALGMODE_NONE + 17, CSSM_ALGMODE_PBC = CSSM_ALGMODE_NONE + 18, CSSM_ALGMODE_PFB = CSSM_ALGMODE_NONE + 19, CSSM_ALGMODE_CBCPD = CSSM_ALGMODE_NONE + 20, CSSM_ALGMODE_PUBLIC_KEY = CSSM_ALGMODE_NONE + 21, CSSM_ALGMODE_PRIVATE_KEY = CSSM_ALGMODE_NONE + 22, CSSM_ALGMODE_SHUFFLE = CSSM_ALGMODE_NONE + 23, CSSM_ALGMODE_ECB64 = CSSM_ALGMODE_NONE + 24, CSSM_ALGMODE_CBC64 = CSSM_ALGMODE_NONE + 25, CSSM_ALGMODE_OFB64 = CSSM_ALGMODE_NONE + 26, CSSM_ALGMODE_CFB32 = CSSM_ALGMODE_NONE + 28, CSSM_ALGMODE_CFB16 = CSSM_ALGMODE_NONE + 29, CSSM_ALGMODE_CFB8 = CSSM_ALGMODE_NONE + 30, CSSM_ALGMODE_WRAP = CSSM_ALGMODE_NONE + 31, CSSM_ALGMODE_PRIVATE_WRAP = CSSM_ALGMODE_NONE + 32, CSSM_ALGMODE_RELAYX = CSSM_ALGMODE_NONE + 33, CSSM_ALGMODE_ECB128 = CSSM_ALGMODE_NONE + 34, CSSM_ALGMODE_ECB96 = CSSM_ALGMODE_NONE + 35, CSSM_ALGMODE_CBC128 = CSSM_ALGMODE_NONE + 36, CSSM_ALGMODE_OAEP_HASH = CSSM_ALGMODE_NONE + 37, CSSM_ALGMODE_PKCS1_EME_V15 = CSSM_ALGMODE_NONE + 38, CSSM_ALGMODE_PKCS1_EME_OAEP = CSSM_ALGMODE_NONE + 39, CSSM_ALGMODE_PKCS1_EMSA_V15 = CSSM_ALGMODE_NONE + 40, CSSM_ALGMODE_ISO_9796 = CSSM_ALGMODE_NONE + 41, CSSM_ALGMODE_X9_31 = CSSM_ALGMODE_NONE + 42, CSSM_ALGMODE_LAST = CSSM_ALGMODE_NONE + 0x7FFFFFFF, CSSM_ALGMODE_VENDOR_DEFINED = CSSM_ALGMODE_NONE + 0x80000000 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_keyheader { CSSM_HEADERVERSION HeaderVersion; CSSM_GUID CspId; CSSM_KEYBLOB_TYPE BlobType; CSSM_KEYBLOB_FORMAT Format; CSSM_ALGORITHMS AlgorithmId; CSSM_KEYCLASS KeyClass; uint32 LogicalKeySizeInBits; CSSM_KEYATTR_FLAGS KeyAttr; CSSM_KEYUSE KeyUsage; CSSM_DATE StartDate; CSSM_DATE EndDate; CSSM_ALGORITHMS WrapAlgorithmId; CSSM_ENCRYPT_MODE WrapMode; uint32 Reserved; } CSSM_KEYHEADER __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KEYHEADER_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_key { CSSM_KEYHEADER KeyHeader; SecAsn1Item KeyData; } CSSM_KEY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KEY_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_KEY CSSM_WRAP_KEY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_WRAP_KEY_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CSPTYPE; enum { CSSM_CSP_SOFTWARE = 1, CSSM_CSP_HARDWARE = CSSM_CSP_SOFTWARE + 1, CSSM_CSP_HYBRID = CSSM_CSP_SOFTWARE + 2 }; typedef struct cssm_dl_db_handle { CSSM_DL_HANDLE DLHandle; CSSM_DB_HANDLE DBHandle; } CSSM_DL_DB_HANDLE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DL_DB_HANDLE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CONTEXT_TYPE; enum { CSSM_ALGCLASS_NONE = 0, CSSM_ALGCLASS_CUSTOM = CSSM_ALGCLASS_NONE + 1, CSSM_ALGCLASS_SIGNATURE = CSSM_ALGCLASS_NONE + 2, CSSM_ALGCLASS_SYMMETRIC = CSSM_ALGCLASS_NONE + 3, CSSM_ALGCLASS_DIGEST = CSSM_ALGCLASS_NONE + 4, CSSM_ALGCLASS_RANDOMGEN = CSSM_ALGCLASS_NONE + 5, CSSM_ALGCLASS_UNIQUEGEN = CSSM_ALGCLASS_NONE + 6, CSSM_ALGCLASS_MAC = CSSM_ALGCLASS_NONE + 7, CSSM_ALGCLASS_ASYMMETRIC = CSSM_ALGCLASS_NONE + 8, CSSM_ALGCLASS_KEYGEN = CSSM_ALGCLASS_NONE + 9, CSSM_ALGCLASS_DERIVEKEY = CSSM_ALGCLASS_NONE + 10 }; enum { CSSM_ATTRIBUTE_DATA_NONE = 0x00000000, CSSM_ATTRIBUTE_DATA_UINT32 = 0x10000000, CSSM_ATTRIBUTE_DATA_CSSM_DATA = 0x20000000, CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 0x30000000, CSSM_ATTRIBUTE_DATA_KEY = 0x40000000, CSSM_ATTRIBUTE_DATA_STRING = 0x50000000, CSSM_ATTRIBUTE_DATA_DATE = 0x60000000, CSSM_ATTRIBUTE_DATA_RANGE = 0x70000000, CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = 0x80000000, CSSM_ATTRIBUTE_DATA_VERSION = 0x01000000, CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 0x02000000, CSSM_ATTRIBUTE_DATA_KR_PROFILE = 0x03000000, CSSM_ATTRIBUTE_TYPE_MASK = 0xFF000000 }; typedef uint32 CSSM_ATTRIBUTE_TYPE; enum { CSSM_ATTRIBUTE_NONE = 0, CSSM_ATTRIBUTE_CUSTOM = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 1, CSSM_ATTRIBUTE_DESCRIPTION = CSSM_ATTRIBUTE_DATA_STRING | 2, CSSM_ATTRIBUTE_KEY = CSSM_ATTRIBUTE_DATA_KEY | 3, CSSM_ATTRIBUTE_INIT_VECTOR = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 4, CSSM_ATTRIBUTE_SALT = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 5, CSSM_ATTRIBUTE_PADDING = CSSM_ATTRIBUTE_DATA_UINT32 | 6, CSSM_ATTRIBUTE_RANDOM = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 7, CSSM_ATTRIBUTE_SEED = CSSM_ATTRIBUTE_DATA_CRYPTO_DATA | 8, CSSM_ATTRIBUTE_PASSPHRASE = CSSM_ATTRIBUTE_DATA_CRYPTO_DATA | 9, CSSM_ATTRIBUTE_KEY_LENGTH = CSSM_ATTRIBUTE_DATA_UINT32 | 10, CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = CSSM_ATTRIBUTE_DATA_RANGE | 11, CSSM_ATTRIBUTE_BLOCK_SIZE = CSSM_ATTRIBUTE_DATA_UINT32 | 12, CSSM_ATTRIBUTE_OUTPUT_SIZE = CSSM_ATTRIBUTE_DATA_UINT32 | 13, CSSM_ATTRIBUTE_ROUNDS = CSSM_ATTRIBUTE_DATA_UINT32 | 14, CSSM_ATTRIBUTE_IV_SIZE = CSSM_ATTRIBUTE_DATA_UINT32 | 15, CSSM_ATTRIBUTE_ALG_PARAMS = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 16, CSSM_ATTRIBUTE_LABEL = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 17, CSSM_ATTRIBUTE_KEY_TYPE = CSSM_ATTRIBUTE_DATA_UINT32 | 18, CSSM_ATTRIBUTE_MODE = CSSM_ATTRIBUTE_DATA_UINT32 | 19, CSSM_ATTRIBUTE_EFFECTIVE_BITS = CSSM_ATTRIBUTE_DATA_UINT32 | 20, CSSM_ATTRIBUTE_START_DATE = CSSM_ATTRIBUTE_DATA_DATE | 21, CSSM_ATTRIBUTE_END_DATE = CSSM_ATTRIBUTE_DATA_DATE | 22, CSSM_ATTRIBUTE_KEYUSAGE = CSSM_ATTRIBUTE_DATA_UINT32 | 23, CSSM_ATTRIBUTE_KEYATTR = CSSM_ATTRIBUTE_DATA_UINT32 | 24, CSSM_ATTRIBUTE_VERSION = CSSM_ATTRIBUTE_DATA_VERSION | 25, CSSM_ATTRIBUTE_PRIME = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 26, CSSM_ATTRIBUTE_BASE = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 27, CSSM_ATTRIBUTE_SUBPRIME = CSSM_ATTRIBUTE_DATA_CSSM_DATA | 28, CSSM_ATTRIBUTE_ALG_ID = CSSM_ATTRIBUTE_DATA_UINT32 | 29, CSSM_ATTRIBUTE_ITERATION_COUNT = CSSM_ATTRIBUTE_DATA_UINT32 | 30, CSSM_ATTRIBUTE_ROUNDS_RANGE = CSSM_ATTRIBUTE_DATA_RANGE | 31, CSSM_ATTRIBUTE_KRPROFILE_LOCAL = CSSM_ATTRIBUTE_DATA_KR_PROFILE | 32, CSSM_ATTRIBUTE_KRPROFILE_REMOTE = CSSM_ATTRIBUTE_DATA_KR_PROFILE | 33, CSSM_ATTRIBUTE_CSP_HANDLE = CSSM_ATTRIBUTE_DATA_UINT32 | 34, CSSM_ATTRIBUTE_DL_DB_HANDLE = CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE | 35, CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS | 36, CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = CSSM_ATTRIBUTE_DATA_UINT32 | 37, CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = CSSM_ATTRIBUTE_DATA_UINT32 | 38, CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT=CSSM_ATTRIBUTE_DATA_UINT32 | 39, CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = CSSM_ATTRIBUTE_DATA_UINT32 | 40 }; typedef uint32 CSSM_PADDING; enum { CSSM_PADDING_NONE = 0, CSSM_PADDING_CUSTOM = CSSM_PADDING_NONE + 1, CSSM_PADDING_ZERO = CSSM_PADDING_NONE + 2, CSSM_PADDING_ONE = CSSM_PADDING_NONE + 3, CSSM_PADDING_ALTERNATE = CSSM_PADDING_NONE + 4, CSSM_PADDING_FF = CSSM_PADDING_NONE + 5, CSSM_PADDING_PKCS5 = CSSM_PADDING_NONE + 6, CSSM_PADDING_PKCS7 = CSSM_PADDING_NONE + 7, CSSM_PADDING_CIPHERSTEALING = CSSM_PADDING_NONE + 8, CSSM_PADDING_RANDOM = CSSM_PADDING_NONE + 9, CSSM_PADDING_PKCS1 = CSSM_PADDING_NONE + 10, CSSM_PADDING_SIGRAW = CSSM_PADDING_NONE + 11, CSSM_PADDING_VENDOR_DEFINED = CSSM_PADDING_NONE + 0x80000000 }; typedef CSSM_ALGORITHMS CSSM_KEY_TYPE; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_context_attribute { CSSM_ATTRIBUTE_TYPE AttributeType; uint32 AttributeLength; union __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_context_attribute_value { char *String; uint32 Uint32; CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; CSSM_KEY_PTR Key; CSSM_DATA_PTR Data; CSSM_PADDING Padding; CSSM_DATE_PTR Date; CSSM_RANGE_PTR Range; CSSM_CRYPTO_DATA_PTR CryptoData; CSSM_VERSION_PTR Version; CSSM_DL_DB_HANDLE_PTR DLDBHandle; struct cssm_kr_profile *KRProfile; } Attribute; } CSSM_CONTEXT_ATTRIBUTE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CONTEXT_ATTRIBUTE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_context { CSSM_CONTEXT_TYPE ContextType; CSSM_ALGORITHMS AlgorithmType; uint32 NumberOfAttributes; CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; CSSM_CSP_HANDLE CSPHandle; CSSM_BOOL Privileged; uint32 EncryptionProhibited; uint32 WorkFactor; uint32 Reserved; } CSSM_CONTEXT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CONTEXT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_SC_FLAGS; enum { CSSM_CSP_TOK_RNG = 0x00000001, CSSM_CSP_TOK_CLOCK_EXISTS = 0x00000040 }; typedef uint32 CSSM_CSP_READER_FLAGS; enum { CSSM_CSP_RDR_TOKENPRESENT = 0x00000001, CSSM_CSP_RDR_EXISTS = 0x00000002, CSSM_CSP_RDR_HW = 0x00000004 }; typedef uint32 CSSM_CSP_FLAGS; enum { CSSM_CSP_TOK_WRITE_PROTECTED = 0x00000002, CSSM_CSP_TOK_LOGIN_REQUIRED = 0x00000004, CSSM_CSP_TOK_USER_PIN_INITIALIZED = 0x00000008, CSSM_CSP_TOK_PROT_AUTHENTICATION = 0x00000100, CSSM_CSP_TOK_USER_PIN_EXPIRED = 0x00100000, CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 0x00200000, CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 0x00400000, CSSM_CSP_STORES_PRIVATE_KEYS = 0x01000000, CSSM_CSP_STORES_PUBLIC_KEYS = 0x02000000, CSSM_CSP_STORES_SESSION_KEYS = 0x04000000, CSSM_CSP_STORES_CERTIFICATES = 0x08000000, CSSM_CSP_STORES_GENERIC = 0x10000000 }; typedef uint32 CSSM_PKCS_OAEP_MGF; enum { CSSM_PKCS_OAEP_MGF_NONE = 0, CSSM_PKCS_OAEP_MGF1_SHA1 = CSSM_PKCS_OAEP_MGF_NONE + 1, CSSM_PKCS_OAEP_MGF1_MD5 = CSSM_PKCS_OAEP_MGF_NONE + 2 }; typedef uint32 CSSM_PKCS_OAEP_PSOURCE; enum { CSSM_PKCS_OAEP_PSOURCE_NONE = 0, CSSM_PKCS_OAEP_PSOURCE_Pspecified = CSSM_PKCS_OAEP_PSOURCE_NONE + 1 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_pkcs1_oaep_params { uint32 HashAlgorithm; SecAsn1Item HashParams; CSSM_PKCS_OAEP_MGF MGF; SecAsn1Item MGFParams; CSSM_PKCS_OAEP_PSOURCE PSource; SecAsn1Item PSourceParams; } CSSM_PKCS1_OAEP_PARAMS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_PKCS1_OAEP_PARAMS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_csp_operational_statistics { CSSM_BOOL UserAuthenticated; CSSM_CSP_FLAGS DeviceFlags; uint32 TokenMaxSessionCount; uint32 TokenOpenedSessionCount; uint32 TokenMaxRWSessionCount; uint32 TokenOpenedRWSessionCount; uint32 TokenTotalPublicMem; uint32 TokenFreePublicMem; uint32 TokenTotalPrivateMem; uint32 TokenFreePrivateMem; } CSSM_CSP_OPERATIONAL_STATISTICS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CSP_OPERATIONAL_STATISTICS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); enum { CSSM_VALUE_NOT_AVAILABLE = -1 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_pkcs5_pbkdf1_params { SecAsn1Item Passphrase; SecAsn1Item InitVector; } CSSM_PKCS5_PBKDF1_PARAMS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_PKCS5_PBKDF1_PARAMS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_PKCS5_PBKDF2_PRF; enum { CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_pkcs5_pbkdf2_params { SecAsn1Item Passphrase; CSSM_PKCS5_PBKDF2_PRF PseudoRandomFunction; } CSSM_PKCS5_PBKDF2_PARAMS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_PKCS5_PBKDF2_PARAMS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_kea_derive_params { SecAsn1Item Rb; SecAsn1Item Yb; } CSSM_KEA_DERIVE_PARAMS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KEA_DERIVE_PARAMS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_authority_id { SecAsn1Item *AuthorityCert; CSSM_NET_ADDRESS_PTR AuthorityLocation; } CSSM_TP_AUTHORITY_ID __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_AUTHORITY_ID_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_AUTHORITY_REQUEST_TYPE, *CSSM_TP_AUTHORITY_REQUEST_TYPE_PTR; enum { CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 0x01, CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 0x02, CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 0x03, CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 0x04, CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 0x05, CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 0x06, CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 0x07, CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 0x100 }; typedef CSSM_RETURN ( * CSSM_TP_VERIFICATION_RESULTS_CALLBACK) (CSSM_MODULE_HANDLE ModuleHandle, void *CallerCtx, CSSM_DATA_PTR VerifiedCert) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef SecAsn1Oid *CSSM_OID_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_field { SecAsn1Oid FieldOid; SecAsn1Item FieldValue; } CSSM_FIELD __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_FIELD_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_policyinfo { uint32 NumberOfPolicyIds; CSSM_FIELD_PTR PolicyIds; void *PolicyControl; } CSSM_TP_POLICYINFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_POLICYINFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_SERVICES; enum { CSSM_TP_KEY_ARCHIVE = 0x0001, CSSM_TP_CERT_PUBLISH = 0x0002, CSSM_TP_CERT_NOTIFY_RENEW = 0x0004, CSSM_TP_CERT_DIR_UPDATE = 0x0008, CSSM_TP_CRL_DISTRIBUTE = 0x0010 }; typedef uint32 CSSM_TP_ACTION; enum { CSSM_TP_ACTION_DEFAULT = 0 }; typedef uint32 CSSM_TP_STOP_ON; enum { CSSM_TP_STOP_ON_POLICY = 0, CSSM_TP_STOP_ON_NONE = 1, CSSM_TP_STOP_ON_FIRST_PASS = 2, CSSM_TP_STOP_ON_FIRST_FAIL = 3 }; typedef char *CSSM_TIMESTRING; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_dl_db_list { uint32 NumHandles; CSSM_DL_DB_HANDLE_PTR DLDBHandle; } CSSM_DL_DB_LIST __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DL_DB_LIST_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_callerauth_context { CSSM_TP_POLICYINFO Policy; CSSM_TIMESTRING VerifyTime; CSSM_TP_STOP_ON VerificationAbortOn; CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; uint32 NumberOfAnchorCerts; CSSM_DATA_PTR AnchorCerts; CSSM_DL_DB_LIST_PTR DBList; CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } CSSM_TP_CALLERAUTH_CONTEXT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CALLERAUTH_CONTEXT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CRL_PARSE_FORMAT, * CSSM_CRL_PARSE_FORMAT_PTR; enum { CSSM_CRL_PARSE_FORMAT_NONE = 0x00, CSSM_CRL_PARSE_FORMAT_CUSTOM = 0x01, CSSM_CRL_PARSE_FORMAT_SEXPR = 0x02, CSSM_CRL_PARSE_FORMAT_COMPLEX = 0x03, CSSM_CRL_PARSE_FORMAT_OID_NAMED = 0x04, CSSM_CRL_PARSE_FORMAT_TUPLE = 0x05, CSSM_CRL_PARSE_FORMAT_MULTIPLE = 0x7FFE, CSSM_CRL_PARSE_FORMAT_LAST = 0x7FFF, CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 0x8000 }; typedef uint32 CSSM_CRL_TYPE, *CSSM_CRL_TYPE_PTR; enum { CSSM_CRL_TYPE_UNKNOWN = 0x00, CSSM_CRL_TYPE_X_509v1 = 0x01, CSSM_CRL_TYPE_X_509v2 = 0x02, CSSM_CRL_TYPE_SPKI = 0x03, CSSM_CRL_TYPE_MULTIPLE = 0x7FFE }; typedef uint32 CSSM_CRL_ENCODING, *CSSM_CRL_ENCODING_PTR; enum { CSSM_CRL_ENCODING_UNKNOWN = 0x00, CSSM_CRL_ENCODING_CUSTOM = 0x01, CSSM_CRL_ENCODING_BER = 0x02, CSSM_CRL_ENCODING_DER = 0x03, CSSM_CRL_ENCODING_BLOOM = 0x04, CSSM_CRL_ENCODING_SEXPR = 0x05, CSSM_CRL_ENCODING_MULTIPLE = 0x7FFE }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_encoded_crl { CSSM_CRL_TYPE CrlType; CSSM_CRL_ENCODING CrlEncoding; SecAsn1Item CrlBlob; } CSSM_ENCODED_CRL __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_ENCODED_CRL_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_parsed_crl { CSSM_CRL_TYPE CrlType; CSSM_CRL_PARSE_FORMAT ParsedCrlFormat; void *ParsedCrl; } CSSM_PARSED_CRL __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_PARSED_CRL_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_crl_pair { CSSM_ENCODED_CRL EncodedCrl; CSSM_PARSED_CRL ParsedCrl; } CSSM_CRL_PAIR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CRL_PAIR_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CRLGROUP_TYPE, * CSSM_CRLGROUP_TYPE_PTR; enum { CSSM_CRLGROUP_DATA = 0x00, CSSM_CRLGROUP_ENCODED_CRL = 0x01, CSSM_CRLGROUP_PARSED_CRL = 0x02, CSSM_CRLGROUP_CRL_PAIR = 0x03 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_crlgroup { CSSM_CRL_TYPE CrlType; CSSM_CRL_ENCODING CrlEncoding; uint32 NumberOfCrls; union { CSSM_DATA_PTR CrlList; CSSM_ENCODED_CRL_PTR EncodedCrlList; CSSM_PARSED_CRL_PTR ParsedCrlList; CSSM_CRL_PAIR_PTR PairCrlList; } GroupCrlList; CSSM_CRLGROUP_TYPE CrlGroupType; } CSSM_CRLGROUP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CRLGROUP_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_fieldgroup { int NumberOfFields; CSSM_FIELD_PTR Fields; } CSSM_FIELDGROUP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_FIELDGROUP_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_EVIDENCE_FORM; enum { CSSM_EVIDENCE_FORM_UNSPECIFIC = 0x0, CSSM_EVIDENCE_FORM_CERT = 0x1, CSSM_EVIDENCE_FORM_CRL = 0x2, CSSM_EVIDENCE_FORM_CERT_ID = 0x3, CSSM_EVIDENCE_FORM_CRL_ID = 0x4, CSSM_EVIDENCE_FORM_VERIFIER_TIME = 0x5, CSSM_EVIDENCE_FORM_CRL_THISTIME = 0x6, CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 0x7, CSSM_EVIDENCE_FORM_POLICYINFO = 0x8, CSSM_EVIDENCE_FORM_TUPLEGROUP = 0x9 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_evidence { CSSM_EVIDENCE_FORM EvidenceForm; void *Evidence; } CSSM_EVIDENCE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_EVIDENCE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_verify_context { CSSM_TP_ACTION Action; SecAsn1Item ActionData; CSSM_CRLGROUP Crls; CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; } CSSM_TP_VERIFY_CONTEXT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_VERIFY_CONTEXT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_verify_context_result { uint32 NumberOfEvidences; CSSM_EVIDENCE_PTR Evidence; } CSSM_TP_VERIFY_CONTEXT_RESULT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_VERIFY_CONTEXT_RESULT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_request_set { uint32 NumberOfRequests; void *Requests; } CSSM_TP_REQUEST_SET __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_REQUEST_SET_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_tp_result_set { uint32 NumberOfResults; void *Results; } CSSM_TP_RESULT_SET __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_RESULT_SET_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CONFIRM_STATUS, *CSSM_TP_CONFIRM_STATUS_PTR; enum { CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0x0, CSSM_TP_CONFIRM_ACCEPT = 0x1, CSSM_TP_CONFIRM_REJECT = 0x2 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_confirm_response { uint32 NumberOfResponses; CSSM_TP_CONFIRM_STATUS_PTR Responses; } CSSM_TP_CONFIRM_RESPONSE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CONFIRM_RESPONSE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); enum { CSSM_ESTIMATED_TIME_UNKNOWN = -1 }; enum { CSSM_ELAPSED_TIME_UNKNOWN = -1, CSSM_ELAPSED_TIME_COMPLETE = -2 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certissue_input { CSSM_SUBSERVICE_UID CSPSubserviceUid; CSSM_CL_HANDLE CLHandle; uint32 NumberOfTemplateFields; CSSM_FIELD_PTR SubjectCertFields; CSSM_TP_SERVICES MoreServiceRequests; uint32 NumberOfServiceControls; CSSM_FIELD_PTR ServiceControls; CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } CSSM_TP_CERTISSUE_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTISSUE_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CERTISSUE_STATUS; enum { CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0x0, CSSM_TP_CERTISSUE_OK = 0x1, CSSM_TP_CERTISSUE_OKWITHCERTMODS = 0x2, CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 0x3, CSSM_TP_CERTISSUE_REJECTED = 0x4, CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 0x5, CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 0x6 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certissue_output { CSSM_TP_CERTISSUE_STATUS IssueStatus; CSSM_CERTGROUP_PTR CertGroup; CSSM_TP_SERVICES PerformedServiceRequests; } CSSM_TP_CERTISSUE_OUTPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTISSUE_OUTPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CERTCHANGE_ACTION; enum { CSSM_TP_CERTCHANGE_NONE = 0x0, CSSM_TP_CERTCHANGE_REVOKE = 0x1, CSSM_TP_CERTCHANGE_HOLD = 0x2, CSSM_TP_CERTCHANGE_RELEASE = 0x3 }; typedef uint32 CSSM_TP_CERTCHANGE_REASON; enum { CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0x0, CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 0x1, CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 0x2, CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 0x3, CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 0x4, CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 0x5, CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 0x6, CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 0x7 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certchange_input { CSSM_TP_CERTCHANGE_ACTION Action; CSSM_TP_CERTCHANGE_REASON Reason; CSSM_CL_HANDLE CLHandle; CSSM_DATA_PTR Cert; CSSM_FIELD_PTR ChangeInfo; CSSM_TIMESTRING StartTime; CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } CSSM_TP_CERTCHANGE_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTCHANGE_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CERTCHANGE_STATUS; enum { CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0x0, CSSM_TP_CERTCHANGE_OK = 0x1, CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 0x2, CSSM_TP_CERTCHANGE_WRONGCA = 0x3, CSSM_TP_CERTCHANGE_REJECTED = 0x4, CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 0x5 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certchange_output { CSSM_TP_CERTCHANGE_STATUS ActionStatus; CSSM_FIELD RevokeInfo; } CSSM_TP_CERTCHANGE_OUTPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTCHANGE_OUTPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certverify_input { CSSM_CL_HANDLE CLHandle; CSSM_DATA_PTR Cert; CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; } CSSM_TP_CERTVERIFY_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTVERIFY_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CERTVERIFY_STATUS; enum { CSSM_TP_CERTVERIFY_UNKNOWN = 0x0, CSSM_TP_CERTVERIFY_VALID = 0x1, CSSM_TP_CERTVERIFY_INVALID = 0x2, CSSM_TP_CERTVERIFY_REVOKED = 0x3, CSSM_TP_CERTVERIFY_SUSPENDED = 0x4, CSSM_TP_CERTVERIFY_EXPIRED = 0x5, CSSM_TP_CERTVERIFY_NOT_VALID_YET = 0x6, CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 0x7, CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 0x8, CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 0x9, CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 0xA, CSSM_TP_CERTVERIFY_INVALID_POLICY = 0xB, CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 0xC, CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 0xD, CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 0xE, CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 0xF, CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 0x10 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certverify_output { CSSM_TP_CERTVERIFY_STATUS VerifyStatus; uint32 NumberOfEvidence; CSSM_EVIDENCE_PTR Evidence; } CSSM_TP_CERTVERIFY_OUTPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTVERIFY_OUTPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certnotarize_input { CSSM_CL_HANDLE CLHandle; uint32 NumberOfFields; CSSM_FIELD_PTR MoreFields; CSSM_FIELD_PTR SignScope; uint32 ScopeSize; CSSM_TP_SERVICES MoreServiceRequests; uint32 NumberOfServiceControls; CSSM_FIELD_PTR ServiceControls; CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } CSSM_TP_CERTNOTARIZE_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTNOTARIZE_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CERTNOTARIZE_STATUS; enum { CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0x0, CSSM_TP_CERTNOTARIZE_OK = 0x1, CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 0x2, CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 0x3, CSSM_TP_CERTNOTARIZE_REJECTED = 0x4, CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 0x5 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certnotarize_output { CSSM_TP_CERTNOTARIZE_STATUS NotarizeStatus; CSSM_CERTGROUP_PTR NotarizedCertGroup; CSSM_TP_SERVICES PerformedServiceRequests; } CSSM_TP_CERTNOTARIZE_OUTPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTNOTARIZE_OUTPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certreclaim_input { CSSM_CL_HANDLE CLHandle; uint32 NumberOfSelectionFields; CSSM_FIELD_PTR SelectionFields; CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } CSSM_TP_CERTRECLAIM_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTRECLAIM_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CERTRECLAIM_STATUS; enum { CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0x0, CSSM_TP_CERTRECLAIM_OK = 0x1, CSSM_TP_CERTRECLAIM_NOMATCH = 0x2, CSSM_TP_CERTRECLAIM_REJECTED = 0x3, CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 0x4 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_certreclaim_output { CSSM_TP_CERTRECLAIM_STATUS ReclaimStatus; CSSM_CERTGROUP_PTR ReclaimedCertGroup; CSSM_LONG_HANDLE KeyCacheHandle; } CSSM_TP_CERTRECLAIM_OUTPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CERTRECLAIM_OUTPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_crlissue_input { CSSM_CL_HANDLE CLHandle; uint32 CrlIdentifier; CSSM_TIMESTRING CrlThisTime; CSSM_FIELD_PTR PolicyIdentifier; CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } CSSM_TP_CRLISSUE_INPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CRLISSUE_INPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_CRLISSUE_STATUS; enum { CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0x0, CSSM_TP_CRLISSUE_OK = 0x1, CSSM_TP_CRLISSUE_NOT_CURRENT = 0x2, CSSM_TP_CRLISSUE_INVALID_DOMAIN = 0x3, CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 0x4, CSSM_TP_CRLISSUE_REJECTED = 0x5, CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 0x6 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_tp_crlissue_output { CSSM_TP_CRLISSUE_STATUS IssueStatus; CSSM_ENCODED_CRL_PTR Crl; CSSM_TIMESTRING CrlNextTime; } CSSM_TP_CRLISSUE_OUTPUT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_TP_CRLISSUE_OUTPUT_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_TP_FORM_TYPE; enum { CSSM_TP_FORM_TYPE_GENERIC = 0x0, CSSM_TP_FORM_TYPE_REGISTRATION = 0x1 }; typedef uint32 CSSM_CL_TEMPLATE_TYPE; enum { CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1, CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2 }; typedef uint32 CSSM_CERT_BUNDLE_TYPE; enum { CSSM_CERT_BUNDLE_UNKNOWN = 0x00, CSSM_CERT_BUNDLE_CUSTOM = 0x01, CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 0x02, CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 0x03, CSSM_CERT_BUNDLE_PKCS12 = 0x04, CSSM_CERT_BUNDLE_PFX = 0x05, CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 0x06, CSSM_CERT_BUNDLE_PGP_KEYRING = 0x07, CSSM_CERT_BUNDLE_LAST = 0x7FFF, CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 0x8000 }; typedef uint32 CSSM_CERT_BUNDLE_ENCODING; enum { CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0x00, CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 0x01, CSSM_CERT_BUNDLE_ENCODING_BER = 0x02, CSSM_CERT_BUNDLE_ENCODING_DER = 0x03, CSSM_CERT_BUNDLE_ENCODING_SEXPR = 0x04, CSSM_CERT_BUNDLE_ENCODING_PGP = 0x05 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_cert_bundle_header { CSSM_CERT_BUNDLE_TYPE BundleType; CSSM_CERT_BUNDLE_ENCODING BundleEncoding; } CSSM_CERT_BUNDLE_HEADER __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CERT_BUNDLE_HEADER_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_cert_bundle { CSSM_CERT_BUNDLE_HEADER BundleHeader; SecAsn1Item Bundle; } CSSM_CERT_BUNDLE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_CERT_BUNDLE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); enum { CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = 0xFFFFFFFF }; typedef uint32 CSSM_DB_ATTRIBUTE_NAME_FORMAT, *CSSM_DB_ATTRIBUTE_NAME_FORMAT_PTR; enum { CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0, CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1, CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2 }; typedef uint32 CSSM_DB_ATTRIBUTE_FORMAT, *CSSM_DB_ATTRIBUTE_FORMAT_PTR; enum { CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0, CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1, CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2, CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3, CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4, CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5, CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6, CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7, CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_attribute_info { CSSM_DB_ATTRIBUTE_NAME_FORMAT AttributeNameFormat; union __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_attribute_label { char *AttributeName; SecAsn1Oid AttributeOID; uint32 AttributeID; } Label; CSSM_DB_ATTRIBUTE_FORMAT AttributeFormat; } CSSM_DB_ATTRIBUTE_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_ATTRIBUTE_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_attribute_data { CSSM_DB_ATTRIBUTE_INFO Info; uint32 NumberOfValues; CSSM_DATA_PTR Value; } CSSM_DB_ATTRIBUTE_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_ATTRIBUTE_DATA_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_DB_RECORDTYPE; enum { CSSM_DB_RECORDTYPE_SCHEMA_START = 0x00000000, CSSM_DB_RECORDTYPE_SCHEMA_END = CSSM_DB_RECORDTYPE_SCHEMA_START + 4, CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 0x0000000A, CSSM_DB_RECORDTYPE_OPEN_GROUP_END = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 8, CSSM_DB_RECORDTYPE_APP_DEFINED_START = 0x80000000, CSSM_DB_RECORDTYPE_APP_DEFINED_END = 0xffffffff, CSSM_DL_DB_SCHEMA_INFO = CSSM_DB_RECORDTYPE_SCHEMA_START + 0, CSSM_DL_DB_SCHEMA_INDEXES = CSSM_DB_RECORDTYPE_SCHEMA_START + 1, CSSM_DL_DB_SCHEMA_ATTRIBUTES = CSSM_DB_RECORDTYPE_SCHEMA_START + 2, CSSM_DL_DB_SCHEMA_PARSING_MODULE = CSSM_DB_RECORDTYPE_SCHEMA_START + 3, CSSM_DL_DB_RECORD_ANY = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 0, CSSM_DL_DB_RECORD_CERT = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 1, CSSM_DL_DB_RECORD_CRL = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 2, CSSM_DL_DB_RECORD_POLICY = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 3, CSSM_DL_DB_RECORD_GENERIC = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 4, CSSM_DL_DB_RECORD_PUBLIC_KEY = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 5, CSSM_DL_DB_RECORD_PRIVATE_KEY = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 6, CSSM_DL_DB_RECORD_SYMMETRIC_KEY = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 7, CSSM_DL_DB_RECORD_ALL_KEYS = CSSM_DB_RECORDTYPE_OPEN_GROUP_START + 8 }; enum { CSSM_DB_CERT_USE_TRUSTED = 0x00000001, CSSM_DB_CERT_USE_SYSTEM = 0x00000002, CSSM_DB_CERT_USE_OWNER = 0x00000004, CSSM_DB_CERT_USE_REVOKED = 0x00000008, CSSM_DB_CERT_USE_SIGNING = 0x00000010, CSSM_DB_CERT_USE_PRIVACY = 0x00000020 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_record_attribute_info { CSSM_DB_RECORDTYPE DataRecordType; uint32 NumberOfAttributes; CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; } CSSM_DB_RECORD_ATTRIBUTE_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_record_attribute_data { CSSM_DB_RECORDTYPE DataRecordType; uint32 SemanticInformation; uint32 NumberOfAttributes; CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; } CSSM_DB_RECORD_ATTRIBUTE_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_parsing_module_info { CSSM_DB_RECORDTYPE RecordType; CSSM_SUBSERVICE_UID ModuleSubserviceUid; } CSSM_DB_PARSING_MODULE_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_PARSING_MODULE_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_DB_INDEX_TYPE; enum { CSSM_DB_INDEX_UNIQUE = 0, CSSM_DB_INDEX_NONUNIQUE = 1 }; typedef uint32 CSSM_DB_INDEXED_DATA_LOCATION; enum { CSSM_DB_INDEX_ON_UNKNOWN = 0, CSSM_DB_INDEX_ON_ATTRIBUTE = 1, CSSM_DB_INDEX_ON_RECORD = 2 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_index_info { CSSM_DB_INDEX_TYPE IndexType; CSSM_DB_INDEXED_DATA_LOCATION IndexedDataLocation; CSSM_DB_ATTRIBUTE_INFO Info; } CSSM_DB_INDEX_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_INDEX_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_unique_record { CSSM_DB_INDEX_INFO RecordLocator; SecAsn1Item RecordIdentifier; } CSSM_DB_UNIQUE_RECORD __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_UNIQUE_RECORD_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_record_index_info { CSSM_DB_RECORDTYPE DataRecordType; uint32 NumberOfIndexes; CSSM_DB_INDEX_INFO_PTR IndexInfo; } CSSM_DB_RECORD_INDEX_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_RECORD_INDEX_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_DB_ACCESS_TYPE, *CSSM_DB_ACCESS_TYPE_PTR; enum { CSSM_DB_ACCESS_READ = 0x00001, CSSM_DB_ACCESS_WRITE = 0x00002, CSSM_DB_ACCESS_PRIVILEGED = 0x00004 }; typedef uint32 CSSM_DB_MODIFY_MODE; enum { CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0, CSSM_DB_MODIFY_ATTRIBUTE_ADD = CSSM_DB_MODIFY_ATTRIBUTE_NONE + 1, CSSM_DB_MODIFY_ATTRIBUTE_DELETE = CSSM_DB_MODIFY_ATTRIBUTE_NONE + 2, CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = CSSM_DB_MODIFY_ATTRIBUTE_NONE + 3 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_dbinfo { uint32 NumberOfRecordTypes; CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; CSSM_BOOL IsLocal; char *AccessPath; void *Reserved; } CSSM_DBINFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DBINFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_DB_OPERATOR, *CSSM_DB_OPERATOR_PTR; enum { CSSM_DB_EQUAL = 0, CSSM_DB_NOT_EQUAL = 1, CSSM_DB_LESS_THAN = 2, CSSM_DB_GREATER_THAN = 3, CSSM_DB_CONTAINS = 4, CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5, CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6 }; typedef uint32 CSSM_DB_CONJUNCTIVE, *CSSM_DB_CONJUNCTIVE_PTR; enum { CSSM_DB_NONE = 0, CSSM_DB_AND = 1, CSSM_DB_OR = 2 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_selection_predicate { CSSM_DB_OPERATOR DbOperator; CSSM_DB_ATTRIBUTE_DATA Attribute; } CSSM_SELECTION_PREDICATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SELECTION_PREDICATE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); enum { CSSM_QUERY_TIMELIMIT_NONE = 0 }; enum { CSSM_QUERY_SIZELIMIT_NONE = 0 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_query_limits { uint32 TimeLimit; uint32 SizeLimit; } CSSM_QUERY_LIMITS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_QUERY_LIMITS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_QUERY_FLAGS; enum { CSSM_QUERY_RETURN_DATA = 0x01 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_query { CSSM_DB_RECORDTYPE RecordType; CSSM_DB_CONJUNCTIVE Conjunctive; uint32 NumSelectionPredicates; CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; CSSM_QUERY_LIMITS QueryLimits; CSSM_QUERY_FLAGS QueryFlags; } CSSM_QUERY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_QUERY_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_DLTYPE, *CSSM_DLTYPE_PTR; enum { CSSM_DL_UNKNOWN = 0, CSSM_DL_CUSTOM = 1, CSSM_DL_LDAP = 2, CSSM_DL_ODBC = 3, CSSM_DL_PKCS11 = 4, CSSM_DL_FFS = 5, CSSM_DL_MEMORY = 6, CSSM_DL_REMOTEDIR = 7 }; typedef void *CSSM_DL_CUSTOM_ATTRIBUTES; typedef void *CSSM_DL_LDAP_ATTRIBUTES; typedef void *CSSM_DL_ODBC_ATTRIBUTES; typedef void *CSSM_DL_FFS_ATTRIBUTES; typedef struct cssm_dl_pkcs11_attributes { uint32 DeviceAccessFlags; } *CSSM_DL_PKCS11_ATTRIBUTE, *CSSM_DL_PKCS11_ATTRIBUTE_PTR; enum { CSSM_DB_DATASTORES_UNKNOWN = 0xFFFFFFFF }; typedef struct cssm_name_list { uint32 NumStrings; char **String; } CSSM_NAME_LIST __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_NAME_LIST_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_DB_RETRIEVAL_MODES; enum { CSSM_DB_TRANSACTIONAL_MODE = 0, CSSM_DB_FILESYSTEMSCAN_MODE = 1 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_db_schema_attribute_info { uint32 AttributeId; char *AttributeName; SecAsn1Oid AttributeNameID; CSSM_DB_ATTRIBUTE_FORMAT DataType; } CSSM_DB_SCHEMA_ATTRIBUTE_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_SCHEMA_ATTRIBUTE_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct cssm_db_schema_index_info { uint32 AttributeId; uint32 IndexId; CSSM_DB_INDEX_TYPE IndexType; CSSM_DB_INDEXED_DATA_LOCATION IndexedDataLocation; } CSSM_DB_SCHEMA_INDEX_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_DB_SCHEMA_INDEX_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef uint8 CSSM_BER_TAG; typedef SecAsn1AlgId *CSSM_X509_ALGORITHM_IDENTIFIER_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_type_value_pair { SecAsn1Oid type; CSSM_BER_TAG valueType; SecAsn1Item value; } CSSM_X509_TYPE_VALUE_PAIR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_TYPE_VALUE_PAIR_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_rdn { uint32 numberOfPairs; CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; } CSSM_X509_RDN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_RDN_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_name { uint32 numberOfRDNs; CSSM_X509_RDN_PTR RelativeDistinguishedName; } CSSM_X509_NAME __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_NAME_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef SecAsn1PubKeyInfo *CSSM_X509_SUBJECT_PUBLIC_KEY_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_time { CSSM_BER_TAG timeType; SecAsn1Item time; } CSSM_X509_TIME __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_TIME_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) x509_validity { CSSM_X509_TIME notBefore; CSSM_X509_TIME notAfter; } CSSM_X509_VALIDITY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_VALIDITY_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CSSM_BOOL CSSM_X509_OPTION; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509ext_basicConstraints { CSSM_BOOL cA; CSSM_X509_OPTION pathLenConstraintPresent; uint32 pathLenConstraint; } CSSM_X509EXT_BASICCONSTRAINTS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509EXT_BASICCONSTRAINTS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef enum extension_data_format { CSSM_X509_DATAFORMAT_ENCODED = 0, CSSM_X509_DATAFORMAT_PARSED, CSSM_X509_DATAFORMAT_PAIR } CSSM_X509EXT_DATA_FORMAT; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_extensionTagAndValue { CSSM_BER_TAG type; SecAsn1Item value; } CSSM_X509EXT_TAGandVALUE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509EXT_TAGandVALUE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509ext_pair { CSSM_X509EXT_TAGandVALUE tagAndValue; void *parsedValue; } CSSM_X509EXT_PAIR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509EXT_PAIR_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_extension { SecAsn1Oid extnId; CSSM_BOOL critical; CSSM_X509EXT_DATA_FORMAT format; union __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509ext_value { CSSM_X509EXT_TAGandVALUE *tagAndValue; void *parsedValue; CSSM_X509EXT_PAIR *valuePair; } value; SecAsn1Item BERvalue; } CSSM_X509_EXTENSION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_EXTENSION_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_extensions { uint32 numberOfExtensions; CSSM_X509_EXTENSION_PTR extensions; } CSSM_X509_EXTENSIONS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_EXTENSIONS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_tbs_certificate { SecAsn1Item version; SecAsn1Item serialNumber; SecAsn1AlgId signature; CSSM_X509_NAME issuer; CSSM_X509_VALIDITY validity; CSSM_X509_NAME subject; SecAsn1PubKeyInfo subjectPublicKeyInfo; SecAsn1Item issuerUniqueIdentifier; SecAsn1Item subjectUniqueIdentifier; CSSM_X509_EXTENSIONS extensions; } CSSM_X509_TBS_CERTIFICATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_TBS_CERTIFICATE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_signature { SecAsn1AlgId algorithmIdentifier; SecAsn1Item encrypted; } CSSM_X509_SIGNATURE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_SIGNATURE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_signed_certificate { CSSM_X509_TBS_CERTIFICATE certificate; CSSM_X509_SIGNATURE signature; } CSSM_X509_SIGNED_CERTIFICATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_SIGNED_CERTIFICATE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509ext_policyQualifierInfo { SecAsn1Oid policyQualifierId; SecAsn1Item value; } CSSM_X509EXT_POLICYQUALIFIERINFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509EXT_POLICYQUALIFIERINFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509ext_policyQualifiers { uint32 numberOfPolicyQualifiers; CSSM_X509EXT_POLICYQUALIFIERINFO *policyQualifier; } CSSM_X509EXT_POLICYQUALIFIERS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509EXT_POLICYQUALIFIERS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509ext_policyInfo { SecAsn1Oid policyIdentifier; CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; } CSSM_X509EXT_POLICYINFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509EXT_POLICYINFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_revoked_cert_entry { SecAsn1Item certificateSerialNumber; CSSM_X509_TIME revocationDate; CSSM_X509_EXTENSIONS extensions; } CSSM_X509_REVOKED_CERT_ENTRY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_REVOKED_CERT_ENTRY_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_revoked_cert_list { uint32 numberOfRevokedCertEntries; CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; } CSSM_X509_REVOKED_CERT_LIST __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_REVOKED_CERT_LIST_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_tbs_certlist { SecAsn1Item version; SecAsn1AlgId signature; CSSM_X509_NAME issuer; CSSM_X509_TIME thisUpdate; CSSM_X509_TIME nextUpdate; CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; CSSM_X509_EXTENSIONS extensions; } CSSM_X509_TBS_CERTLIST __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_TBS_CERTLIST_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_x509_signed_crl { CSSM_X509_TBS_CERTLIST tbsCertList; CSSM_X509_SIGNATURE signature; } CSSM_X509_SIGNED_CRL __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_X509_SIGNED_CRL_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecCertificateGetTypeID(void) __attribute__((availability(macosx,introduced=10.3))); _Nullable SecCertificateRef SecCertificateCreateWithData(CFAllocatorRef _Nullable allocator, CFDataRef data) __attribute__((availability(macosx,introduced=10.6))); CFDataRef SecCertificateCopyData(SecCertificateRef certificate) __attribute__((availability(macosx,introduced=10.6))); _Nullable CFStringRef SecCertificateCopySubjectSummary(SecCertificateRef certificate) __attribute__((availability(macosx,introduced=10.6))); OSStatus SecCertificateCopyCommonName(SecCertificateRef certificate, CFStringRef * _Nonnull __attribute__((cf_returns_retained)) commonName) __attribute__((availability(macosx,introduced=10.5))); OSStatus SecCertificateCopyEmailAddresses(SecCertificateRef certificate, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) emailAddresses) __attribute__((availability(macosx,introduced=10.5))); _Nullable CFDataRef SecCertificateCopyNormalizedIssuerSequence(SecCertificateRef certificate) __attribute__((availability(macosx,introduced=10.12.4))); _Nullable CFDataRef SecCertificateCopyNormalizedSubjectSequence(SecCertificateRef certificate) __attribute__((availability(macosx,introduced=10.12.4))); _Nullable __attribute__((cf_returns_retained)) SecKeyRef SecCertificateCopyKey(SecCertificateRef certificate) __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))); OSStatus SecCertificateCopyPublicKey(SecCertificateRef certificate, SecKeyRef * _Nonnull __attribute__((cf_returns_retained)) key) __attribute__((availability(macos,introduced=10.3,deprecated=10.14,replacement="SecCertificateCopyKey"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); _Nullable CFDataRef SecCertificateCopySerialNumberData(SecCertificateRef certificate, CFErrorRef *error) __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); _Nullable CFDataRef SecCertificateCopySerialNumber(SecCertificateRef certificate, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=10.13,replacement="SecCertificateCopySerialNumberData"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); enum { kSecSubjectItemAttr = 'subj', kSecIssuerItemAttr = 'issu', kSecSerialNumberItemAttr = 'snbr', kSecPublicKeyHashItemAttr = 'hpky', kSecSubjectKeyIdentifierItemAttr = 'skid', kSecCertTypeItemAttr = 'ctyp', kSecCertEncodingItemAttr = 'cenc' } ; OSStatus SecCertificateCreateFromData(const SecAsn1Item *data, CSSM_CERT_TYPE type, CSSM_CERT_ENCODING encoding, SecCertificateRef * _Nonnull __attribute__((cf_returns_retained)) certificate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateAddToKeychain(SecCertificateRef certificate, SecKeychainRef _Nullable keychain) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecCertificateGetData(SecCertificateRef certificate, CSSM_DATA_PTR data) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateGetType(SecCertificateRef certificate, CSSM_CERT_TYPE *certificateType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateGetSubject(SecCertificateRef certificate, const CSSM_X509_NAME * _Nullable * _Nonnull subject) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateGetIssuer(SecCertificateRef certificate, const CSSM_X509_NAME * _Nullable * _Nonnull issuer) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateGetCLHandle(SecCertificateRef certificate, CSSM_CL_HANDLE *clHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateGetAlgorithmID(SecCertificateRef certificate, const SecAsn1AlgId * _Nullable * _Nonnull algid) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateCopyPreference(CFStringRef name, uint32 keyUsage, SecCertificateRef * _Nonnull __attribute__((cf_returns_retained)) certificate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); _Nullable SecCertificateRef SecCertificateCopyPreferred(CFStringRef name, CFArrayRef _Nullable keyUsage) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecCertificateSetPreference(SecCertificateRef certificate, CFStringRef name, uint32 keyUsage, CFDateRef _Nullable date) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecCertificateSetPreferred(SecCertificateRef _Nullable certificate, CFStringRef name, CFArrayRef _Nullable keyUsage) __attribute__((availability(macosx,introduced=10.7))); typedef uint32_t SecKeyUsage; enum { kSecKeyUsageUnspecified = 0u, kSecKeyUsageDigitalSignature = 1u << 0, kSecKeyUsageNonRepudiation = 1u << 1, kSecKeyUsageContentCommitment= 1u << 1, kSecKeyUsageKeyEncipherment = 1u << 2, kSecKeyUsageDataEncipherment = 1u << 3, kSecKeyUsageKeyAgreement = 1u << 4, kSecKeyUsageKeyCertSign = 1u << 5, kSecKeyUsageCRLSign = 1u << 6, kSecKeyUsageEncipherOnly = 1u << 7, kSecKeyUsageDecipherOnly = 1u << 8, kSecKeyUsageCritical = 1u << 31, kSecKeyUsageAll = 0x7FFFFFFFu }; extern const CFStringRef kSecPropertyKeyType __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyKeyLabel __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyKeyLocalizedLabel __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyKeyValue __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeWarning __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeSuccess __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeSection __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeData __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeString __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeURL __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeDate __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeArray __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSecPropertyTypeNumber __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); _Nullable CFDictionaryRef SecCertificateCopyValues(SecCertificateRef certificate, CFArrayRef _Nullable keys, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7))); _Nullable CFStringRef SecCertificateCopyLongDescription(CFAllocatorRef _Nullable alloc, SecCertificateRef certificate, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7))); _Nullable CFStringRef SecCertificateCopyShortDescription(CFAllocatorRef _Nullable alloc, SecCertificateRef certificate, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7))); _Nullable CFDataRef SecCertificateCopyNormalizedIssuerContent(SecCertificateRef certificate, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.4,message="SecCertificateCopyNormalizedIssuerContent is deprecated. Use SecCertificateCopyNormalizedIssuerSequence instead."))); _Nullable CFDataRef SecCertificateCopyNormalizedSubjectContent(SecCertificateRef certificate, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7,deprecated=10.12.4,message="SecCertificateCopyNormalizedSubjectContent is deprecated. Use SecCertificateCopyNormalizedSubjectSequence instead."))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecIdentityGetTypeID(void) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecIdentityCreateWithCertificate( CFTypeRef _Nullable keychainOrArray, SecCertificateRef certificateRef, SecIdentityRef * _Nonnull __attribute__((cf_returns_retained)) identityRef) __attribute__((availability(macosx,introduced=10.5))); OSStatus SecIdentityCopyCertificate( SecIdentityRef identityRef, SecCertificateRef * _Nonnull __attribute__((cf_returns_retained)) certificateRef) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecIdentityCopyPrivateKey( SecIdentityRef identityRef, SecKeyRef * _Nonnull __attribute__((cf_returns_retained)) privateKeyRef) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecIdentityCopyPreference(CFStringRef name, CSSM_KEYUSE keyUsage, CFArrayRef _Nullable validIssuers, SecIdentityRef * _Nonnull __attribute__((cf_returns_retained)) identity) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); _Nullable SecIdentityRef SecIdentityCopyPreferred(CFStringRef name, CFArrayRef _Nullable keyUsage, CFArrayRef _Nullable validIssuers) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecIdentitySetPreference(SecIdentityRef identity, CFStringRef name, CSSM_KEYUSE keyUsage) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecIdentitySetPreferred(SecIdentityRef _Nullable identity, CFStringRef name, CFArrayRef _Nullable keyUsage) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecIdentityCopySystemIdentity( CFStringRef domain, SecIdentityRef * _Nonnull __attribute__((cf_returns_retained)) idRef, CFStringRef * _Nullable __attribute__((cf_returns_retained)) actualDomain) __attribute__((availability(macosx,introduced=10.5))); OSStatus SecIdentitySetSystemIdentity( CFStringRef domain, SecIdentityRef _Nullable idRef) __attribute__((availability(macosx,introduced=10.5))); extern const CFStringRef kSecIdentityDomainDefault __attribute__((availability(macosx,introduced=10.5))); extern const CFStringRef kSecIdentityDomainKerberosKDC __attribute__((availability(macosx,introduced=10.5))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecAccessControlGetTypeID(void) __attribute__((availability(macosx,introduced=10.10))); typedef CFOptionFlags SecAccessControlCreateFlags; enum { kSecAccessControlUserPresence = 1u << 0, kSecAccessControlBiometryAny __attribute__((availability(macos,introduced=10.13.4))) __attribute__((availability(ios,introduced=11.3))) = 1u << 1, kSecAccessControlTouchIDAny __attribute__((availability(macos,introduced=10.12.1,deprecated=10.13.4,replacement="kSecAccessControlBiometryAny"))) __attribute__((availability(ios,introduced=9.0,deprecated=11.3,replacement="kSecAccessControlBiometryAny"))) = 1u << 1, kSecAccessControlBiometryCurrentSet __attribute__((availability(macos,introduced=10.13.4))) __attribute__((availability(ios,introduced=11.3))) = 1u << 3, kSecAccessControlTouchIDCurrentSet __attribute__((availability(macos,introduced=10.12.1,deprecated=10.13.4,replacement="kSecAccessControlBiometryCurrentSet"))) __attribute__((availability(ios,introduced=9.0,deprecated=11.3,replacement="kSecAccessControlBiometryCurrentSet"))) = 1u << 3, kSecAccessControlDevicePasscode __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) = 1u << 4, kSecAccessControlWatch __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=NA))) __attribute__((availability(macCatalyst,introduced=13.0))) = 1u << 5, kSecAccessControlOr __attribute__((availability(macos,introduced=10.12.1))) __attribute__((availability(ios,introduced=9.0))) = 1u << 14, kSecAccessControlAnd __attribute__((availability(macos,introduced=10.12.1))) __attribute__((availability(ios,introduced=9.0))) = 1u << 15, kSecAccessControlPrivateKeyUsage __attribute__((availability(macos,introduced=10.12.1))) __attribute__((availability(ios,introduced=9.0))) = 1u << 30, kSecAccessControlApplicationPassword __attribute__((availability(macos,introduced=10.12.1))) __attribute__((availability(ios,introduced=9.0))) = 1u << 31, } __attribute__((availability(macosx,introduced=10.10))); _Nullable SecAccessControlRef SecAccessControlCreateWithFlags(CFAllocatorRef _Nullable allocator, CFTypeRef protection, SecAccessControlCreateFlags flags, CFErrorRef *error) __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecClass __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecClassInternetPassword __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecClassGenericPassword __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecClassCertificate __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecClassKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecClassIdentity __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAccessible __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=4.0))); extern const CFStringRef kSecAttrAccess __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrAccessControl __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))); extern const CFStringRef kSecAttrAccessGroup __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=3.0))); extern const CFStringRef kSecAttrSynchronizable __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern const CFStringRef kSecAttrSynchronizableAny __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))); extern const CFStringRef kSecAttrCreationDate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrModificationDate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrDescription __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrComment __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCreator __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrType __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrLabel __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrIsInvisible __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrIsNegative __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAccount __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrService __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrGeneric __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrSecurityDomain __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrServer __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocol __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationType __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrPort __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrPath __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrSubject __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrIssuer __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrSerialNumber __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrSubjectKeyID __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrPublicKeyHash __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCertificateType __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCertificateEncoding __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyClass __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrApplicationLabel __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrIsPermanent __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrIsSensitive __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrIsExtractable __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrApplicationTag __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyType __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrPRF __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrSalt __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrRounds __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeySizeInBits __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrEffectiveKeySize __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanEncrypt __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanDecrypt __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanDerive __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanSign __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanVerify __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanWrap __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrCanUnwrap __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrSyncViewHint __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))); extern const CFStringRef kSecAttrTokenID __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=9.0))); extern const CFStringRef kSecAttrPersistantReference __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const CFStringRef kSecAttrPersistentReference __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const CFStringRef kSecAttrAccessibleWhenUnlocked __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=4.0))); extern const CFStringRef kSecAttrAccessibleAfterFirstUnlock __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=4.0))); extern const CFStringRef kSecAttrAccessibleAlways __attribute__((availability(macos,introduced=10.9,deprecated=10.14,message="Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlock"))) __attribute__((availability(ios,introduced=4.0,deprecated=12.0,message="Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlock"))); extern const CFStringRef kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))); extern const CFStringRef kSecAttrAccessibleWhenUnlockedThisDeviceOnly __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=4.0))); extern const CFStringRef kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=4.0))); extern const CFStringRef kSecAttrAccessibleAlwaysThisDeviceOnly __attribute__((availability(macos,introduced=10.9,deprecated=10.14,message="Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly"))) __attribute__((availability(ios,introduced=4.0,deprecated=12.0,message="Use an accessibility level that provides some user protection, such as kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly"))); extern const CFStringRef kSecAttrProtocolFTP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolFTPAccount __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolHTTP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolIRC __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolNNTP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolPOP3 __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolSMTP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolSOCKS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolIMAP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolLDAP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolAppleTalk __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolAFP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolTelnet __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolSSH __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolFTPS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolHTTPS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolHTTPProxy __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolHTTPSProxy __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolFTPProxy __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolSMB __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolRTSP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolRTSPProxy __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolDAAP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolEPPC __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolIPP __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolNNTPS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolLDAPS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolTelnetS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolIMAPS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolIRCS __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrProtocolPOP3S __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeNTLM __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeMSN __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeDPA __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeRPA __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeHTTPBasic __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeHTTPDigest __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeHTMLForm __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrAuthenticationTypeDefault __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyClassPublic __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyClassPrivate __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyClassSymmetric __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyTypeRSA __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecAttrKeyTypeDSA __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeAES __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeDES __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyType3DES __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeRC4 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeRC2 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeCAST __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeECDSA __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrKeyTypeEC __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=4.0))); extern const CFStringRef kSecAttrKeyTypeECSECPrimeRandom __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))); extern const CFStringRef kSecAttrPRFHmacAlgSHA1 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrPRFHmacAlgSHA224 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrPRFHmacAlgSHA256 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrPRFHmacAlgSHA384 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecAttrPRFHmacAlgSHA512 __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecMatchPolicy __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchItemList __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchSearchList __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchIssuers __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchEmailAddressIfPresent __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchSubjectContains __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchSubjectStartsWith __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecMatchSubjectEndsWith __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecMatchSubjectWholeString __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecMatchCaseInsensitive __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchDiacriticInsensitive __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecMatchWidthInsensitive __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecMatchTrustedOnly __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchValidOnDate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchLimit __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchLimitOne __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecMatchLimitAll __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecReturnData __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecReturnAttributes __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecReturnRef __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecReturnPersistentRef __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecValueData __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecValueRef __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecValuePersistentRef __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecUseItemList __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0,deprecated=12.0,message="Not implemented on this platform"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,message="Not implemented on this platform"))) __attribute__((availability(watchos,introduced=1.0,deprecated=5.0,message="Not implemented on this platform"))) __attribute__((availability(macCatalyst,introduced=13.0,deprecated=13.0,message="Not implemented on this platform"))) ; extern const CFStringRef kSecUseKeychain __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecUseOperationPrompt __attribute__((availability(macos,introduced=10.10,deprecated=11.0,message="Use kSecUseAuthenticationContext and set LAContext.localizedReason property"))) __attribute__((availability(ios,introduced=8.0,deprecated=14.0,message="Use kSecUseAuthenticationContext and set LAContext.localizedReason property"))); extern const CFStringRef kSecUseNoAuthenticationUI __attribute__((availability(macos,introduced=10.10,deprecated=10.11,message="Use kSecUseAuthenticationUI instead."))) __attribute__((availability(ios,introduced=8.0,deprecated=9.0,message="Use kSecUseAuthenticationUI instead."))); extern const CFStringRef kSecUseAuthenticationUI __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))); extern const CFStringRef kSecUseAuthenticationContext __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))); extern const CFStringRef kSecUseDataProtectionKeychain __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))); extern const CFStringRef kSecUseAuthenticationUIAllow __attribute__((availability(macos,introduced=10.11,deprecated=11.0,message="Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property"))) __attribute__((availability(ios,introduced=9.0,deprecated=14.0,message="Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property"))); extern const CFStringRef kSecUseAuthenticationUIFail __attribute__((availability(macos,introduced=10.11,deprecated=11.0,message="Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property"))) __attribute__((availability(ios,introduced=9.0,deprecated=14.0,message="Instead of kSecUseAuthenticationUI, use kSecUseAuthenticationContext and set LAContext.interactionNotAllowed property"))); extern const CFStringRef kSecUseAuthenticationUISkip __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))); extern const CFStringRef kSecAttrTokenIDSecureEnclave __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=9.0))); extern const CFStringRef kSecAttrAccessGroupToken __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))); OSStatus SecItemCopyMatching(CFDictionaryRef query, CFTypeRef * _Nullable __attribute__((cf_returns_retained)) result) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); OSStatus SecItemAdd(CFDictionaryRef attributes, CFTypeRef * _Nullable __attribute__((cf_returns_retained)) result) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); OSStatus SecItemUpdate(CFDictionaryRef query, CFDictionaryRef attributesToUpdate) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); OSStatus SecItemDelete(CFDictionaryRef query) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef UInt32 SecAccessOwnerType; enum { kSecUseOnlyUID = 1, kSecUseOnlyGID = 2, kSecHonorRoot = 0x100, kSecMatchBits = (kSecUseOnlyUID | kSecUseOnlyGID) }; extern const CFStringRef kSecACLAuthorizationAny __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationLogin __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationGenKey __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationDelete __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationExportWrapped __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationExportClear __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationImportWrapped __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationImportClear __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationSign __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationEncrypt __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationDecrypt __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationMAC __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationDerive __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationKeychainCreate __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationKeychainDelete __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationKeychainItemRead __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationKeychainItemInsert __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationKeychainItemModify __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationKeychainItemDelete __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecACLAuthorizationChangeACL __attribute__((availability(macosx,introduced=10.13.4))); extern const CFStringRef kSecACLAuthorizationChangeOwner __attribute__((availability(macosx,introduced=10.13.4))); extern const CFStringRef kSecACLAuthorizationPartitionID __attribute__((availability(macosx,introduced=10.11))); extern const CFStringRef kSecACLAuthorizationIntegrity __attribute__((availability(macosx,introduced=10.11))); CFTypeID SecAccessGetTypeID(void); OSStatus SecAccessCreate(CFStringRef descriptor, CFArrayRef _Nullable trustedlist, SecAccessRef * _Nonnull __attribute__((cf_returns_retained)) accessRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecAccessCreateFromOwnerAndACL(const CSSM_ACL_OWNER_PROTOTYPE *owner, uint32 aclCount, const CSSM_ACL_ENTRY_INFO *acls, SecAccessRef * _Nonnull __attribute__((cf_returns_retained)) accessRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); _Nullable SecAccessRef SecAccessCreateWithOwnerAndACL(uid_t userId, gid_t groupId, SecAccessOwnerType ownerType, CFArrayRef _Nullable acls, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecAccessGetOwnerAndACL(SecAccessRef accessRef, CSSM_ACL_OWNER_PROTOTYPE_PTR _Nullable * _Nonnull owner, uint32 *aclCount, CSSM_ACL_ENTRY_INFO_PTR _Nullable * _Nonnull acls) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecAccessCopyOwnerAndACL(SecAccessRef accessRef, uid_t * _Nullable userId, gid_t * _Nullable groupId, SecAccessOwnerType * _Nullable ownerType, CFArrayRef * _Nullable __attribute__((cf_returns_retained)) aclList) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecAccessCopyACLList(SecAccessRef accessRef, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) aclList) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecAccessCopySelectedACLList(SecAccessRef accessRef, CSSM_ACL_AUTHORIZATION_TAG action, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) aclList) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); _Nullable CFArrayRef SecAccessCopyMatchingACLList(SecAccessRef accessRef, CFTypeRef authorizationTag) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin enum { kSecKeyKeyClass = 0, kSecKeyPrintName = 1, kSecKeyAlias = 2, kSecKeyPermanent = 3, kSecKeyPrivate = 4, kSecKeyModifiable = 5, kSecKeyLabel = 6, kSecKeyApplicationTag = 7, kSecKeyKeyCreator = 8, kSecKeyKeyType = 9, kSecKeyKeySizeInBits = 10, kSecKeyEffectiveKeySize = 11, kSecKeyStartDate = 12, kSecKeyEndDate = 13, kSecKeySensitive = 14, kSecKeyAlwaysSensitive = 15, kSecKeyExtractable = 16, kSecKeyNeverExtractable = 17, kSecKeyEncrypt = 18, kSecKeyDecrypt = 19, kSecKeyDerive = 20, kSecKeySign = 21, kSecKeyVerify = 22, kSecKeySignRecover = 23, kSecKeyVerifyRecover = 24, kSecKeyWrap = 25, kSecKeyUnwrap = 26 } __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="No longer supported"))); typedef uint32 SecCredentialType; enum { kSecCredentialTypeDefault = 0, kSecCredentialTypeWithUI, kSecCredentialTypeNoUI } __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="No longer supported"))); typedef uint32_t SecPadding; enum { kSecPaddingNone = 0, kSecPaddingPKCS1 = 1, kSecPaddingOAEP = 2, kSecPaddingSigRaw = 0x4000, kSecPaddingPKCS1MD2 = 0x8000, kSecPaddingPKCS1MD5 = 0x8001, kSecPaddingPKCS1SHA1 = 0x8002, kSecPaddingPKCS1SHA224 = 0x8003, kSecPaddingPKCS1SHA256 = 0x8004, kSecPaddingPKCS1SHA384 = 0x8005, kSecPaddingPKCS1SHA512 = 0x8006, } __attribute__((availability(macos,introduced=10.6,deprecated=12.0,message="Replaced with SecKeyAlgorithm"))) __attribute__((availability(ios,introduced=2.0,deprecated=15.0,message="Replaced with SecKeyAlgorithm"))) __attribute__((availability(tvos,introduced=4.0,deprecated=15.0,message="Replaced with SecKeyAlgorithm"))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Replaced with SecKeyAlgorithm"))); typedef uint32_t SecKeySizes; enum { kSecDefaultKeySize = 0, kSec3DES192 = 192, kSecAES128 = 128, kSecAES192 = 192, kSecAES256 = 256, kSecp192r1 = 192, kSecp256r1 = 256, kSecp384r1 = 384, kSecp521r1 = 521, kSecRSAMin = 1024, kSecRSAMax = 4096 } __attribute__((availability(macos,introduced=10.9,deprecated=12.0,message="No longer supported"))); extern const CFStringRef kSecPrivateKeyAttrs __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=4.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kSecPublicKeyAttrs __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=4.0))) __attribute__((availability(watchos,introduced=1.0))); CFTypeID SecKeyGetTypeID(void) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=4.0))) __attribute__((availability(watchos,introduced=1.0))); OSStatus SecKeyCreatePair( SecKeychainRef _Nullable keychainRef, CSSM_ALGORITHMS algorithm, uint32 keySizeInBits, CSSM_CC_HANDLE contextHandle, CSSM_KEYUSE publicKeyUsage, uint32 publicKeyAttr, CSSM_KEYUSE privateKeyUsage, uint32 privateKeyAttr, SecAccessRef _Nullable initialAccess, SecKeyRef* _Nullable __attribute__((cf_returns_retained)) publicKey, SecKeyRef* _Nullable __attribute__((cf_returns_retained)) privateKey) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeyGenerate( SecKeychainRef _Nullable keychainRef, CSSM_ALGORITHMS algorithm, uint32 keySizeInBits, CSSM_CC_HANDLE contextHandle, CSSM_KEYUSE keyUsage, uint32 keyAttr, SecAccessRef _Nullable initialAccess, SecKeyRef* _Nullable __attribute__((cf_returns_retained)) keyRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeyGetCSSMKey(SecKeyRef key, const CSSM_KEY * _Nullable * _Nonnull cssmKey) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecKeyGetCSPHandle(SecKeyRef keyRef, CSSM_CSP_HANDLE *cspHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecKeyGetCredentials( SecKeyRef keyRef, CSSM_ACL_AUTHORIZATION_TAG operation, SecCredentialType credentialType, const CSSM_ACCESS_CREDENTIALS * _Nullable * _Nonnull outCredentials) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); _Nullable __attribute__((cf_returns_retained)) SecKeyRef SecKeyGenerateSymmetric(CFDictionaryRef parameters, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="No longer supported"))); _Nullable SecKeyRef SecKeyCreateFromData(CFDictionaryRef parameters, CFDataRef keyData, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="No longer supported"))); typedef void (*SecKeyGeneratePairBlock)(SecKeyRef publicKey, SecKeyRef privateKey, CFErrorRef error); void SecKeyGeneratePairAsync(CFDictionaryRef parameters, dispatch_queue_t deliveryQueue, SecKeyGeneratePairBlock result) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="No longer supported"))); _Nullable __attribute__((cf_returns_retained)) SecKeyRef SecKeyDeriveFromPassword(CFStringRef password, CFDictionaryRef parameters, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="No longer supported"))); _Nullable CFDataRef SecKeyWrapSymmetric(SecKeyRef keyToWrap, SecKeyRef wrappingKey, CFDictionaryRef parameters, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="No longer supported"))); _Nullable SecKeyRef SecKeyUnwrapSymmetric(CFDataRef _Nullable * _Nonnull keyToUnwrap, SecKeyRef unwrappingKey, CFDictionaryRef parameters, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="No longer supported"))); OSStatus SecKeyGeneratePair(CFDictionaryRef parameters, SecKeyRef * _Nullable __attribute__((cf_returns_retained)) publicKey, SecKeyRef * _Nullable __attribute__((cf_returns_retained)) privateKey) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="Use SecKeyCreateRandomKey"))) __attribute__((availability(ios,introduced=2.0,deprecated=15.0,message="Use SecKeyCreateRandomKey"))) __attribute__((availability(tvos,introduced=4.0,deprecated=15.0,message="Use SecKeyCreateRandomKey"))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use SecKeyCreateRandomKey"))); SecKeyRef _Nullable SecKeyCreateRandomKey(CFDictionaryRef parameters, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); SecKeyRef _Nullable SecKeyCreateWithData(CFDataRef keyData, CFDictionaryRef attributes, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); size_t SecKeyGetBlockSize(SecKeyRef key) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=4.0))) __attribute__((availability(watchos,introduced=1.0))); CFDataRef _Nullable SecKeyCopyExternalRepresentation(SecKeyRef key, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); CFDictionaryRef _Nullable SecKeyCopyAttributes(SecKeyRef key) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); SecKeyRef _Nullable SecKeyCopyPublicKey(SecKeyRef key) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); typedef CFStringRef SecKeyAlgorithm __attribute__((swift_wrapper(enum))) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureRaw __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPKCS1v15Raw __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPKCS1v15SHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePKCS1v15SHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA1 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA224 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA256 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA384 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureDigestPSSSHA512 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePSSSHA1 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePSSSHA224 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePSSSHA256 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePSSSHA384 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSASignatureMessagePSSSHA512 __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureRFC4754 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962SHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962SHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962SHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962SHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureDigestX962SHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureMessageX962SHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureMessageX962SHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureMessageX962SHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureMessageX962SHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDSASignatureMessageX962SHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionRaw __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionPKCS1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA1AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA224AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA256AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA384AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmRSAEncryptionOAEPSHA512AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardX963SHA1AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardX963SHA224AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardX963SHA256AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardX963SHA384AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardX963SHA512AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorX963SHA1AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorX963SHA224AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorX963SHA256AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorX963SHA384AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorX963SHA512AESGCM __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA224AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA256AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA384AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionStandardVariableIVX963SHA512AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA224AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA256AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA384AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA512AESGCM __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(tvos,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeStandard __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeStandardX963SHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeStandardX963SHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeStandardX963SHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeStandardX963SHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeStandardX963SHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeCofactor __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeCofactorX963SHA1 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeCofactorX963SHA224 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeCofactorX963SHA256 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeCofactorX963SHA384 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyAlgorithm kSecKeyAlgorithmECDHKeyExchangeCofactorX963SHA512 __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); CFDataRef _Nullable SecKeyCreateSignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef dataToSign, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); Boolean SecKeyVerifySignature(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef signedData, CFDataRef signature, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); CFDataRef _Nullable SecKeyCreateEncryptedData(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef plaintext, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); CFDataRef _Nullable SecKeyCreateDecryptedData(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef ciphertext, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); typedef CFStringRef SecKeyKeyExchangeParameter __attribute__((swift_wrapper(enum))) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyKeyExchangeParameter kSecKeyKeyExchangeParameterRequestedSize __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); extern const SecKeyKeyExchangeParameter kSecKeyKeyExchangeParameterSharedInfo __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); CFDataRef _Nullable SecKeyCopyKeyExchangeResult(SecKeyRef privateKey, SecKeyAlgorithm algorithm, SecKeyRef publicKey, CFDictionaryRef parameters, CFErrorRef *error) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); typedef CFIndex SecKeyOperationType; enum { kSecKeyOperationTypeSign = 0, kSecKeyOperationTypeVerify = 1, kSecKeyOperationTypeEncrypt = 2, kSecKeyOperationTypeDecrypt = 3, kSecKeyOperationTypeKeyExchange = 4, } __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); Boolean SecKeyIsAlgorithmSupported(SecKeyRef key, SecKeyOperationType operation, SecKeyAlgorithm algorithm) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecPolicyAppleX509Basic __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleSSL __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleSMIME __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleEAP __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleIPsec __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleiChat __attribute__((availability(macosx,introduced=10.7,deprecated=10.9))); extern const CFStringRef kSecPolicyApplePKINITClient __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSecPolicyApplePKINITServer __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSecPolicyAppleCodeSigning __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyMacAppStoreReceipt __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleIDValidation __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyAppleTimeStamping __attribute__((availability(macosx,introduced=10.8))); extern const CFStringRef kSecPolicyAppleRevocation __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecPolicyApplePassbookSigning __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecPolicyApplePayIssuerEncryption __attribute__((availability(macosx,introduced=10.11))); extern const CFStringRef kSecPolicyOid __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyClient __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyRevocationFlags __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecPolicyTeamIdentifier __attribute__((availability(macosx,introduced=10.9))); CFTypeID SecPolicyGetTypeID(void) __attribute__((availability(macosx,introduced=10.3))); _Nullable CFDictionaryRef SecPolicyCopyProperties(SecPolicyRef policyRef) __attribute__((availability(macosx,introduced=10.7))); SecPolicyRef SecPolicyCreateBasicX509(void) __attribute__((availability(macosx,introduced=10.6))); SecPolicyRef SecPolicyCreateSSL(Boolean server, CFStringRef _Nullable hostname) __attribute__((availability(macosx,introduced=10.6))); enum { kSecRevocationOCSPMethod = (1 << 0), kSecRevocationCRLMethod = (1 << 1), kSecRevocationPreferCRL = (1 << 2), kSecRevocationRequirePositiveResponse = (1 << 3), kSecRevocationNetworkAccessDisabled = (1 << 4), kSecRevocationUseAnyAvailableMethod = (kSecRevocationOCSPMethod | kSecRevocationCRLMethod) }; _Nullable SecPolicyRef SecPolicyCreateRevocation(CFOptionFlags revocationFlags) __attribute__((availability(macosx,introduced=10.9))); _Nullable SecPolicyRef SecPolicyCreateWithProperties(CFTypeRef policyIdentifier, CFDictionaryRef _Nullable properties) __attribute__((availability(macosx,introduced=10.9))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern const CFStringRef kSecPolicyKU_DigitalSignature __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_NonRepudiation __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_KeyEncipherment __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_DataEncipherment __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_KeyAgreement __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_KeyCertSign __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_CRLSign __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_EncipherOnly __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPolicyKU_DecipherOnly __attribute__((availability(macosx,introduced=10.7))); _Nullable SecPolicyRef SecPolicyCreateWithOID(CFTypeRef policyOID) __attribute__((availability(macosx,introduced=10.7,deprecated=10.9))); OSStatus SecPolicyGetOID(SecPolicyRef policyRef, SecAsn1Oid *oid) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecPolicyGetValue(SecPolicyRef policyRef, SecAsn1Item *value) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecPolicySetValue(SecPolicyRef policyRef, const SecAsn1Item *value) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecPolicySetProperties(SecPolicyRef policyRef, CFDictionaryRef properties) __attribute__((availability(macosx,introduced=10.7,deprecated=10.9))); OSStatus SecPolicyGetTPHandle(SecPolicyRef policyRef, CSSM_TP_HANDLE *tpHandle) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef const struct __SecRandom * SecRandomRef; extern const SecRandomRef kSecRandomDefault __attribute__((availability(macosx,introduced=10.7))); int SecRandomCopyBytes(SecRandomRef _Nullable rnd, size_t count, void *bytes) __attribute__ ((warn_unused_result)) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end } extern "C" { enum { CSSM_BASE_ERROR = -0x7FFF0000, CSSM_ERRORCODE_MODULE_EXTENT = 0x00000800, CSSM_ERRORCODE_CUSTOM_OFFSET = 0x00000400, CSSM_ERRORCODE_COMMON_EXTENT = 0x100, CSSM_CSSM_BASE_ERROR = CSSM_BASE_ERROR, CSSM_CSSM_PRIVATE_ERROR = CSSM_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET, CSSM_CSP_BASE_ERROR = CSSM_CSSM_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_CSP_PRIVATE_ERROR = CSSM_CSP_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET, CSSM_DL_BASE_ERROR = CSSM_CSP_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_DL_PRIVATE_ERROR = CSSM_DL_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET, CSSM_CL_BASE_ERROR = CSSM_DL_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_CL_PRIVATE_ERROR = CSSM_CL_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET, CSSM_TP_BASE_ERROR = CSSM_CL_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_TP_PRIVATE_ERROR = CSSM_TP_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET , CSSM_KR_BASE_ERROR = CSSM_TP_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_KR_PRIVATE_ERROR = CSSM_KR_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET, CSSM_AC_BASE_ERROR = CSSM_KR_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_AC_PRIVATE_ERROR = CSSM_AC_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET }; enum { CSSM_MDS_BASE_ERROR = CSSM_CSP_BASE_ERROR + CSSM_ERRORCODE_MODULE_EXTENT, CSSM_MDS_PRIVATE_ERROR = CSSM_MDS_BASE_ERROR + CSSM_ERRORCODE_CUSTOM_OFFSET }; enum { CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855, CSSMERR_CSSM_NOT_INITIALIZED = -2147417854, CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853, CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852, CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851, }; enum { CSSM_ERRCODE_INTERNAL_ERROR = 0x0001, CSSM_ERRCODE_MEMORY_ERROR = 0x0002, CSSM_ERRCODE_MDS_ERROR = 0x0003, CSSM_ERRCODE_INVALID_POINTER = 0x0004, CSSM_ERRCODE_INVALID_INPUT_POINTER = 0x0005, CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 0x0006, CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 0x0007, CSSM_ERRCODE_SELF_CHECK_FAILED = 0x0008, CSSM_ERRCODE_OS_ACCESS_DENIED = 0x0009, CSSM_ERRCODE_FUNCTION_FAILED = 0x000A, CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 0x000B, CSSM_ERRCODE_INVALID_GUID = 0x000C }; enum { CSSM_ERRCODE_OPERATION_AUTH_DENIED = 0x0020, CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 0x0021, CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 0x0022, CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 0x0023, CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 0x0024, CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 0x0025, CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 0x0026, CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 0x0027, CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 0x0028, CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 0x0029, CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 0x002A, CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 0x002B, CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 0x002C, CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 0x002D, CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 0x002E, CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 0x002F, CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 0x0030, CSSM_ERRCODE_ACL_CHANGE_FAILED = 0x0031, CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 0x0032, CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 0x0033, CSSM_ERRCODE_ACL_DELETE_FAILED = 0x0034, CSSM_ERRCODE_ACL_REPLACE_FAILED = 0x0035, CSSM_ERRCODE_ACL_ADD_FAILED = 0x0036 }; enum { CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 0x0040, CSSM_ERRCODE_INCOMPATIBLE_VERSION = 0x0041, CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 0x0042, CSSM_ERRCODE_INVALID_CERT_POINTER = 0x0043, CSSM_ERRCODE_INVALID_CRL_POINTER = 0x0044, CSSM_ERRCODE_INVALID_FIELD_POINTER = 0x0045, CSSM_ERRCODE_INVALID_DATA = 0x0046, CSSM_ERRCODE_CRL_ALREADY_SIGNED = 0x0047, CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 0x0048, CSSM_ERRCODE_VERIFICATION_FAILURE = 0x0049, CSSM_ERRCODE_INVALID_DB_HANDLE = 0x004A, CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 0x004B, CSSM_ERRCODE_INVALID_DB_LIST = 0x004C, CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 0x004D, CSSM_ERRCODE_UNKNOWN_FORMAT = 0x004E, CSSM_ERRCODE_UNKNOWN_TAG = 0x004F, CSSM_ERRCODE_INVALID_CSP_HANDLE = 0x0050, CSSM_ERRCODE_INVALID_DL_HANDLE = 0x0051, CSSM_ERRCODE_INVALID_CL_HANDLE = 0x0052, CSSM_ERRCODE_INVALID_TP_HANDLE = 0x0053, CSSM_ERRCODE_INVALID_KR_HANDLE = 0x0054, CSSM_ERRCODE_INVALID_AC_HANDLE = 0x0055, CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 0x0056, CSSM_ERRCODE_INVALID_NETWORK_ADDR = 0x0057, CSSM_ERRCODE_INVALID_CRYPTO_DATA = 0x0058 }; enum { CSSMERR_CSSM_INTERNAL_ERROR = -2147418111, CSSMERR_CSSM_MEMORY_ERROR = -2147418110, CSSMERR_CSSM_MDS_ERROR = -2147418109, CSSMERR_CSSM_INVALID_POINTER = -2147418108, CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107, CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106, CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105, CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104, CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103, CSSMERR_CSSM_FUNCTION_FAILED = -2147418102, CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101, CSSMERR_CSSM_INVALID_GUID = -2147418100, }; enum { CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048, CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047, CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037, }; enum { CSSM_CSSM_BASE_CSSM_ERROR = CSSM_CSSM_BASE_ERROR + CSSM_ERRORCODE_COMMON_EXTENT + 0x10, CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839, CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838, CSSMERR_CSSM_INVALID_PVC = -2147417837, CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836, CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835, CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834, CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833, CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832, CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831, CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830, CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829, CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828, CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827, CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826, CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825, CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824, CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823, CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822, CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821, CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820, CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819, }; enum { CSSMERR_CSP_INTERNAL_ERROR = -2147416063, CSSMERR_CSP_MEMORY_ERROR = -2147416062, CSSMERR_CSP_MDS_ERROR = -2147416061, CSSMERR_CSP_INVALID_POINTER = -2147416060, CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059, CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058, CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057, CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056, CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055, CSSMERR_CSP_FUNCTION_FAILED = -2147416054, }; enum { CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032, CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031, CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030, CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029, CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028, CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027, CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026, CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025, CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024, CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023, CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022, CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021, CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020, CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019, CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018, CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017, CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016, CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015, CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014, CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013, CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012, CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011, CSSMERR_CSP_ACL_ADD_FAILED = -2147416010, }; enum { CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000, CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989, CSSMERR_CSP_INVALID_DATA = -2147415994, CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978, CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976, }; enum { CSSM_CSP_BASE_CSP_ERROR = CSSM_CSP_BASE_ERROR + CSSM_ERRORCODE_COMMON_EXTENT, CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807, CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806, CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805, CSSMERR_CSP_DEVICE_ERROR = -2147415804, CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803, CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802, CSSMERR_CSP_NOT_LOGGED_IN = -2147415801, CSSMERR_CSP_INVALID_KEY = -2147415792, CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791, CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790, CSSMERR_CSP_ALGID_MISMATCH = -2147415789, CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788, CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787, CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786, CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785, CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784, CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783, CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782, CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781, CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780, CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779, CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778, CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777, CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776, CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768, CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767, CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766, CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765, CSSMERR_CSP_INVALID_CONTEXT = -2147415760, CSSMERR_CSP_INVALID_ALGORITHM = -2147415759, CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754, CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753, CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752, CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751, CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750, CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749, CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748, CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747, CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746, CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745, CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744, CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743, CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742, CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741, CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740, CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739, CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738, CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737, CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708, CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707, CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706, CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705, CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704, CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703, CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702, CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701, CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700, CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699, CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698, CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697, CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696, CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695, CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694, CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693, CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692, CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691, CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690, CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689, CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688, CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687, CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686, CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685, CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684, CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683, CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682, CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681, CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680, CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679, CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678, CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677, CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676, CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675, CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674, CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673, CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672, CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671, CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670, CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669, CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736, CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735, CSSMERR_CSP_VERIFY_FAILED = -2147415734, CSSMERR_CSP_INVALID_SIGNATURE = -2147415733, CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732, CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731, CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730, CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729, CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728, CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727, CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726, CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725, CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724, CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723, CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722, }; enum { CSSMERR_TP_INTERNAL_ERROR = -2147409919, CSSMERR_TP_MEMORY_ERROR = -2147409918, CSSMERR_TP_MDS_ERROR = -2147409917, CSSMERR_TP_INVALID_POINTER = -2147409916, CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915, CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914, CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913, CSSMERR_TP_SELF_CHECK_FAILED = -2147409912, CSSMERR_TP_OS_ACCESS_DENIED = -2147409911, CSSMERR_TP_FUNCTION_FAILED = -2147409910, CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856, CSSMERR_TP_INVALID_DATA = -2147409850, CSSMERR_TP_INVALID_DB_LIST = -2147409844, CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854, CSSMERR_TP_INVALID_CERT_POINTER = -2147409853, CSSMERR_TP_INVALID_CRL_POINTER = -2147409852, CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851, CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833, CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849, CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848, CSSMERR_TP_VERIFICATION_FAILURE = -2147409847, CSSMERR_TP_INVALID_DB_HANDLE = -2147409846, CSSMERR_TP_UNKNOWN_FORMAT = -2147409842, CSSMERR_TP_UNKNOWN_TAG = -2147409841, CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834, CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840, CSSMERR_TP_INVALID_DL_HANDLE = -2147409839, CSSMERR_TP_INVALID_CL_HANDLE = -2147409838, CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843, }; enum { CSSM_TP_BASE_TP_ERROR = CSSM_TP_BASE_ERROR + CSSM_ERRORCODE_COMMON_EXTENT, CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663, CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662, CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661, CSSMERR_TP_INVALID_CERTGROUP = -2147409660, CSSMERR_TP_INVALID_CRLGROUP = -2147409659, CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658, CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657, CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656, CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655, CSSMERR_TP_CERT_EXPIRED = -2147409654, CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653, CSSMERR_TP_CERT_REVOKED = -2147409652, CSSMERR_TP_CERT_SUSPENDED = -2147409651, CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650, CSSMERR_TP_INVALID_ACTION = -2147409649, CSSMERR_TP_INVALID_ACTION_DATA = -2147409648, CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646, CSSMERR_TP_INVALID_AUTHORITY = -2147409645, CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644, CSSMERR_TP_INVALID_CERTIFICATE = -2147409643, CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642, CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641, CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640, CSSMERR_TP_INVALID_CRL_TYPE = -2147409639, CSSMERR_TP_INVALID_CRL = -2147409638, CSSMERR_TP_INVALID_FORM_TYPE = -2147409637, CSSMERR_TP_INVALID_ID = -2147409636, CSSMERR_TP_INVALID_IDENTIFIER = -2147409635, CSSMERR_TP_INVALID_INDEX = -2147409634, CSSMERR_TP_INVALID_NAME = -2147409633, CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632, CSSMERR_TP_INVALID_TIMESTRING = -2147409631, CSSMERR_TP_INVALID_REASON = -2147409630, CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629, CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628, CSSMERR_TP_INVALID_SIGNATURE = -2147409627, CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626, CSSMERR_TP_INVALID_CALLBACK = -2147409625, CSSMERR_TP_INVALID_TUPLE = -2147409624, CSSMERR_TP_NOT_SIGNER = -2147409623, CSSMERR_TP_NOT_TRUSTED = -2147409622, CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621, CSSMERR_TP_REJECTED_FORM = -2147409620, CSSMERR_TP_REQUEST_LOST = -2147409619, CSSMERR_TP_REQUEST_REJECTED = -2147409618, CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617, CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616, CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615, CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614, }; enum { CSSMERR_AC_INTERNAL_ERROR = -2147405823, CSSMERR_AC_MEMORY_ERROR = -2147405822, CSSMERR_AC_MDS_ERROR = -2147405821, CSSMERR_AC_INVALID_POINTER = -2147405820, CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819, CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818, CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817, CSSMERR_AC_SELF_CHECK_FAILED = -2147405816, CSSMERR_AC_OS_ACCESS_DENIED = -2147405815, CSSMERR_AC_FUNCTION_FAILED = -2147405814, CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760, CSSMERR_AC_INVALID_DATA = -2147405754, CSSMERR_AC_INVALID_DB_LIST = -2147405748, CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738, CSSMERR_AC_INVALID_DL_HANDLE = -2147405743, CSSMERR_AC_INVALID_CL_HANDLE = -2147405742, CSSMERR_AC_INVALID_TP_HANDLE = -2147405741, CSSMERR_AC_INVALID_DB_HANDLE = -2147405750, CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747, }; enum { CSSM_AC_BASE_AC_ERROR = CSSM_AC_BASE_ERROR + CSSM_ERRORCODE_COMMON_EXTENT, CSSMERR_AC_INVALID_BASE_ACLS = -2147405567, CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566, CSSMERR_AC_INVALID_ENCODING = -2147405565, CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564, CSSMERR_AC_INVALID_REQUESTOR = -2147405563, CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562, }; enum { CSSMERR_CL_INTERNAL_ERROR = -2147411967, CSSMERR_CL_MEMORY_ERROR = -2147411966, CSSMERR_CL_MDS_ERROR = -2147411965, CSSMERR_CL_INVALID_POINTER = -2147411964, CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963, CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962, CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961, CSSMERR_CL_SELF_CHECK_FAILED = -2147411960, CSSMERR_CL_OS_ACCESS_DENIED = -2147411959, CSSMERR_CL_FUNCTION_FAILED = -2147411958, CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904, CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902, CSSMERR_CL_INVALID_CERT_POINTER = -2147411901, CSSMERR_CL_INVALID_CRL_POINTER = -2147411900, CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899, CSSMERR_CL_INVALID_DATA = -2147411898, CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897, CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896, CSSMERR_CL_VERIFICATION_FAILURE = -2147411895, CSSMERR_CL_UNKNOWN_FORMAT = -2147411890, CSSMERR_CL_UNKNOWN_TAG = -2147411889, CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882, }; enum { CSSM_CL_BASE_CL_ERROR = CSSM_CL_BASE_ERROR + CSSM_ERRORCODE_COMMON_EXTENT, CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711, CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710, CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709, CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708, CSSMERR_CL_INVALID_CRL_INDEX = -2147411707, CSSMERR_CL_INVALID_SCOPE = -2147411706, CSSMERR_CL_NO_FIELD_VALUES = -2147411705, CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704, }; enum { CSSMERR_DL_INTERNAL_ERROR = -2147414015, CSSMERR_DL_MEMORY_ERROR = -2147414014, CSSMERR_DL_MDS_ERROR = -2147414013, CSSMERR_DL_INVALID_POINTER = -2147414012, CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011, CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010, CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009, CSSMERR_DL_SELF_CHECK_FAILED = -2147414008, CSSMERR_DL_OS_ACCESS_DENIED = -2147414007, CSSMERR_DL_FUNCTION_FAILED = -2147414006, CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936, CSSMERR_DL_INVALID_DL_HANDLE = -2147413935, CSSMERR_DL_INVALID_CL_HANDLE = -2147413934, CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939, }; enum { CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984, CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983, CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982, CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981, CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980, CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979, CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978, CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977, CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976, CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975, CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974, CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973, CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972, CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971, CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970, CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969, CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968, CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967, CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966, CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965, CSSMERR_DL_ACL_DELETE_FAILED = -2147413964, CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963, CSSMERR_DL_ACL_ADD_FAILED = -2147413962, }; enum { CSSMERR_DL_INVALID_DB_HANDLE = -2147413942, CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930, CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929, }; enum { CSSM_DL_BASE_DL_ERROR = CSSM_DL_BASE_ERROR + CSSM_ERRORCODE_COMMON_EXTENT, CSSMERR_DL_DATABASE_CORRUPT = -2147413759, CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752, CSSMERR_DL_INVALID_RECORDTYPE = -2147413751, CSSMERR_DL_INVALID_FIELD_NAME = -2147413750, CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749, CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748, CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747, CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746, CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745, CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744, CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743, CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742, CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741, CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740, CSSMERR_DL_INVALID_DB_NAME = -2147413738, CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737, CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736, CSSMERR_DL_DB_LOCKED = -2147413735, CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734, CSSMERR_DL_RECORD_NOT_FOUND = -2147413733, CSSMERR_DL_MISSING_VALUE = -2147413732, CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731, CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730, CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729, CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727, CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726, CSSMERR_DL_INVALID_DB_LOCATION = -2147413725, CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724, CSSMERR_DL_INVALID_INDEX_INFO = -2147413723, CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722, CSSMERR_DL_INVALID_NEW_OWNER = -2147413721, CSSMERR_DL_INVALID_RECORD_UID = -2147413720, CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719, CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718, CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717, CSSMERR_DL_RECORD_MODIFIED = -2147413716, CSSMERR_DL_ENDOFDATA = -2147413715, CSSMERR_DL_INVALID_QUERY = -2147413714, CSSMERR_DL_INVALID_VALUE = -2147413713, CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712, CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711, }; } #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef enum __CE_GeneralNameType { GNT_OtherName = 0, GNT_RFC822Name, GNT_DNSName, GNT_X400Address, GNT_DirectoryName, GNT_EdiPartyName, GNT_URI, GNT_IPAddress, GNT_RegisteredID } CE_GeneralNameType; typedef struct __CE_OtherName { SecAsn1Oid typeId; SecAsn1Item value; } CE_OtherName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_GeneralName { CE_GeneralNameType nameType; CSSM_BOOL berEncoded; SecAsn1Item name; } CE_GeneralName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_GeneralNames { uint32 numNames; CE_GeneralName *generalName; } CE_GeneralNames __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_AuthorityKeyID { CSSM_BOOL keyIdentifierPresent; SecAsn1Item keyIdentifier; CSSM_BOOL generalNamesPresent; CE_GeneralNames *generalNames; CSSM_BOOL serialNumberPresent; SecAsn1Item serialNumber; } CE_AuthorityKeyID __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef SecAsn1Item CE_SubjectKeyID __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint16 CE_KeyUsage __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CE_CrlReason __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_ExtendedKeyUsage { uint32 numPurposes; CSSM_OID_PTR purposes; } CE_ExtendedKeyUsage; typedef struct __CE_BasicConstraints { CSSM_BOOL cA; CSSM_BOOL pathLenConstraintPresent; uint32 pathLenConstraint; } CE_BasicConstraints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_PolicyQualifierInfo { SecAsn1Oid policyQualifierId; SecAsn1Item qualifier; } CE_PolicyQualifierInfo __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_PolicyInformation { SecAsn1Oid certPolicyId; uint32 numPolicyQualifiers; CE_PolicyQualifierInfo *policyQualifiers; } CE_PolicyInformation __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_CertPolicies { uint32 numPolicies; CE_PolicyInformation *policies; } CE_CertPolicies __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint16 CE_NetscapeCertType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint8 CE_CrlDistReasonFlags __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef enum __CE_CrlDistributionPointNameType { CE_CDNT_FullName, CE_CDNT_NameRelativeToCrlIssuer } CE_CrlDistributionPointNameType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_DistributionPointName { CE_CrlDistributionPointNameType nameType; union { CE_GeneralNames *fullName; CSSM_X509_RDN_PTR rdn; } dpn; } CE_DistributionPointName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_CRLDistributionPoint { CE_DistributionPointName *distPointName; CSSM_BOOL reasonsPresent; CE_CrlDistReasonFlags reasons; CE_GeneralNames *crlIssuer; } CE_CRLDistributionPoint __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_CRLDistPointsSyntax { uint32 numDistPoints; CE_CRLDistributionPoint *distPoints; } CE_CRLDistPointsSyntax __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_AccessDescription { SecAsn1Oid accessMethod; CE_GeneralName accessLocation; } CE_AccessDescription __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_AuthorityInfoAccess { uint32 numAccessDescriptions; CE_AccessDescription *accessDescriptions; } CE_AuthorityInfoAccess __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef CE_GeneralNames CE_NameRegistrationAuthorities __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_SemanticsInformation { SecAsn1Oid *semanticsIdentifier; CE_NameRegistrationAuthorities *nameRegistrationAuthorities; } CE_SemanticsInformation __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_QC_Statement { SecAsn1Oid statementId; CE_SemanticsInformation *semanticsInfo; SecAsn1Item *otherInfo; } CE_QC_Statement __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_QC_Statements { uint32 numQCStatements; CE_QC_Statement *qcStatements; } CE_QC_Statements __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CE_CrlNumber; typedef uint32 CE_DeltaCrl; typedef struct __CE_IssuingDistributionPoint { CE_DistributionPointName *distPointName; CSSM_BOOL onlyUserCertsPresent; CSSM_BOOL onlyUserCerts; CSSM_BOOL onlyCACertsPresent; CSSM_BOOL onlyCACerts; CSSM_BOOL onlySomeReasonsPresent; CE_CrlDistReasonFlags onlySomeReasons; CSSM_BOOL indirectCrlPresent; CSSM_BOOL indirectCrl; } CE_IssuingDistributionPoint __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_GeneralSubtree { CE_GeneralNames *base; uint32 minimum; CSSM_BOOL maximumPresent; uint32 maximum; } CE_GeneralSubtree __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_GeneralSubtrees { uint32 numSubtrees; CE_GeneralSubtree *subtrees; } CE_GeneralSubtrees __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_NameConstraints { CE_GeneralSubtrees *permitted; CE_GeneralSubtrees *excluded; } CE_NameConstraints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_PolicyMapping { SecAsn1Oid issuerDomainPolicy; SecAsn1Oid subjectDomainPolicy; } CE_PolicyMapping __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_PolicyMappings { uint32 numPolicyMappings; CE_PolicyMapping *policyMappings; } CE_PolicyMappings __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_PolicyConstraints { CSSM_BOOL requireExplicitPolicyPresent; uint32 requireExplicitPolicy; CSSM_BOOL inhibitPolicyMappingPresent; uint32 inhibitPolicyMapping; } CE_PolicyConstraints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CE_InhibitAnyPolicy __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef enum __CE_DataType { DT_AuthorityKeyID, DT_SubjectKeyID, DT_KeyUsage, DT_SubjectAltName, DT_IssuerAltName, DT_ExtendedKeyUsage, DT_BasicConstraints, DT_CertPolicies, DT_NetscapeCertType, DT_CrlNumber, DT_DeltaCrl, DT_CrlReason, DT_CrlDistributionPoints, DT_IssuingDistributionPoint, DT_AuthorityInfoAccess, DT_Other, DT_QC_Statements, DT_NameConstraints, DT_PolicyMappings, DT_PolicyConstraints, DT_InhibitAnyPolicy } CE_DataType; typedef union { CE_AuthorityKeyID authorityKeyID; CE_SubjectKeyID subjectKeyID; CE_KeyUsage keyUsage; CE_GeneralNames subjectAltName; CE_GeneralNames issuerAltName; CE_ExtendedKeyUsage extendedKeyUsage; CE_BasicConstraints basicConstraints; CE_CertPolicies certPolicies; CE_NetscapeCertType netscapeCertType; CE_CrlNumber crlNumber; CE_DeltaCrl deltaCrl; CE_CrlReason crlReason; CE_CRLDistPointsSyntax crlDistPoints; CE_IssuingDistributionPoint issuingDistPoint; CE_AuthorityInfoAccess authorityInfoAccess; CE_QC_Statements qualifiedCertStatements; CE_NameConstraints nameConstraints; CE_PolicyMappings policyMappings; CE_PolicyConstraints policyConstraints; CE_InhibitAnyPolicy inhibitAnyPolicy; SecAsn1Item rawData; } CE_Data __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __CE_DataAndType { CE_DataType type; CE_Data extension; CSSM_BOOL critical; } CE_DataAndType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" extern const CSSM_GUID gGuidCssm; extern const CSSM_GUID gGuidAppleFileDL; extern const CSSM_GUID gGuidAppleCSP; extern const CSSM_GUID gGuidAppleCSPDL; extern const CSSM_GUID gGuidAppleX509CL; extern const CSSM_GUID gGuidAppleX509TP; extern const CSSM_GUID gGuidAppleLDAPDL; extern const CSSM_GUID gGuidAppleDotMacTP; extern const CSSM_GUID gGuidAppleSdCSPDL; extern const CSSM_GUID gGuidAppleDotMacDL; enum { CSSM_WORDID_KEYCHAIN_PROMPT = CSSM_WORDID_VENDOR_START, CSSM_WORDID_KEYCHAIN_LOCK, CSSM_WORDID_KEYCHAIN_CHANGE_LOCK, CSSM_WORDID_PROCESS, CSSM_WORDID__RESERVED_1, CSSM_WORDID_SYMMETRIC_KEY, CSSM_WORDID_SYSTEM, CSSM_WORDID_KEY, CSSM_WORDID_PIN, CSSM_WORDID_PREAUTH, CSSM_WORDID_PREAUTH_SOURCE, CSSM_WORDID_ASYMMETRIC_KEY, CSSM_WORDID_PARTITION, CSSM_WORDID_KEYBAG_KEY, CSSM_WORDID__FIRST_UNUSED }; enum { CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = CSSM_WORDID_KEYCHAIN_PROMPT, CSSM_ACL_SUBJECT_TYPE_PROCESS = CSSM_WORDID_PROCESS, CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = CSSM_WORDID_SIGNATURE, CSSM_ACL_SUBJECT_TYPE_COMMENT = CSSM_WORDID_COMMENT, CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = CSSM_WORDID_SYMMETRIC_KEY, CSSM_ACL_SUBJECT_TYPE_PREAUTH = CSSM_WORDID_PREAUTH, CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = CSSM_WORDID_PREAUTH_SOURCE, CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = CSSM_WORDID_ASYMMETRIC_KEY, CSSM_ACL_SUBJECT_TYPE_PARTITION = CSSM_WORDID_PARTITION, }; enum { CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = CSSM_WORDID_KEYCHAIN_PROMPT, CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = CSSM_WORDID_KEYCHAIN_LOCK, CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = CSSM_WORDID_KEYCHAIN_CHANGE_LOCK, CSSM_SAMPLE_TYPE_PROCESS = CSSM_WORDID_PROCESS, CSSM_SAMPLE_TYPE_COMMENT = CSSM_WORDID_COMMENT, CSSM_SAMPLE_TYPE_RETRY_ID = CSSM_WORDID_PROPAGATE, CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = CSSM_WORDID_SYMMETRIC_KEY, CSSM_SAMPLE_TYPE_PREAUTH = CSSM_WORDID_PREAUTH, CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = CSSM_WORDID_ASYMMETRIC_KEY, CSSM_SAMPLE_TYPE_KEYBAG_KEY = CSSM_WORDID_KEYBAG_KEY, }; enum { CSSM_ACL_AUTHORIZATION_CHANGE_ACL = CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START, CSSM_ACL_AUTHORIZATION_CHANGE_OWNER, CSSM_ACL_AUTHORIZATION_PARTITION_ID, CSSM_ACL_AUTHORIZATION_INTEGRITY, CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START + 0x1000000, CSSM_ACL_AUTHORIZATION_PREAUTH_END = CSSM_ACL_AUTHORIZATION_PREAUTH_BASE + 0x10000 }; enum { CSSM_ACL_CODE_SIGNATURE_INVALID = 0, CSSM_ACL_CODE_SIGNATURE_OSX = 1 }; enum { CSSM_ACL_MATCH_UID = 0x01, CSSM_ACL_MATCH_GID = 0x02, CSSM_ACL_MATCH_HONOR_ROOT = 0x100, CSSM_ACL_MATCH_BITS = CSSM_ACL_MATCH_UID | CSSM_ACL_MATCH_GID }; enum { CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 0x101 }; typedef struct cssm_acl_process_subject_selector { uint16 version; uint16 mask; uint32 uid; uint32 gid; } CSSM_ACL_PROCESS_SUBJECT_SELECTOR; enum { CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 0x101 }; enum { CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 0x0001, CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 0x0010, CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 0x0020, CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 0x0040, CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 0x0080, }; typedef struct cssm_acl_keychain_prompt_selector { uint16 version; uint16 flags; } CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR; typedef uint32 CSSM_ACL_PREAUTH_TRACKING_STATE; enum { CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 0xff, CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0, CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 0x40000000, CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = 0x80000000 }; enum { CSSM_DB_ACCESS_RESET = 0x10000 }; enum { CSSM_ALGID_APPLE_YARROW = CSSM_ALGID_VENDOR_DEFINED, CSSM_ALGID_AES, CSSM_ALGID_FEE, CSSM_ALGID_FEE_MD5, CSSM_ALGID_FEE_SHA1, CSSM_ALGID_FEED, CSSM_ALGID_FEEDEXP, CSSM_ALGID_ASC, CSSM_ALGID_SHA1HMAC_LEGACY, CSSM_ALGID_KEYCHAIN_KEY, CSSM_ALGID_PKCS12_PBE_ENCR, CSSM_ALGID_PKCS12_PBE_MAC, CSSM_ALGID_SECURE_PASSPHRASE, CSSM_ALGID_PBE_OPENSSL_MD5, CSSM_ALGID_SHA256, CSSM_ALGID_SHA384, CSSM_ALGID_SHA512, CSSM_ALGID_ENTROPY_DEFAULT, CSSM_ALGID_SHA224, CSSM_ALGID_SHA224WithRSA, CSSM_ALGID_SHA256WithRSA, CSSM_ALGID_SHA384WithRSA, CSSM_ALGID_SHA512WithRSA, CSSM_ALGID_OPENSSH1, CSSM_ALGID_SHA224WithECDSA, CSSM_ALGID_SHA256WithECDSA, CSSM_ALGID_SHA384WithECDSA, CSSM_ALGID_SHA512WithECDSA, CSSM_ALGID_ECDSA_SPECIFIED, CSSM_ALGID_ECDH_X963_KDF, CSSM_ALGID__FIRST_UNUSED }; enum { CSSM_PADDING_APPLE_SSLv2 = CSSM_PADDING_VENDOR_DEFINED }; enum { CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = 0x80000000 }; enum { CSSM_KEYBLOB_RAW_FORMAT_X509 = CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED, CSSM_KEYBLOB_RAW_FORMAT_OPENSSH, CSSM_KEYBLOB_RAW_FORMAT_OPENSSL, CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 }; enum { CSSM_CUSTOM_COMMON_ERROR_EXTENT = 0x00e0, CSSM_ERRCODE_NO_USER_INTERACTION = 0x00e0, CSSM_ERRCODE_USER_CANCELED = 0x00e1, CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 0x00e2, CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 0x00e3, CSSM_ERRCODE_DEVICE_RESET = 0x00e4, CSSM_ERRCODE_DEVICE_FAILED = 0x00e5, CSSM_ERRCODE_IN_DARK_WAKE = 0x00e6 }; enum { CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888, CSSMERR_AC_NO_USER_INTERACTION = -2147405600, CSSMERR_CSP_NO_USER_INTERACTION = -2147415840, CSSMERR_CL_NO_USER_INTERACTION = -2147411744, CSSMERR_DL_NO_USER_INTERACTION = -2147413792, CSSMERR_TP_NO_USER_INTERACTION = -2147409696, CSSMERR_CSSM_USER_CANCELED = -2147417887, CSSMERR_AC_USER_CANCELED = -2147405599, CSSMERR_CSP_USER_CANCELED = -2147415839, CSSMERR_CL_USER_CANCELED = -2147411743, CSSMERR_DL_USER_CANCELED = -2147413791, CSSMERR_TP_USER_CANCELED = -2147409695, CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886, CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598, CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838, CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742, CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790, CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694, CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885, CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597, CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837, CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741, CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789, CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693, CSSMERR_CSSM_DEVICE_RESET = -2147417884, CSSMERR_AC_DEVICE_RESET = -2147405596, CSSMERR_CSP_DEVICE_RESET = -2147415836, CSSMERR_CL_DEVICE_RESET = -2147411740, CSSMERR_DL_DEVICE_RESET = -2147413788, CSSMERR_TP_DEVICE_RESET = -2147409692, CSSMERR_CSSM_DEVICE_FAILED = -2147417883, CSSMERR_AC_DEVICE_FAILED = -2147405595, CSSMERR_CSP_DEVICE_FAILED = -2147415835, CSSMERR_CL_DEVICE_FAILED = -2147411739, CSSMERR_DL_DEVICE_FAILED = -2147413787, CSSMERR_TP_DEVICE_FAILED = -2147409691, CSSMERR_CSSM_IN_DARK_WAKE = -2147417882, CSSMERR_AC_IN_DARK_WAKE = -2147405594, CSSMERR_CSP_IN_DARK_WAKE = -2147415834, CSSMERR_CL_IN_DARK_WAKE = -2147411738, CSSMERR_DL_IN_DARK_WAKE = -2147413786, CSSMERR_TP_IN_DARK_WAKE = -2147409690, }; enum { CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040, CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039, CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038, CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037, CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036, CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035, CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034, }; enum { CSSM_DL_DB_RECORD_GENERIC_PASSWORD = CSSM_DB_RECORDTYPE_APP_DEFINED_START + 0, CSSM_DL_DB_RECORD_INTERNET_PASSWORD = CSSM_DB_RECORDTYPE_APP_DEFINED_START + 1, CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = CSSM_DB_RECORDTYPE_APP_DEFINED_START + 2, CSSM_DL_DB_RECORD_X509_CERTIFICATE = CSSM_DB_RECORDTYPE_APP_DEFINED_START + 0x1000, CSSM_DL_DB_RECORD_USER_TRUST, CSSM_DL_DB_RECORD_X509_CRL, CSSM_DL_DB_RECORD_UNLOCK_REFERRAL, CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE, CSSM_DL_DB_RECORD_METADATA = CSSM_DB_RECORDTYPE_APP_DEFINED_START + 0x8000 }; enum { CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT, CSSM_APPLEFILEDL_COMMIT, CSSM_APPLEFILEDL_ROLLBACK, CSSM_APPLEFILEDL_TAKE_FILE_LOCK, CSSM_APPLEFILEDL_MAKE_BACKUP, CSSM_APPLEFILEDL_MAKE_COPY, CSSM_APPLEFILEDL_DELETE_FILE, }; enum { CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1, CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2, CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3 }; enum { CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992, CSSMERR_APPLEDL_DISK_FULL = -2147412991, CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990, CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989, CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988, CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987, CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986, CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985, }; enum { CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896, CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895, CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894, CSSMERR_APPLETP_INVALID_CA = -2147408893, CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892, CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891, CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890, CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889, CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888, CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887, CSSMERR_APPLETP_INVALID_ROOT = -2147408886, CSSMERR_APPLETP_CRL_EXPIRED = -2147408885, CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884, CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883, CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882, CSSMERR_APPLETP_CRL_BAD_URI = -2147408881, CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880, CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879, CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878, CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877, CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876, CSSMERR_APPLETP_IDP_FAIL = -2147408875, CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874, CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873, CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872, CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871, CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870, CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869, CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868, CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867, CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866, CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865, CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864, CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863, CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862, CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861, CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860, CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859, CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858, CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857, CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856, CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855, CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854, CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853, CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852, CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851, CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850, CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849, CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848, CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847, CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846, CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845, CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844, CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843, CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842, CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841, CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840, CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839, CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838, CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837, CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836, CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835, }; enum { CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796, CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795, CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794, CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793, CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792, CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791, CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790, CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789, CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788, CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787, CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786, CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785, CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784, }; enum { CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1u }; enum cssm_appledl_open_parameters_mask { kCSSM_APPLEDL_MASK_MODE = (1 << 0) }; typedef struct cssm_appledl_open_parameters { uint32 length; uint32 version; CSSM_BOOL autoCommit; uint32 mask; mode_t mode; } CSSM_APPLEDL_OPEN_PARAMETERS, *CSSM_APPLEDL_OPEN_PARAMETERS_PTR; enum { CSSM_APPLECSPDL_DB_LOCK = 0, CSSM_APPLECSPDL_DB_UNLOCK = 1, CSSM_APPLECSPDL_DB_GET_SETTINGS = 2, CSSM_APPLECSPDL_DB_SET_SETTINGS = 3, CSSM_APPLECSPDL_DB_IS_LOCKED = 4, CSSM_APPLECSPDL_DB_CHANGE_PASSWORD =5, CSSM_APPLECSPDL_DB_GET_HANDLE = 6, CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7, CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8, CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9, CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10, CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11, CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12, CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13, CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14, CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15, CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16, CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17, CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18, CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19, CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20, CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21, CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22, CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23, CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24, CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25, CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26, CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27, CSSM_APPLECSP_KEYDIGEST = 0x100 }; typedef struct cssm_applecspdl_db_settings_parameters { uint32 idleTimeout; uint8 lockOnSleep; } CSSM_APPLECSPDL_DB_SETTINGS_PARAMETERS, *CSSM_APPLECSPDL_DB_SETTINGS_PARAMETERS_PTR; typedef struct cssm_applecspdl_db_is_locked_parameters { uint8 isLocked; } CSSM_APPLECSPDL_DB_IS_LOCKED_PARAMETERS, *CSSM_APPLECSPDL_DB_IS_LOCKED_PARAMETERS_PTR; typedef struct cssm_applecspdl_db_change_password_parameters { CSSM_ACCESS_CREDENTIALS *accessCredentials; } CSSM_APPLECSPDL_DB_CHANGE_PASSWORD_PARAMETERS, *CSSM_APPLECSPDL_DB_CHANGE_PASSWORD_PARAMETERS_PTR; enum { CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100, CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL, CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 }; enum { CSSM_ATTRIBUTE_VENDOR_DEFINED = 0x800000 }; enum { CSSM_ATTRIBUTE_PUBLIC_KEY = (CSSM_ATTRIBUTE_DATA_KEY | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 0)), CSSM_ATTRIBUTE_FEE_PRIME_TYPE = (CSSM_ATTRIBUTE_DATA_UINT32 | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 1)), CSSM_ATTRIBUTE_FEE_CURVE_TYPE = (CSSM_ATTRIBUTE_DATA_UINT32 | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 2)), CSSM_ATTRIBUTE_ASC_OPTIMIZATION = (CSSM_ATTRIBUTE_DATA_UINT32 | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 3)), CSSM_ATTRIBUTE_RSA_BLINDING = (CSSM_ATTRIBUTE_DATA_UINT32 | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 4)), CSSM_ATTRIBUTE_PARAM_KEY = (CSSM_ATTRIBUTE_DATA_KEY | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 5)), CSSM_ATTRIBUTE_PROMPT = (CSSM_ATTRIBUTE_DATA_CSSM_DATA | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 6)), CSSM_ATTRIBUTE_ALERT_TITLE = (CSSM_ATTRIBUTE_DATA_CSSM_DATA | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 7)), CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = (CSSM_ATTRIBUTE_DATA_UINT32 | (CSSM_ATTRIBUTE_VENDOR_DEFINED + 8)) }; enum { CSSM_FEE_PRIME_TYPE_DEFAULT = 0, CSSM_FEE_PRIME_TYPE_MERSENNE, CSSM_FEE_PRIME_TYPE_FEE, CSSM_FEE_PRIME_TYPE_GENERAL }; enum { CSSM_FEE_CURVE_TYPE_DEFAULT = 0, CSSM_FEE_CURVE_TYPE_MONTGOMERY, CSSM_FEE_CURVE_TYPE_WEIERSTRASS, CSSM_FEE_CURVE_TYPE_ANSI_X9_62 }; enum { CSSM_ASC_OPTIMIZE_DEFAULT = 0, CSSM_ASC_OPTIMIZE_SIZE, CSSM_ASC_OPTIMIZE_SECURITY, CSSM_ASC_OPTIMIZE_TIME, CSSM_ASC_OPTIMIZE_TIME_SIZE, CSSM_ASC_OPTIMIZE_ASCII, }; enum { CSSM_KEYATTR_PARTIAL = 0x00010000, CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 0x00020000 }; typedef struct { const char *string; const SecAsn1Oid *oid; } CSSM_APPLE_TP_NAME_OID; typedef struct { CSSM_CSP_HANDLE cspHand; CSSM_CL_HANDLE clHand; uint32 serialNumber; uint32 numSubjectNames; CSSM_APPLE_TP_NAME_OID *subjectNames; uint32 numIssuerNames; CSSM_APPLE_TP_NAME_OID *issuerNames; CSSM_X509_NAME_PTR issuerNameX509; const CSSM_KEY *certPublicKey; const CSSM_KEY *issuerPrivateKey; CSSM_ALGORITHMS signatureAlg; SecAsn1Oid signatureOid; uint32 notBefore; uint32 notAfter; uint32 numExtensions; CE_DataAndType *extensions; const char *challengeString; } CSSM_APPLE_TP_CERT_REQUEST; typedef struct { uint32 Version; uint32 ServerNameLen; const char *ServerName; uint32 Flags; } CSSM_APPLE_TP_SSL_OPTIONS; typedef uint32 CSSM_APPLE_TP_CRL_OPT_FLAGS; enum { CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 0x00000001, CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 0x00000002, CSSM_TP_ACTION_CRL_SUFFICIENT = 0x00000004, CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 0x00000008 }; typedef struct { uint32 Version; CSSM_APPLE_TP_CRL_OPT_FLAGS CrlFlags; CSSM_DL_DB_HANDLE_PTR crlStore; } CSSM_APPLE_TP_CRL_OPTIONS; typedef struct { uint32 Version; CE_KeyUsage IntendedUsage; uint32 SenderEmailLen; const char *SenderEmail; } CSSM_APPLE_TP_SMIME_OPTIONS; typedef uint32 CSSM_APPLE_TP_ACTION_FLAGS; enum { CSSM_TP_ACTION_ALLOW_EXPIRED = 0x00000001, CSSM_TP_ACTION_LEAF_IS_CA = 0x00000002, CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 0x00000004, CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 0x00000008, CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 0x00000010, CSSM_TP_ACTION_TRUST_SETTINGS = 0x00000020, CSSM_TP_ACTION_IMPLICIT_ANCHORS = 0x00000040 }; typedef struct { uint32 Version; CSSM_APPLE_TP_ACTION_FLAGS ActionFlags; } CSSM_APPLE_TP_ACTION_DATA; typedef uint32 CSSM_TP_APPLE_CERT_STATUS; enum { CSSM_CERT_STATUS_EXPIRED = 0x00000001, CSSM_CERT_STATUS_NOT_VALID_YET = 0x00000002, CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 0x00000004, CSSM_CERT_STATUS_IS_IN_ANCHORS = 0x00000008, CSSM_CERT_STATUS_IS_ROOT = 0x00000010, CSSM_CERT_STATUS_IS_FROM_NET = 0x00000020, CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 0x00000040, CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 0x00000080, CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 0x00000100, CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 0x00000200, CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 0x00000400, CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 0x00000800 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) { CSSM_TP_APPLE_CERT_STATUS StatusBits; uint32 NumStatusCodes; CSSM_RETURN *StatusCodes; uint32 Index; CSSM_DL_DB_HANDLE DlDbHandle; CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; } CSSM_TP_APPLE_EVIDENCE_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct { uint32 Version; } CSSM_TP_APPLE_EVIDENCE_HEADER; enum { CSSM_EVIDENCE_FORM_APPLE_HEADER = 0x80000000 + 0, CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = 0x80000000 + 1, CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = 0x80000000 + 2 }; enum { CSSM_APPLEX509CL_OBTAIN_CSR, CSSM_APPLEX509CL_VERIFY_CSR }; typedef struct { CSSM_X509_NAME_PTR subjectNameX509; CSSM_ALGORITHMS signatureAlg; SecAsn1Oid signatureOid; CSSM_CSP_HANDLE cspHand; const CSSM_KEY *subjectPublicKey; const CSSM_KEY *subjectPrivateKey; const char *challengeString; } CSSM_APPLE_CL_CSR_REQUEST; void cssmPerror(const char *how, CSSM_RETURN error); bool cssmOidToAlg(const SecAsn1Oid *oid, CSSM_ALGORITHMS *alg); const SecAsn1Oid *cssmAlgToOid(CSSM_ALGORITHMS algId); #pragma clang diagnostic pop } extern "C" { #pragma clang assume_nonnull begin enum { kSecUnlockStateStatus = 1, kSecReadPermStatus = 2, kSecWritePermStatus = 4 }; struct SecKeychainSettings { UInt32 version; Boolean lockOnSleep; Boolean useLockInterval; UInt32 lockInterval; }; typedef struct SecKeychainSettings SecKeychainSettings; typedef FourCharCode SecAuthenticationType; enum { kSecAuthenticationTypeNTLM = ((__uint32_t)((((__uint32_t)('ntlm') & 0xff000000U) >> 24) | (((__uint32_t)('ntlm') & 0x00ff0000U) >> 8) | (((__uint32_t)('ntlm') & 0x0000ff00U) << 8) | (((__uint32_t)('ntlm') & 0x000000ffU) << 24))), kSecAuthenticationTypeMSN = ((__uint32_t)((((__uint32_t)('msna') & 0xff000000U) >> 24) | (((__uint32_t)('msna') & 0x00ff0000U) >> 8) | (((__uint32_t)('msna') & 0x0000ff00U) << 8) | (((__uint32_t)('msna') & 0x000000ffU) << 24))), kSecAuthenticationTypeDPA = ((__uint32_t)((((__uint32_t)('dpaa') & 0xff000000U) >> 24) | (((__uint32_t)('dpaa') & 0x00ff0000U) >> 8) | (((__uint32_t)('dpaa') & 0x0000ff00U) << 8) | (((__uint32_t)('dpaa') & 0x000000ffU) << 24))), kSecAuthenticationTypeRPA = ((__uint32_t)((((__uint32_t)('rpaa') & 0xff000000U) >> 24) | (((__uint32_t)('rpaa') & 0x00ff0000U) >> 8) | (((__uint32_t)('rpaa') & 0x0000ff00U) << 8) | (((__uint32_t)('rpaa') & 0x000000ffU) << 24))), kSecAuthenticationTypeHTTPBasic = ((__uint32_t)((((__uint32_t)('http') & 0xff000000U) >> 24) | (((__uint32_t)('http') & 0x00ff0000U) >> 8) | (((__uint32_t)('http') & 0x0000ff00U) << 8) | (((__uint32_t)('http') & 0x000000ffU) << 24))), kSecAuthenticationTypeHTTPDigest = ((__uint32_t)((((__uint32_t)('httd') & 0xff000000U) >> 24) | (((__uint32_t)('httd') & 0x00ff0000U) >> 8) | (((__uint32_t)('httd') & 0x0000ff00U) << 8) | (((__uint32_t)('httd') & 0x000000ffU) << 24))), kSecAuthenticationTypeHTMLForm = ((__uint32_t)((((__uint32_t)('form') & 0xff000000U) >> 24) | (((__uint32_t)('form') & 0x00ff0000U) >> 8) | (((__uint32_t)('form') & 0x0000ff00U) << 8) | (((__uint32_t)('form') & 0x000000ffU) << 24))), kSecAuthenticationTypeDefault = ((__uint32_t)((((__uint32_t)('dflt') & 0xff000000U) >> 24) | (((__uint32_t)('dflt') & 0x00ff0000U) >> 8) | (((__uint32_t)('dflt') & 0x0000ff00U) << 8) | (((__uint32_t)('dflt') & 0x000000ffU) << 24))), kSecAuthenticationTypeAny = ((__uint32_t)((((__uint32_t)(0) & 0xff000000U) >> 24) | (((__uint32_t)(0) & 0x00ff0000U) >> 8) | (((__uint32_t)(0) & 0x0000ff00U) << 8) | (((__uint32_t)(0) & 0x000000ffU) << 24))) }; typedef FourCharCode SecProtocolType; enum { kSecProtocolTypeFTP = 'ftp ', kSecProtocolTypeFTPAccount = 'ftpa', kSecProtocolTypeHTTP = 'http', kSecProtocolTypeIRC = 'irc ', kSecProtocolTypeNNTP = 'nntp', kSecProtocolTypePOP3 = 'pop3', kSecProtocolTypeSMTP = 'smtp', kSecProtocolTypeSOCKS = 'sox ', kSecProtocolTypeIMAP = 'imap', kSecProtocolTypeLDAP = 'ldap', kSecProtocolTypeAppleTalk = 'atlk', kSecProtocolTypeAFP = 'afp ', kSecProtocolTypeTelnet = 'teln', kSecProtocolTypeSSH = 'ssh ', kSecProtocolTypeFTPS = 'ftps', kSecProtocolTypeHTTPS = 'htps', kSecProtocolTypeHTTPProxy = 'htpx', kSecProtocolTypeHTTPSProxy = 'htsx', kSecProtocolTypeFTPProxy = 'ftpx', kSecProtocolTypeCIFS = 'cifs', kSecProtocolTypeSMB = 'smb ', kSecProtocolTypeRTSP = 'rtsp', kSecProtocolTypeRTSPProxy = 'rtsx', kSecProtocolTypeDAAP = 'daap', kSecProtocolTypeEPPC = 'eppc', kSecProtocolTypeIPP = 'ipp ', kSecProtocolTypeNNTPS = 'ntps', kSecProtocolTypeLDAPS = 'ldps', kSecProtocolTypeTelnetS = 'tels', kSecProtocolTypeIMAPS = 'imps', kSecProtocolTypeIRCS = 'ircs', kSecProtocolTypePOP3S = 'pops', kSecProtocolTypeCVSpserver = 'cvsp', kSecProtocolTypeSVN = 'svn ', kSecProtocolTypeAny = 0 }; typedef UInt32 SecKeychainEvent; enum { kSecLockEvent = 1, kSecUnlockEvent = 2, kSecAddEvent = 3, kSecDeleteEvent = 4, kSecUpdateEvent = 5, kSecPasswordChangedEvent = 6, kSecDefaultChangedEvent = 9, kSecDataAccessEvent __attribute__((availability(macos,introduced=10.10,deprecated=10.15,message="Read events are no longer posted"))) = 10, kSecKeychainListChangedEvent = 11, kSecTrustSettingsChangedEvent = 12 }; typedef UInt32 SecKeychainEventMask; enum { kSecLockEventMask = 1 << kSecLockEvent, kSecUnlockEventMask = 1 << kSecUnlockEvent, kSecAddEventMask = 1 << kSecAddEvent, kSecDeleteEventMask = 1 << kSecDeleteEvent, kSecUpdateEventMask = 1 << kSecUpdateEvent, kSecPasswordChangedEventMask = 1 << kSecPasswordChangedEvent, kSecDefaultChangedEventMask = 1 << kSecDefaultChangedEvent, kSecDataAccessEventMask __attribute__((availability(macos,introduced=10.10,deprecated=10.15,message="Read events are no longer posted"))) = 1 << kSecDataAccessEvent, kSecKeychainListChangedMask = 1 << kSecKeychainListChangedEvent, kSecTrustSettingsChangedEventMask = 1 << kSecTrustSettingsChangedEvent, kSecEveryEventMask = 0xffffffff }; struct __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))) SecKeychainCallbackInfo { UInt32 version; SecKeychainItemRef _Nonnull item; SecKeychainRef _Nonnull keychain; pid_t pid; }; typedef struct SecKeychainCallbackInfo SecKeychainCallbackInfo __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); CFTypeID SecKeychainGetTypeID(void); OSStatus SecKeychainGetVersion(UInt32 * _Nonnull returnVers); OSStatus SecKeychainOpen(const char *pathName, SecKeychainRef * _Nonnull __attribute__((cf_returns_retained)) keychain) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))); OSStatus SecKeychainCreate(const char *pathName, UInt32 passwordLength, const void * _Nullable password, Boolean promptUser, SecAccessRef _Nullable initialAccess, SecKeychainRef * _Nonnull __attribute__((cf_returns_retained)) keychain) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainDelete(SecKeychainRef _Nullable keychainOrArray) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainSetSettings(SecKeychainRef _Nullable keychain, const SecKeychainSettings *newSettings) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainCopySettings(SecKeychainRef _Nullable keychain, SecKeychainSettings *outSettings) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainUnlock(SecKeychainRef _Nullable keychain, UInt32 passwordLength, const void * _Nullable password, Boolean usePassword) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainLock(SecKeychainRef _Nullable keychain) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainLockAll(void) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainCopyDefault(SecKeychainRef * _Nonnull __attribute__((cf_returns_retained)) keychain) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainSetDefault(SecKeychainRef _Nullable keychain) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainCopySearchList(CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) searchList) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainSetSearchList(CFArrayRef searchList) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef int SecPreferencesDomain; enum { kSecPreferencesDomainUser, kSecPreferencesDomainSystem, kSecPreferencesDomainCommon, kSecPreferencesDomainDynamic }; OSStatus SecKeychainCopyDomainDefault(SecPreferencesDomain domain, SecKeychainRef * _Nonnull __attribute__((cf_returns_retained)) keychain); OSStatus SecKeychainSetDomainDefault(SecPreferencesDomain domain, SecKeychainRef _Nullable keychain); OSStatus SecKeychainCopyDomainSearchList(SecPreferencesDomain domain, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) searchList); OSStatus SecKeychainSetDomainSearchList(SecPreferencesDomain domain, CFArrayRef searchList); OSStatus SecKeychainSetPreferenceDomain(SecPreferencesDomain domain); OSStatus SecKeychainGetPreferenceDomain(SecPreferencesDomain *domain); OSStatus SecKeychainGetStatus(SecKeychainRef _Nullable keychain, SecKeychainStatus *keychainStatus) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainGetPath(SecKeychainRef _Nullable keychain, UInt32 *ioPathLength, char *pathName) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainAttributeInfoForItemID(SecKeychainRef _Nullable keychain, UInt32 itemID, SecKeychainAttributeInfo * _Nullable * _Nonnull info) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainFreeAttributeInfo(SecKeychainAttributeInfo *info) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef OSStatus (*SecKeychainCallback)(SecKeychainEvent keychainEvent, SecKeychainCallbackInfo *info, void * _Nullable context) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainAddCallback(SecKeychainCallback callbackFunction, SecKeychainEventMask eventMask, void * _Nullable userContext) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainRemoveCallback(SecKeychainCallback callbackFunction) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainAddInternetPassword(SecKeychainRef _Nullable keychain, UInt32 serverNameLength, const char * _Nullable serverName, UInt32 securityDomainLength, const char * _Nullable securityDomain, UInt32 accountNameLength, const char * _Nullable accountName, UInt32 pathLength, const char * _Nullable path, UInt16 port, SecProtocolType protocol, SecAuthenticationType authenticationType, UInt32 passwordLength, const void *passwordData, SecKeychainItemRef * _Nullable __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainFindInternetPassword(CFTypeRef _Nullable keychainOrArray, UInt32 serverNameLength, const char * _Nullable serverName, UInt32 securityDomainLength, const char * _Nullable securityDomain, UInt32 accountNameLength, const char * _Nullable accountName, UInt32 pathLength, const char * _Nullable path, UInt16 port, SecProtocolType protocol, SecAuthenticationType authenticationType, UInt32 * _Nullable passwordLength, void * _Nullable * _Nullable passwordData, SecKeychainItemRef * _Nullable __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainAddGenericPassword(SecKeychainRef _Nullable keychain, UInt32 serviceNameLength, const char * _Nullable serviceName, UInt32 accountNameLength, const char * _Nullable accountName, UInt32 passwordLength, const void *passwordData, SecKeychainItemRef * _Nullable __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainFindGenericPassword(CFTypeRef _Nullable keychainOrArray, UInt32 serviceNameLength, const char * _Nullable serviceName, UInt32 accountNameLength, const char * _Nullable accountName, UInt32 * _Nullable passwordLength, void * _Nullable * _Nullable passwordData, SecKeychainItemRef * _Nullable __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainSetUserInteractionAllowed(Boolean state) __attribute__((availability(macos,introduced=10.2,deprecated=12.0,message="Custom keychain management is no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainGetUserInteractionAllowed(Boolean *state) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainGetCSPHandle(SecKeychainRef _Nullable keychain, CSSM_CSP_HANDLE *cspHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecKeychainGetDLDBHandle(SecKeychainRef _Nullable keychain, CSSM_DL_DB_HANDLE *dldbHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecKeychainCopyAccess(SecKeychainRef _Nullable keychain, SecAccessRef * _Nonnull __attribute__((cf_returns_retained)) access) __attribute__((availability(macosx,introduced=10.2,deprecated=10.13))); OSStatus SecKeychainSetAccess(SecKeychainRef _Nullable keychain, SecAccessRef access) __attribute__((availability(macosx,introduced=10.2,deprecated=10.13))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef uint32_t SecExternalFormat; enum { kSecFormatUnknown = 0, kSecFormatOpenSSL, kSecFormatSSH, kSecFormatBSAFE, kSecFormatRawKey, kSecFormatWrappedPKCS8, kSecFormatWrappedOpenSSL, kSecFormatWrappedSSH, kSecFormatWrappedLSH, kSecFormatX509Cert, kSecFormatPEMSequence, kSecFormatPKCS7, kSecFormatPKCS12, kSecFormatNetscapeCertSequence, kSecFormatSSHv2 }; typedef uint32_t SecExternalItemType; enum { kSecItemTypeUnknown, kSecItemTypePrivateKey, kSecItemTypePublicKey, kSecItemTypeSessionKey, kSecItemTypeCertificate, kSecItemTypeAggregate }; typedef uint32_t SecItemImportExportFlags; enum { kSecItemPemArmour = 0x00000001, }; typedef uint32_t SecKeyImportExportFlags; enum { kSecKeyImportOnlyOne = 0x00000001, kSecKeySecurePassphrase = 0x00000002, kSecKeyNoAccessControl = 0x00000004 }; typedef struct __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))) { uint32_t version; SecKeyImportExportFlags flags; CFTypeRef _Nullable passphrase; CFStringRef alertTitle; CFStringRef alertPrompt; SecAccessRef _Nullable accessRef; CSSM_KEYUSE keyUsage; CSSM_KEYATTR_FLAGS keyAttributes; } SecKeyImportExportParameters __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))) { uint32_t version; SecKeyImportExportFlags flags; CFTypeRef _Nullable passphrase; CFStringRef _Nullable alertTitle; CFStringRef _Nullable alertPrompt; SecAccessRef _Nullable accessRef; CFArrayRef _Nullable keyUsage; CFArrayRef _Nullable keyAttributes; } SecItemImportExportKeyParameters __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemExport( CFTypeRef keychainItemOrArray, SecExternalFormat outputFormat, SecItemImportExportFlags flags, const SecKeyImportExportParameters * _Nullable keyParams, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) exportedData) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,replacement="SecItemExport"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecItemExport( CFTypeRef secItemOrArray, SecExternalFormat outputFormat, SecItemImportExportFlags flags, const SecItemImportExportKeyParameters * _Nullable keyParams, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) exportedData) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); OSStatus SecKeychainItemImport( CFDataRef importedData, CFStringRef _Nullable fileNameOrExtension, SecExternalFormat * _Nullable inputFormat, SecExternalItemType * _Nullable itemType, SecItemImportExportFlags flags, const SecKeyImportExportParameters * _Nullable keyParams, SecKeychainRef _Nullable importKeychain, CFArrayRef * _Nullable __attribute__((cf_returns_retained)) outItems) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,replacement="SecItemImport"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecItemImport( CFDataRef importedData, CFStringRef _Nullable fileNameOrExtension, SecExternalFormat * _Nullable inputFormat, SecExternalItemType * _Nullable itemType, SecItemImportExportFlags flags, const SecItemImportExportKeyParameters * _Nullable keyParams, SecKeychainRef _Nullable importKeychain, CFArrayRef * _Nullable __attribute__((cf_returns_retained)) outItems) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecImportExportPassphrase __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecImportExportKeychain __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecImportExportAccess __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=NA))); extern const CFStringRef kSecImportItemLabel __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecImportItemKeyID __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecImportItemTrust __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecImportItemCertChain __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); extern const CFStringRef kSecImportItemIdentity __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); OSStatus SecPKCS12Import(CFDataRef pkcs12_data, CFDictionaryRef options, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) items) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=2.0))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef uint32_t SecTrustResultType; enum { kSecTrustResultInvalid __attribute__((availability(macosx,introduced=10_3))) = 0, kSecTrustResultProceed __attribute__((availability(macosx,introduced=10_3))) = 1, kSecTrustResultConfirm __attribute__((availability(macosx,introduced=10_3,deprecated=10_9,message="" ))) = 2, kSecTrustResultDeny __attribute__((availability(macosx,introduced=10_3))) = 3, kSecTrustResultUnspecified __attribute__((availability(macosx,introduced=10_3))) = 4, kSecTrustResultRecoverableTrustFailure __attribute__((availability(macosx,introduced=10_3))) = 5, kSecTrustResultFatalTrustFailure __attribute__((availability(macosx,introduced=10_3))) = 6, kSecTrustResultOtherError __attribute__((availability(macosx,introduced=10_3))) = 7 }; typedef struct __attribute__((objc_bridge(id))) __SecTrust *SecTrustRef; extern const CFStringRef kSecPropertyTypeTitle __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecPropertyTypeError __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecTrustEvaluationDate __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecTrustExtendedValidation __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecTrustOrganizationName __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecTrustResultValue __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecTrustRevocationChecked __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecTrustRevocationValidUntilDate __attribute__((availability(macosx,introduced=10.9))); extern const CFStringRef kSecTrustCertificateTransparency __attribute__((availability(macosx,introduced=10.11))); extern const CFStringRef kSecTrustCertificateTransparencyWhiteList __attribute__((availability(macosx,introduced=10.12,deprecated=10.13))); typedef void (*SecTrustCallback)(SecTrustRef trustRef, SecTrustResultType trustResult); CFTypeID SecTrustGetTypeID(void) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecTrustCreateWithCertificates(CFTypeRef certificates, CFTypeRef _Nullable policies, SecTrustRef * _Nonnull __attribute__((cf_returns_retained)) trust) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecTrustSetPolicies(SecTrustRef trust, CFTypeRef policies) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecTrustCopyPolicies(SecTrustRef trust, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) policies) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecTrustSetNetworkFetchAllowed(SecTrustRef trust, Boolean allowFetch) __attribute__((availability(macosx,introduced=10.9))); OSStatus SecTrustGetNetworkFetchAllowed(SecTrustRef trust, Boolean *allowFetch) __attribute__((availability(macosx,introduced=10.9))); OSStatus SecTrustSetAnchorCertificates(SecTrustRef trust, CFArrayRef _Nullable anchorCertificates) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecTrustSetAnchorCertificatesOnly(SecTrustRef trust, Boolean anchorCertificatesOnly) __attribute__((availability(macosx,introduced=10.6))); OSStatus SecTrustCopyCustomAnchorCertificates(SecTrustRef trust, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) anchors) __attribute__((availability(macosx,introduced=10.5))); OSStatus SecTrustSetVerifyDate(SecTrustRef trust, CFDateRef verifyDate) __attribute__((availability(macosx,introduced=10.3))); CFAbsoluteTime SecTrustGetVerifyTime(SecTrustRef trust) __attribute__((availability(macosx,introduced=10.6))); OSStatus SecTrustEvaluate(SecTrustRef trust, SecTrustResultType *result) __attribute__((availability(macos,introduced=10.3,deprecated=10.15,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(ios,introduced=2.0,deprecated=13.0,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(watchos,introduced=1.0,deprecated=6.0,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(tvos,introduced=2.0,deprecated=13.0,replacement="SecTrustEvaluateWithError"))); OSStatus SecTrustEvaluateAsync(SecTrustRef trust, dispatch_queue_t _Nullable queue, SecTrustCallback result) __attribute__((availability(macos,introduced=10.7,deprecated=10.15,replacement="SecTrustEvaluateAsyncWithError"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,replacement="SecTrustEvaluateAsyncWithError"))) __attribute__((availability(watchos,introduced=1.0,deprecated=6.0,replacement="SecTrustEvaluateAsyncWithError"))) __attribute__((availability(tvos,introduced=7.0,deprecated=13.0,replacement="SecTrustEvaluateAsyncWithError"))); __attribute__((warn_unused_result)) bool SecTrustEvaluateWithError(SecTrustRef trust, CFErrorRef _Nullable * _Nullable __attribute__((cf_returns_retained)) error) __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))); typedef void (*SecTrustWithErrorCallback)(SecTrustRef trustRef, bool result, CFErrorRef _Nullable error); OSStatus SecTrustEvaluateAsyncWithError(SecTrustRef trust, dispatch_queue_t queue, SecTrustWithErrorCallback result) __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); OSStatus SecTrustGetTrustResult(SecTrustRef trust, SecTrustResultType *result) __attribute__((availability(macosx,introduced=10.7))); _Nullable SecKeyRef SecTrustCopyPublicKey(SecTrustRef trust) __attribute__((availability(macos,introduced=10.7,deprecated=11.0,replacement="SecTrustCopyKey"))) __attribute__((availability(ios,introduced=2.0,deprecated=14.0,replacement="SecTrustCopyKey"))) __attribute__((availability(watchos,introduced=1.0,deprecated=7.0,replacement="SecTrustCopyKey"))) __attribute__((availability(tvos,introduced=9.0,deprecated=14.0,replacement="SecTrustCopyKey"))); _Nullable SecKeyRef SecTrustCopyKey(SecTrustRef trust) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); CFIndex SecTrustGetCertificateCount(SecTrustRef trust) __attribute__((availability(macosx,introduced=10.7))); _Nullable SecCertificateRef SecTrustGetCertificateAtIndex(SecTrustRef trust, CFIndex ix) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,replacement="SecTrustCopyCertificateChain"))) __attribute__((availability(ios,introduced=2.0,deprecated=15.0,replacement="SecTrustCopyCertificateChain"))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,replacement="SecTrustCopyCertificateChain"))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,replacement="SecTrustCopyCertificateChain"))); CFDataRef SecTrustCopyExceptions(SecTrustRef trust) __attribute__((availability(macosx,introduced=10.9))); bool SecTrustSetExceptions(SecTrustRef trust, CFDataRef _Nullable exceptions) __attribute__((availability(macosx,introduced=10.9))); _Nullable CFArrayRef SecTrustCopyProperties(SecTrustRef trust) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(ios,introduced=2.0,deprecated=15.0,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,replacement="SecTrustEvaluateWithError"))) __attribute__((availability(macCatalyst,unavailable))); _Nullable CFDictionaryRef SecTrustCopyResult(SecTrustRef trust) __attribute__((availability(macosx,introduced=10.9))); OSStatus SecTrustSetOCSPResponse(SecTrustRef trust, CFTypeRef _Nullable responseData) __attribute__((availability(macosx,introduced=10.9))); OSStatus SecTrustSetSignedCertificateTimestamps(SecTrustRef trust, CFArrayRef _Nullable sctArray) __attribute__((availability(macos,introduced=10.14.2))) __attribute__((availability(ios,introduced=12.1.1))) __attribute__((availability(tvos,introduced=12.1.1))) __attribute__((availability(watchos,introduced=5.1.1))); _Nullable __attribute__((cf_returns_retained)) CFArrayRef SecTrustCopyCertificateChain(SecTrustRef trust) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(tvos,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef SecTrustResultType SecTrustUserSetting __attribute__((availability(macosx,introduced=10.2,deprecated=10.9))); typedef uint32_t SecTrustOptionFlags; enum { kSecTrustOptionAllowExpired = 0x00000001, kSecTrustOptionLeafIsCA = 0x00000002, kSecTrustOptionFetchIssuerFromNet = 0x00000004, kSecTrustOptionAllowExpiredRoot = 0x00000008, kSecTrustOptionRequireRevPerCert = 0x00000010, kSecTrustOptionUseTrustSettings = 0x00000020, kSecTrustOptionImplicitAnchors = 0x00000040 }; OSStatus SecTrustSetOptions(SecTrustRef trustRef, SecTrustOptionFlags options) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecTrustSetParameters(SecTrustRef trustRef, CSSM_TP_ACTION action, CFDataRef actionData) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecTrustSetKeychains(SecTrustRef trust, CFTypeRef _Nullable keychainOrArray) __attribute__((availability(macosx,introduced=10.3,deprecated=10.13))); OSStatus SecTrustGetResult(SecTrustRef trustRef, SecTrustResultType * _Nullable result, CFArrayRef * _Nullable __attribute__((cf_returns_retained)) certChain, CSSM_TP_APPLE_EVIDENCE_INFO * _Nullable * _Nullable statusChain) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecTrustGetCssmResult(SecTrustRef trust, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR _Nullable * _Nonnull result) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecTrustGetCssmResultCode(SecTrustRef trust, OSStatus *resultCode) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecTrustGetTPHandle(SecTrustRef trust, CSSM_TP_HANDLE *handle) __attribute__((availability(macosx,introduced=10.2,deprecated=10.7))); OSStatus SecTrustCopyAnchorCertificates(CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) anchors) __attribute__((availability(macosx,introduced=10.3))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecSharedPassword __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(macCatalyst,introduced=14.0))) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); void SecAddSharedWebCredential(CFStringRef fqdn, CFStringRef account, CFStringRef _Nullable password, void (^completionHandler)(CFErrorRef _Nullable error)) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(macCatalyst,introduced=14.0))) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); void SecRequestSharedWebCredential(CFStringRef _Nullable fqdn, CFStringRef _Nullable account, void (^completionHandler)(CFArrayRef _Nullable credentials, CFErrorRef _Nullable error)) __attribute__((availability(ios,introduced=8.0,deprecated=14.0,message="Use ASAuthorizationController to make an ASAuthorizationPasswordRequest (AuthenticationServices framework)"))) __attribute__((availability(macCatalyst,introduced=14.0,deprecated=14.0,message="Use ASAuthorizationController to make an ASAuthorizationPasswordRequest (AuthenticationServices framework)"))) __attribute__((availability(macos,introduced=10.16,deprecated=11.0,message="Use ASAuthorizationController to make an ASAuthorizationPasswordRequest (AuthenticationServices framework)"))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); _Nullable CFStringRef SecCreateSharedWebCredentialPassword(void) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(macCatalyst,introduced=14.0))) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma clang assume_nonnull end } extern "C" { __attribute__((visibility("default"))) void *sec_retain(void *obj); __attribute__((visibility("default"))) void sec_release(void *obj); } // @protocol OS_sec_object <NSObject> /* @end */ typedef NSObject/*<OS_sec_object>*/ * __attribute__((objc_independent_class)) sec_object_t; typedef uint32_t SSLCipherSuite; enum { SSL_NULL_WITH_NULL_NULL = 0x0000, SSL_RSA_WITH_NULL_MD5 = 0x0001, SSL_RSA_WITH_NULL_SHA = 0x0002, SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 0x0003, SSL_RSA_WITH_RC4_128_MD5 = 0x0004, SSL_RSA_WITH_RC4_128_SHA = 0x0005, SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 0x0006, SSL_RSA_WITH_IDEA_CBC_SHA = 0x0007, SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x0008, SSL_RSA_WITH_DES_CBC_SHA = 0x0009, SSL_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A, SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x000B, SSL_DH_DSS_WITH_DES_CBC_SHA = 0x000C, SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 0x000D, SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x000E, SSL_DH_RSA_WITH_DES_CBC_SHA = 0x000F, SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 0x0010, SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 0x0011, SSL_DHE_DSS_WITH_DES_CBC_SHA = 0x0012, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013, SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 0x0014, SSL_DHE_RSA_WITH_DES_CBC_SHA = 0x0015, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016, SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 0x0017, SSL_DH_anon_WITH_RC4_128_MD5 = 0x0018, SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 0x0019, SSL_DH_anon_WITH_DES_CBC_SHA = 0x001A, SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 0x001B, SSL_FORTEZZA_DMS_WITH_NULL_SHA = 0x001C, SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 0x001D, TLS_RSA_WITH_AES_128_CBC_SHA = 0x002F, TLS_DH_DSS_WITH_AES_128_CBC_SHA = 0x0030, TLS_DH_RSA_WITH_AES_128_CBC_SHA = 0x0031, TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 0x0032, TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 0x0033, TLS_DH_anon_WITH_AES_128_CBC_SHA = 0x0034, TLS_RSA_WITH_AES_256_CBC_SHA = 0x0035, TLS_DH_DSS_WITH_AES_256_CBC_SHA = 0x0036, TLS_DH_RSA_WITH_AES_256_CBC_SHA = 0x0037, TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 0x0038, TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 0x0039, TLS_DH_anon_WITH_AES_256_CBC_SHA = 0x003A, TLS_ECDH_ECDSA_WITH_NULL_SHA = 0xC001, TLS_ECDH_ECDSA_WITH_RC4_128_SHA = 0xC002, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = 0xC003, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = 0xC004, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = 0xC005, TLS_ECDHE_ECDSA_WITH_NULL_SHA = 0xC006, TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = 0xC007, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = 0xC008, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = 0xC009, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = 0xC00A, TLS_ECDH_RSA_WITH_NULL_SHA = 0xC00B, TLS_ECDH_RSA_WITH_RC4_128_SHA = 0xC00C, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = 0xC00D, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = 0xC00E, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = 0xC00F, TLS_ECDHE_RSA_WITH_NULL_SHA = 0xC010, TLS_ECDHE_RSA_WITH_RC4_128_SHA = 0xC011, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = 0xC012, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = 0xC013, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = 0xC014, TLS_ECDH_anon_WITH_NULL_SHA = 0xC015, TLS_ECDH_anon_WITH_RC4_128_SHA = 0xC016, TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = 0xC017, TLS_ECDH_anon_WITH_AES_128_CBC_SHA = 0xC018, TLS_ECDH_anon_WITH_AES_256_CBC_SHA = 0xC019, TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = 0xC035, TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = 0xC036, TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = 0xCCAB, TLS_NULL_WITH_NULL_NULL = 0x0000, TLS_RSA_WITH_NULL_MD5 = 0x0001, TLS_RSA_WITH_NULL_SHA = 0x0002, TLS_RSA_WITH_RC4_128_MD5 = 0x0004, TLS_RSA_WITH_RC4_128_SHA = 0x0005, TLS_RSA_WITH_3DES_EDE_CBC_SHA = 0x000A, TLS_RSA_WITH_NULL_SHA256 = 0x003B, TLS_RSA_WITH_AES_128_CBC_SHA256 = 0x003C, TLS_RSA_WITH_AES_256_CBC_SHA256 = 0x003D, TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 0x000D, TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 0x0010, TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 0x0013, TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 0x0016, TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 0x003E, TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 0x003F, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 0x0040, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 0x0067, TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 0x0068, TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 0x0069, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 0x006A, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 0x006B, TLS_DH_anon_WITH_RC4_128_MD5 = 0x0018, TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 0x001B, TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 0x006C, TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 0x006D, TLS_PSK_WITH_RC4_128_SHA = 0x008A, TLS_PSK_WITH_3DES_EDE_CBC_SHA = 0x008B, TLS_PSK_WITH_AES_128_CBC_SHA = 0x008C, TLS_PSK_WITH_AES_256_CBC_SHA = 0x008D, TLS_DHE_PSK_WITH_RC4_128_SHA = 0x008E, TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 0x008F, TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 0x0090, TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 0x0091, TLS_RSA_PSK_WITH_RC4_128_SHA = 0x0092, TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 0x0093, TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 0x0094, TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 0x0095, TLS_PSK_WITH_NULL_SHA = 0x002C, TLS_DHE_PSK_WITH_NULL_SHA = 0x002D, TLS_RSA_PSK_WITH_NULL_SHA = 0x002E, TLS_RSA_WITH_AES_128_GCM_SHA256 = 0x009C, TLS_RSA_WITH_AES_256_GCM_SHA384 = 0x009D, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 0x009E, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 0x009F, TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 0x00A0, TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 0x00A1, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 0x00A2, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 0x00A3, TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 0x00A4, TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 0x00A5, TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 0x00A6, TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 0x00A7, TLS_PSK_WITH_AES_128_GCM_SHA256 = 0x00A8, TLS_PSK_WITH_AES_256_GCM_SHA384 = 0x00A9, TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 0x00AA, TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 0x00AB, TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 0x00AC, TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 0x00AD, TLS_PSK_WITH_AES_128_CBC_SHA256 = 0x00AE, TLS_PSK_WITH_AES_256_CBC_SHA384 = 0x00AF, TLS_PSK_WITH_NULL_SHA256 = 0x00B0, TLS_PSK_WITH_NULL_SHA384 = 0x00B1, TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 0x00B2, TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 0x00B3, TLS_DHE_PSK_WITH_NULL_SHA256 = 0x00B4, TLS_DHE_PSK_WITH_NULL_SHA384 = 0x00B5, TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 0x00B6, TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 0x00B7, TLS_RSA_PSK_WITH_NULL_SHA256 = 0x00B8, TLS_RSA_PSK_WITH_NULL_SHA384 = 0x00B9, TLS_AES_128_GCM_SHA256 = 0x1301, TLS_AES_256_GCM_SHA384 = 0x1302, TLS_CHACHA20_POLY1305_SHA256 = 0x1303, TLS_AES_128_CCM_SHA256 = 0x1304, TLS_AES_128_CCM_8_SHA256 = 0x1305, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC023, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC024, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = 0xC025, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = 0xC026, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = 0xC027, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = 0xC028, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = 0xC029, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = 0xC02A, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02B, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02C, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = 0xC02D, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = 0xC02E, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = 0xC02F, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = 0xC030, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = 0xC031, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = 0xC032, TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA8, TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = 0xCCA9, TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 0x00FF, SSL_RSA_WITH_RC2_CBC_MD5 = 0xFF80, SSL_RSA_WITH_IDEA_CBC_MD5 = 0xFF81, SSL_RSA_WITH_DES_CBC_MD5 = 0xFF82, SSL_RSA_WITH_3DES_EDE_CBC_MD5 = 0xFF83, SSL_NO_SUCH_CIPHERSUITE = 0xFFFF }; typedef int SSLCiphersuiteGroup; enum { kSSLCiphersuiteGroupDefault, kSSLCiphersuiteGroupCompatibility, kSSLCiphersuiteGroupLegacy, kSSLCiphersuiteGroupATS, kSSLCiphersuiteGroupATSCompatibility, }; // @protocol OS_sec_trust <NSObject> /* @end */ typedef NSObject/*<OS_sec_trust>*/ * __attribute__((objc_independent_class)) sec_trust_t; // @protocol OS_sec_identity <NSObject> /* @end */ typedef NSObject/*<OS_sec_identity>*/ * __attribute__((objc_independent_class)) sec_identity_t; // @protocol OS_sec_certificate <NSObject> /* @end */ typedef NSObject/*<OS_sec_certificate>*/ * __attribute__((objc_independent_class)) sec_certificate_t; __attribute__((availability(macosx,introduced=10_15))) typedef uint16_t tls_protocol_version_t; enum { tls_protocol_version_TLSv10 __attribute__((swift_name("TLSv10"))) __attribute__((availability(ios,introduced=13.0,deprecated=15.0,message="Use tls_protocol_version_TLSv12 or tls_protocol_version_TLSv13 instead."))) __attribute__((availability(macos,introduced=10.15,deprecated=12.0,message="Use tls_protocol_version_TLSv12 or tls_protocol_version_TLSv13 instead."))) = 0x0301, tls_protocol_version_TLSv11 __attribute__((swift_name("TLSv11"))) __attribute__((availability(ios,introduced=13.0,deprecated=15.0,message="Use tls_protocol_version_TLSv12 or tls_protocol_version_TLSv13 instead."))) __attribute__((availability(macos,introduced=10.15,deprecated=12.0,message="Use tls_protocol_version_TLSv12 or tls_protocol_version_TLSv13 instead."))) = 0x0302, tls_protocol_version_TLSv12 __attribute__((swift_name("TLSv12"))) = 0x0303, tls_protocol_version_TLSv13 __attribute__((swift_name("TLSv13"))) = 0x0304, tls_protocol_version_DTLSv10 __attribute__((swift_name("DTLSv10"))) __attribute__((availability(ios,introduced=13.0,deprecated=15.0,message="Use tls_protocol_version_DTLSv12 instead."))) __attribute__((availability(macos,introduced=10.15,deprecated=12.0,message="Use tls_protocol_version_DTLSv12 instead."))) = 0xfeff, tls_protocol_version_DTLSv12 __attribute__((swift_name("DTLSv12"))) = 0xfefd, }; typedef uint16_t tls_ciphersuite_t; enum { tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA __attribute__((swift_name("RSA_WITH_3DES_EDE_CBC_SHA"))) = 0x000A, tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA __attribute__((swift_name("RSA_WITH_AES_128_CBC_SHA"))) = 0x002F, tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA __attribute__((swift_name("RSA_WITH_AES_256_CBC_SHA"))) = 0x0035, tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 __attribute__((swift_name("RSA_WITH_AES_128_GCM_SHA256"))) = 0x009C, tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 __attribute__((swift_name("RSA_WITH_AES_256_GCM_SHA384"))) = 0x009D, tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 __attribute__((swift_name("RSA_WITH_AES_128_CBC_SHA256"))) = 0x003C, tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 __attribute__((swift_name("RSA_WITH_AES_256_CBC_SHA256"))) = 0x003D, tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA __attribute__((swift_name("ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"))) = 0xC008, tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA __attribute__((swift_name("ECDHE_ECDSA_WITH_AES_128_CBC_SHA"))) = 0xC009, tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA __attribute__((swift_name("ECDHE_ECDSA_WITH_AES_256_CBC_SHA"))) = 0xC00A, tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA __attribute__((swift_name("ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"))) = 0xC012, tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA __attribute__((swift_name("ECDHE_RSA_WITH_AES_128_CBC_SHA"))) = 0xC013, tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA __attribute__((swift_name("ECDHE_RSA_WITH_AES_256_CBC_SHA"))) = 0xC014, tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 __attribute__((swift_name("ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"))) = 0xC023, tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 __attribute__((swift_name("ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"))) = 0xC024, tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 __attribute__((swift_name("ECDHE_RSA_WITH_AES_128_CBC_SHA256"))) = 0xC027, tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 __attribute__((swift_name("ECDHE_RSA_WITH_AES_256_CBC_SHA384"))) = 0xC028, tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 __attribute__((swift_name("ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"))) = 0xC02B, tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 __attribute__((swift_name("ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"))) = 0xC02C, tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 __attribute__((swift_name("ECDHE_RSA_WITH_AES_128_GCM_SHA256"))) = 0xC02F, tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 __attribute__((swift_name("ECDHE_RSA_WITH_AES_256_GCM_SHA384"))) = 0xC030, tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 __attribute__((swift_name("ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"))) = 0xCCA8, tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 __attribute__((swift_name("ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"))) = 0xCCA9, tls_ciphersuite_AES_128_GCM_SHA256 __attribute__((swift_name("AES_128_GCM_SHA256"))) = 0x1301, tls_ciphersuite_AES_256_GCM_SHA384 __attribute__((swift_name("AES_256_GCM_SHA384"))) = 0x1302, tls_ciphersuite_CHACHA20_POLY1305_SHA256 __attribute__((swift_name("CHACHA20_POLY1305_SHA256"))) = 0x1303, }; typedef uint16_t tls_ciphersuite_group_t; enum { tls_ciphersuite_group_default, tls_ciphersuite_group_compatibility, tls_ciphersuite_group_legacy, tls_ciphersuite_group_ats, tls_ciphersuite_group_ats_compatibility, }; typedef int SSLProtocol; enum { kSSLProtocolUnknown __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 0, kTLSProtocol1 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 4, kTLSProtocol11 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 7, kTLSProtocol12 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 8, kDTLSProtocol1 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 9, kTLSProtocol13 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 10, kDTLSProtocol12 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 11, kTLSProtocolMaxSupported __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 999, kSSLProtocol2 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 1, kSSLProtocol3 __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 2, kSSLProtocol3Only __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 3, kTLSProtocol1Only __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 5, kSSLProtocolAll __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 6, }; extern "C" { #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable sec_trust_t sec_trust_create(SecTrustRef trust); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) SecTrustRef sec_trust_copy_ref(sec_trust_t trust); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable sec_identity_t sec_identity_create(SecIdentityRef identity); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable sec_identity_t sec_identity_create_with_certificates(SecIdentityRef identity, CFArrayRef certificates); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) bool sec_identity_access_certificates(sec_identity_t identity, void (^handler)(sec_certificate_t certificate)); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) _Nullable SecIdentityRef sec_identity_copy_ref(sec_identity_t identity); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) _Nullable CFArrayRef sec_identity_copy_certificates_ref(sec_identity_t identity); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable sec_certificate_t sec_certificate_create(SecCertificateRef certificate); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) SecCertificateRef sec_certificate_copy_ref(sec_certificate_t certificate); #pragma clang assume_nonnull end } // @protocol OS_sec_protocol_metadata <NSObject> /* @end */ typedef NSObject/*<OS_sec_protocol_metadata>*/ * __attribute__((objc_independent_class)) sec_protocol_metadata_t; extern "C" { #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) const char * _Nullable sec_protocol_metadata_get_negotiated_protocol(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable dispatch_data_t sec_protocol_metadata_copy_peer_public_key(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) tls_protocol_version_t sec_protocol_metadata_get_negotiated_tls_protocol_version(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,replacement="sec_protocol_metadata_get_negotiated_tls_protocol_version"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,replacement="sec_protocol_metadata_get_negotiated_tls_protocol_version"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,replacement="sec_protocol_metadata_get_negotiated_tls_protocol_version"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,replacement="sec_protocol_metadata_get_negotiated_tls_protocol_version"))) SSLProtocol sec_protocol_metadata_get_negotiated_protocol_version(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) tls_ciphersuite_t sec_protocol_metadata_get_negotiated_tls_ciphersuite(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,replacement="sec_protocol_metadata_get_negotiated_tls_ciphersuite"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,replacement="sec_protocol_metadata_get_negotiated_tls_ciphersuite"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,replacement="sec_protocol_metadata_get_negotiated_tls_ciphersuite"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,replacement="sec_protocol_metadata_get_negotiated_tls_ciphersuite"))) __attribute__((availability(macCatalyst,introduced=13.0,deprecated=13.0,replacement="sec_protocol_metadata_get_negotiated_tls_ciphersuite"))) SSLCipherSuite sec_protocol_metadata_get_negotiated_ciphersuite(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_get_early_data_accepted(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_access_peer_certificate_chain(sec_protocol_metadata_t metadata, void (^handler)(sec_certificate_t certificate)); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_access_ocsp_response(sec_protocol_metadata_t metadata, void (^handler)(dispatch_data_t ocsp_data)); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_access_supported_signature_algorithms(sec_protocol_metadata_t metadata, void (^handler)(uint16_t signature_algorithm)); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_access_distinguished_names(sec_protocol_metadata_t metadata, void (^handler)(dispatch_data_t distinguished_name)); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) bool sec_protocol_metadata_access_pre_shared_keys(sec_protocol_metadata_t metadata, void (^handler)(dispatch_data_t psk, dispatch_data_t psk_identity)); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) const char * _Nullable sec_protocol_metadata_get_server_name(sec_protocol_metadata_t metadata); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_peers_are_equal(sec_protocol_metadata_t metadataA, sec_protocol_metadata_t metadataB); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) bool sec_protocol_metadata_challenge_parameters_are_equal(sec_protocol_metadata_t metadataA, sec_protocol_metadata_t metadataB); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable dispatch_data_t sec_protocol_metadata_create_secret(sec_protocol_metadata_t metadata, size_t label_len, const char *label, size_t exporter_length); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) __attribute__((__ns_returns_retained__)) _Nullable dispatch_data_t sec_protocol_metadata_create_secret_with_context(sec_protocol_metadata_t metadata, size_t label_len, const char *label, size_t context_len, const uint8_t *context, size_t exporter_length); #pragma clang assume_nonnull end } // @protocol OS_sec_protocol_options <NSObject> /* @end */ typedef NSObject/*<OS_sec_protocol_options>*/ * __attribute__((objc_independent_class)) sec_protocol_options_t; extern "C" { #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) bool sec_protocol_options_are_equal(sec_protocol_options_t optionsA, sec_protocol_options_t optionsB); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_local_identity(sec_protocol_options_t options, sec_identity_t identity); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) void sec_protocol_options_append_tls_ciphersuite(sec_protocol_options_t options, tls_ciphersuite_t ciphersuite); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,message="Use sec_protocol_options_append_tls_ciphersuite"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,message="Use sec_protocol_options_append_tls_ciphersuite"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,message="Use sec_protocol_options_append_tls_ciphersuite"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,message="Use sec_protocol_options_append_tls_ciphersuite"))) __attribute__((availability(macCatalyst,introduced=13.0,deprecated=13.0,message="Use sec_protocol_options_append_tls_ciphersuite"))) void sec_protocol_options_add_tls_ciphersuite(sec_protocol_options_t options, SSLCipherSuite ciphersuite); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) void sec_protocol_options_append_tls_ciphersuite_group(sec_protocol_options_t options, tls_ciphersuite_group_t group); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,message="Use sec_protocol_options_append_tls_ciphersuite_group"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,message="Use sec_protocol_options_append_tls_ciphersuite_group"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,message="Use sec_protocol_options_append_tls_ciphersuite_group"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,message="Use sec_protocol_options_append_tls_ciphersuite_group"))) __attribute__((availability(macCatalyst,introduced=13.0,deprecated=13.0,message="Use sec_protocol_options_append_tls_ciphersuite_group"))) void sec_protocol_options_add_tls_ciphersuite_group(sec_protocol_options_t options, SSLCiphersuiteGroup group); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,replacement="sec_protocol_options_set_min_tls_protocol_version"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,replacement="sec_protocol_options_set_min_tls_protocol_version"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,replacement="sec_protocol_options_set_min_tls_protocol_version"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,replacement="sec_protocol_options_set_min_tls_protocol_version"))) __attribute__((availability(macCatalyst,introduced=13.0,deprecated=13.0,replacement="sec_protocol_options_set_min_tls_protocol_version"))) void sec_protocol_options_set_tls_min_version(sec_protocol_options_t options, SSLProtocol version); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) void sec_protocol_options_set_min_tls_protocol_version(sec_protocol_options_t options, tls_protocol_version_t version); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) tls_protocol_version_t sec_protocol_options_get_default_min_tls_protocol_version(void); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) tls_protocol_version_t sec_protocol_options_get_default_min_dtls_protocol_version(void); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,replacement="sec_protocol_options_set_max_tls_protocol_version"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,replacement="sec_protocol_options_set_max_tls_protocol_version"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,replacement="sec_protocol_options_set_max_tls_protocol_version"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,replacement="sec_protocol_options_set_max_tls_protocol_version"))) __attribute__((availability(macCatalyst,introduced=13.0,deprecated=13.0,replacement="sec_protocol_options_set_max_tls_protocol_version"))) void sec_protocol_options_set_tls_max_version(sec_protocol_options_t options, SSLProtocol version); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) void sec_protocol_options_set_max_tls_protocol_version(sec_protocol_options_t options, tls_protocol_version_t version); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) tls_protocol_version_t sec_protocol_options_get_default_max_tls_protocol_version(void); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) tls_protocol_version_t sec_protocol_options_get_default_max_dtls_protocol_version(void); __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) bool sec_protocol_options_get_enable_encrypted_client_hello(sec_protocol_options_t options); __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) bool sec_protocol_options_get_quic_use_legacy_codepoint(sec_protocol_options_t options); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_add_tls_application_protocol(sec_protocol_options_t options, const char *application_protocol); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_server_name(sec_protocol_options_t options, const char *server_name); __attribute__((availability(macos,introduced=10.14,deprecated=10.15,message="DHE ciphersuites are no longer supported"))) __attribute__((availability(ios,introduced=12.0,deprecated=13.0,message="DHE ciphersuites are no longer supported"))) __attribute__((availability(watchos,introduced=5.0,deprecated=6.0,message="DHE ciphersuites are no longer supported"))) __attribute__((availability(tvos,introduced=12.0,deprecated=13.0,message="DHE ciphersuites are no longer supported"))) void sec_protocol_options_set_tls_diffie_hellman_parameters(sec_protocol_options_t options, dispatch_data_t params); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_add_pre_shared_key(sec_protocol_options_t options, dispatch_data_t psk, dispatch_data_t psk_identity); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) void sec_protocol_options_set_tls_pre_shared_key_identity_hint(sec_protocol_options_t options, dispatch_data_t psk_identity_hint); typedef void (*sec_protocol_pre_shared_key_selection_complete_t)(dispatch_data_t _Nullable psk_identity); typedef void (*sec_protocol_pre_shared_key_selection_t)(sec_protocol_metadata_t metadata, dispatch_data_t _Nullable psk_identity_hint, sec_protocol_pre_shared_key_selection_complete_t complete); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) void sec_protocol_options_set_pre_shared_key_selection_block(sec_protocol_options_t options, sec_protocol_pre_shared_key_selection_t psk_selection_block, dispatch_queue_t psk_selection_queue); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_tickets_enabled(sec_protocol_options_t options, bool tickets_enabled); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_is_fallback_attempt(sec_protocol_options_t options, bool is_fallback_attempt); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_resumption_enabled(sec_protocol_options_t options, bool resumption_enabled); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_false_start_enabled(sec_protocol_options_t options, bool false_start_enabled); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_ocsp_enabled(sec_protocol_options_t options, bool ocsp_enabled); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_sct_enabled(sec_protocol_options_t options, bool sct_enabled); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_tls_renegotiation_enabled(sec_protocol_options_t options, bool renegotiation_enabled); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_peer_authentication_required(sec_protocol_options_t options, bool peer_authentication_required); __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) void sec_protocol_options_set_peer_authentication_optional(sec_protocol_options_t options, bool peer_authentication_optional); __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) void sec_protocol_options_set_enable_encrypted_client_hello(sec_protocol_options_t options, bool enable_encrypted_client_hello); __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) void sec_protocol_options_set_quic_use_legacy_codepoint(sec_protocol_options_t options, bool quic_use_legacy_codepoint); typedef void (*sec_protocol_key_update_complete_t)(void); typedef void (*sec_protocol_key_update_t)(sec_protocol_metadata_t metadata, sec_protocol_key_update_complete_t complete); typedef void (*sec_protocol_challenge_complete_t)(sec_identity_t _Nullable identity); typedef void (*sec_protocol_challenge_t)(sec_protocol_metadata_t metadata, sec_protocol_challenge_complete_t complete); typedef void (*sec_protocol_verify_complete_t)(bool result); typedef void (*sec_protocol_verify_t)(sec_protocol_metadata_t metadata, sec_trust_t trust_ref, sec_protocol_verify_complete_t complete); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_key_update_block(sec_protocol_options_t options, sec_protocol_key_update_t key_update_block, dispatch_queue_t key_update_queue); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_challenge_block(sec_protocol_options_t options, sec_protocol_challenge_t challenge_block, dispatch_queue_t challenge_queue); __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) void sec_protocol_options_set_verify_block(sec_protocol_options_t options, sec_protocol_verify_t verify_block, dispatch_queue_t verify_block_queue); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin enum { errAuthorizationSuccess = 0, errAuthorizationInvalidSet = -60001, errAuthorizationInvalidRef = -60002, errAuthorizationInvalidTag = -60003, errAuthorizationInvalidPointer = -60004, errAuthorizationDenied = -60005, errAuthorizationCanceled = -60006, errAuthorizationInteractionNotAllowed = -60007, errAuthorizationInternal = -60008, errAuthorizationExternalizeNotAllowed = -60009, errAuthorizationInternalizeNotAllowed = -60010, errAuthorizationInvalidFlags = -60011, errAuthorizationToolExecuteFailure = -60031, errAuthorizationToolEnvironmentError = -60032, errAuthorizationBadAddress = -60033, }; typedef UInt32 AuthorizationFlags; enum { kAuthorizationFlagDefaults = 0, kAuthorizationFlagInteractionAllowed = (1 << 0), kAuthorizationFlagExtendRights = (1 << 1), kAuthorizationFlagPartialRights = (1 << 2), kAuthorizationFlagDestroyRights = (1 << 3), kAuthorizationFlagPreAuthorize = (1 << 4), kAuthorizationFlagNoData = (1 << 20) }; enum { kAuthorizationFlagCanNotPreAuthorize = (1 << 0) }; typedef const struct AuthorizationOpaqueRef *AuthorizationRef; typedef const char *AuthorizationString; typedef struct { AuthorizationString name; size_t valueLength; void * _Nullable value; UInt32 flags; } AuthorizationItem; typedef struct { UInt32 count; AuthorizationItem * _Nullable items; } AuthorizationItemSet; static const size_t kAuthorizationExternalFormLength = 32; typedef struct { char bytes[kAuthorizationExternalFormLength]; } AuthorizationExternalForm; typedef AuthorizationItemSet AuthorizationRights; typedef AuthorizationItemSet AuthorizationEnvironment; OSStatus AuthorizationCreate(const AuthorizationRights * _Nullable rights, const AuthorizationEnvironment * _Nullable environment, AuthorizationFlags flags, AuthorizationRef _Nullable * _Nullable authorization); OSStatus AuthorizationFree(AuthorizationRef authorization, AuthorizationFlags flags); OSStatus AuthorizationCopyRights(AuthorizationRef authorization, const AuthorizationRights *rights, const AuthorizationEnvironment * _Nullable environment, AuthorizationFlags flags, AuthorizationRights * _Nullable * _Nullable authorizedRights); typedef void (*AuthorizationAsyncCallback)(OSStatus err, AuthorizationRights * _Nullable blockAuthorizedRights); void AuthorizationCopyRightsAsync(AuthorizationRef authorization, const AuthorizationRights *rights, const AuthorizationEnvironment * _Nullable environment, AuthorizationFlags flags, AuthorizationAsyncCallback callbackBlock); OSStatus AuthorizationCopyInfo(AuthorizationRef authorization, AuthorizationString _Nullable tag, AuthorizationItemSet * _Nullable * _Nonnull info); OSStatus AuthorizationMakeExternalForm(AuthorizationRef authorization, AuthorizationExternalForm * _Nonnull extForm); OSStatus AuthorizationCreateFromExternalForm(const AuthorizationExternalForm *extForm, AuthorizationRef _Nullable * _Nonnull authorization); OSStatus AuthorizationFreeItemSet(AuthorizationItemSet *set); OSStatus AuthorizationExecuteWithPrivileges(AuthorizationRef authorization, const char *pathToTool, AuthorizationFlags options, char * _Nonnull const * _Nonnull arguments, FILE * _Nullable * _Nullable communicationsPipe) __attribute__((availability(macosx,introduced=10.1,deprecated=10.7))); OSStatus AuthorizationCopyPrivilegedReference(AuthorizationRef _Nullable * _Nonnull authorization, AuthorizationFlags flags) __attribute__((availability(macosx,introduced=10.1,deprecated=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef UInt32 SecuritySessionId; enum { noSecuritySession = 0, callerSecuritySession = ((SecuritySessionId)-1) }; typedef UInt32 SessionAttributeBits; enum { sessionIsRoot = 0x0001, sessionHasGraphicAccess = 0x0010, sessionHasTTY = 0x0020, sessionIsRemote = 0x1000, }; typedef UInt32 SessionCreationFlags; enum { sessionKeepCurrentBootstrap = 0x8000 }; enum { errSessionSuccess = 0, errSessionInvalidId = -60500, errSessionInvalidAttributes = -60501, errSessionAuthorizationDenied = -60502, errSessionValueNotSet = -60503, errSessionInternal = -60008, errSessionInvalidFlags = -60011, }; OSStatus SessionGetInfo(SecuritySessionId session, SecuritySessionId * _Nullable sessionId, SessionAttributeBits * _Nullable attributes); OSStatus SessionCreate(SessionCreationFlags flags, SessionAttributeBits attributes); #pragma clang assume_nonnull end } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef uint32 CSSM_MANAGER_EVENT_TYPES; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_manager_event_notification { CSSM_SERVICE_MASK DestinationModuleManagerType; CSSM_SERVICE_MASK SourceModuleManagerType; CSSM_MANAGER_EVENT_TYPES Event; uint32 EventId; SecAsn1Item EventData; } CSSM_MANAGER_EVENT_NOTIFICATION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_MANAGER_EVENT_NOTIFICATION_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { CSSM_RETURN CSSM_Init (const CSSM_VERSION *Version, CSSM_PRIVILEGE_SCOPE Scope, const CSSM_GUID *CallerGuid, CSSM_KEY_HIERARCHY KeyHierarchy, CSSM_PVC_MODE *PvcPolicy, const void *Reserved) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_Terminate (void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ModuleLoad (const CSSM_GUID *ModuleGuid, CSSM_KEY_HIERARCHY KeyHierarchy, CSSM_API_ModuleEventHandler AppNotifyCallback, void *AppNotifyCallbackCtx) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ModuleUnload (const CSSM_GUID *ModuleGuid, CSSM_API_ModuleEventHandler AppNotifyCallback, void *AppNotifyCallbackCtx) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_Introduce (const CSSM_GUID *ModuleID, CSSM_KEY_HIERARCHY KeyHierarchy) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_Unintroduce (const CSSM_GUID *ModuleID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ModuleAttach (const CSSM_GUID *ModuleGuid, const CSSM_VERSION *Version, const CSSM_API_MEMORY_FUNCS *MemoryFuncs, uint32 SubserviceID, CSSM_SERVICE_TYPE SubServiceType, CSSM_ATTACH_FLAGS AttachFlags, CSSM_KEY_HIERARCHY KeyHierarchy, CSSM_FUNC_NAME_ADDR *FunctionTable, uint32 NumFunctionTable, const void *Reserved, CSSM_MODULE_HANDLE_PTR NewModuleHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ModuleDetach (CSSM_MODULE_HANDLE ModuleHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_SetPrivilege (CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetPrivilege (CSSM_PRIVILEGE *Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetModuleGUIDFromHandle (CSSM_MODULE_HANDLE ModuleHandle, CSSM_GUID_PTR ModuleGUID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetSubserviceUIDFromHandle (CSSM_MODULE_HANDLE ModuleHandle, CSSM_SUBSERVICE_UID_PTR SubserviceUID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ListAttachedModuleManagers (uint32 *NumberOfModuleManagers, CSSM_GUID_PTR ModuleManagerGuids) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetAPIMemoryFunctions (CSSM_MODULE_HANDLE AddInHandle, CSSM_API_MEMORY_FUNCS_PTR AppMemoryFuncs) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateSignatureContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateSymmetricContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, CSSM_ENCRYPT_MODE Mode, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, const SecAsn1Item *InitVector, CSSM_PADDING Padding, void *Reserved, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateDigestContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateMacContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, const CSSM_KEY *Key, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateRandomGenContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, const CSSM_CRYPTO_DATA *Seed, CSSM_SIZE Length, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateAsymmetricContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, CSSM_PADDING Padding, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateDeriveKeyContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, CSSM_KEY_TYPE DeriveKeyType, uint32 DeriveKeyLengthInBits, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *BaseKey, uint32 IterationCount, const SecAsn1Item *Salt, const CSSM_CRYPTO_DATA *Seed, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreateKeyGenContext (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS AlgorithmID, uint32 KeySizeInBits, const CSSM_CRYPTO_DATA *Seed, const SecAsn1Item *Salt, const CSSM_DATE *StartDate, const CSSM_DATE *EndDate, const SecAsn1Item *Params, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_CreatePassThroughContext (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *Key, CSSM_CC_HANDLE *NewContextHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetContext (CSSM_CC_HANDLE CCHandle, CSSM_CONTEXT_PTR *Context) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_FreeContext (CSSM_CONTEXT_PTR Context) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_SetContext (CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DeleteContext (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetContextAttribute (const CSSM_CONTEXT *Context, uint32 AttributeType, CSSM_CONTEXT_ATTRIBUTE_PTR *ContextAttribute) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_UpdateContextAttributes (CSSM_CC_HANDLE CCHandle, uint32 NumberOfAttributes, const CSSM_CONTEXT_ATTRIBUTE *ContextAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DeleteContextAttributes (CSSM_CC_HANDLE CCHandle, uint32 NumberOfAttributes, const CSSM_CONTEXT_ATTRIBUTE *ContextAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_Login (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const SecAsn1Item *LoginName, const void *Reserved) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_Logout (CSSM_CSP_HANDLE CSPHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_GetLoginAcl (CSSM_CSP_HANDLE CSPHandle, const CSSM_STRING *SelectionTag, uint32 *NumberOfAclInfos, CSSM_ACL_ENTRY_INFO_PTR *AclInfos) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_ChangeLoginAcl (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_EDIT *AclEdit) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetKeyAcl (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *Key, const CSSM_STRING *SelectionTag, uint32 *NumberOfAclInfos, CSSM_ACL_ENTRY_INFO_PTR *AclInfos) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ChangeKeyAcl (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_EDIT *AclEdit, const CSSM_KEY *Key) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetKeyOwner (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *Key, CSSM_ACL_OWNER_PROTOTYPE_PTR Owner) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_ChangeKeyOwner (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, const CSSM_ACL_OWNER_PROTOTYPE *NewOwner) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_GetLoginOwner (CSSM_CSP_HANDLE CSPHandle, CSSM_ACL_OWNER_PROTOTYPE_PTR Owner) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_ChangeLoginOwner (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_OWNER_PROTOTYPE *NewOwner) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_SignData (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_ALGORITHMS DigestAlgorithm, CSSM_DATA_PTR Signature) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_SignDataInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_SignDataUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_SignDataFinal (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Signature) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyData (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_ALGORITHMS DigestAlgorithm, const SecAsn1Item *Signature) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyDataInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyDataUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyDataFinal (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *Signature) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DigestData (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_DATA_PTR Digest) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DigestDataInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DigestDataUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DigestDataClone (CSSM_CC_HANDLE CCHandle, CSSM_CC_HANDLE *ClonednewCCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DigestDataFinal (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Digest) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateMac (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_DATA_PTR Mac) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateMacInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateMacUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateMacFinal (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Mac) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyMac (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount, const SecAsn1Item *Mac) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyMacInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyMacUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyMacFinal (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *Mac) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_QuerySize (CSSM_CC_HANDLE CCHandle, CSSM_BOOL Encrypt, uint32 QuerySizeCount, CSSM_QUERY_SIZE_DATA_PTR DataBlockSizes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_EncryptData (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *ClearBufs, uint32 ClearBufCount, CSSM_DATA_PTR CipherBufs, uint32 CipherBufCount, CSSM_SIZE *bytesEncrypted, CSSM_DATA_PTR RemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_EncryptDataP (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *ClearBufs, uint32 ClearBufCount, CSSM_DATA_PTR CipherBufs, uint32 CipherBufCount, CSSM_SIZE *bytesEncrypted, CSSM_DATA_PTR RemData, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_EncryptDataInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_EncryptDataInitP (CSSM_CC_HANDLE CCHandle, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_EncryptDataUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *ClearBufs, uint32 ClearBufCount, CSSM_DATA_PTR CipherBufs, uint32 CipherBufCount, CSSM_SIZE *bytesEncrypted) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_EncryptDataFinal (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR RemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DecryptData (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CipherBufs, uint32 CipherBufCount, CSSM_DATA_PTR ClearBufs, uint32 ClearBufCount, CSSM_SIZE *bytesDecrypted, CSSM_DATA_PTR RemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DecryptDataP (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CipherBufs, uint32 CipherBufCount, CSSM_DATA_PTR ClearBufs, uint32 ClearBufCount, CSSM_SIZE *bytesDecrypted, CSSM_DATA_PTR RemData, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DecryptDataInit (CSSM_CC_HANDLE CCHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DecryptDataInitP (CSSM_CC_HANDLE CCHandle, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DecryptDataUpdate (CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CipherBufs, uint32 CipherBufCount, CSSM_DATA_PTR ClearBufs, uint32 ClearBufCount, CSSM_SIZE *bytesDecrypted) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DecryptDataFinal (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR RemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_QueryKeySizeInBits (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_KEY *Key, CSSM_KEY_SIZE_PTR KeySize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateKey (CSSM_CC_HANDLE CCHandle, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR Key) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateKeyP (CSSM_CC_HANDLE CCHandle, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR Key, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateKeyPair (CSSM_CC_HANDLE CCHandle, uint32 PublicKeyUsage, uint32 PublicKeyAttr, const SecAsn1Item *PublicKeyLabel, CSSM_KEY_PTR PublicKey, uint32 PrivateKeyUsage, uint32 PrivateKeyAttr, const SecAsn1Item *PrivateKeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR PrivateKey) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateKeyPairP (CSSM_CC_HANDLE CCHandle, uint32 PublicKeyUsage, uint32 PublicKeyAttr, const SecAsn1Item *PublicKeyLabel, CSSM_KEY_PTR PublicKey, uint32 PrivateKeyUsage, uint32 PrivateKeyAttr, const SecAsn1Item *PrivateKeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR PrivateKey, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateRandom (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR RandomNumber) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_ObtainPrivateKeyFromPublicKey (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *PublicKey, CSSM_KEY_PTR PrivateKey) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_WrapKey (CSSM_CC_HANDLE CCHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, const SecAsn1Item *DescriptiveData, CSSM_WRAP_KEY_PTR WrappedKey) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_UnwrapKey (CSSM_CC_HANDLE CCHandle, const CSSM_KEY *PublicKey, const CSSM_WRAP_KEY *WrappedKey, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR UnwrappedKey, CSSM_DATA_PTR DescriptiveData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_WrapKeyP (CSSM_CC_HANDLE CCHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, const SecAsn1Item *DescriptiveData, CSSM_WRAP_KEY_PTR WrappedKey, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_UnwrapKeyP (CSSM_CC_HANDLE CCHandle, const CSSM_KEY *PublicKey, const CSSM_WRAP_KEY *WrappedKey, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR UnwrappedKey, CSSM_DATA_PTR DescriptiveData, CSSM_PRIVILEGE Privilege) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DeriveKey (CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Param, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR DerivedKey) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_FreeKey (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, CSSM_KEY_PTR KeyPtr, CSSM_BOOL Delete) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GenerateAlgorithmParams (CSSM_CC_HANDLE CCHandle, uint32 ParamBits, CSSM_DATA_PTR Param) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_GetOperationalStatistics (CSSM_CSP_HANDLE CSPHandle, CSSM_CSP_OPERATIONAL_STATISTICS *Statistics) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_GetTimeValue (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS TimeAlgorithm, SecAsn1Item *TimeData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_RetrieveUniqueId (CSSM_CSP_HANDLE CSPHandle, CSSM_DATA_PTR UniqueID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_RetrieveCounter (CSSM_CSP_HANDLE CSPHandle, CSSM_DATA_PTR Counter) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_VerifyDevice (CSSM_CSP_HANDLE CSPHandle, const SecAsn1Item *DeviceCert) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CSP_PassThrough (CSSM_CC_HANDLE CCHandle, uint32 PassThroughId, const void *InData, void **OutData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_SubmitCredRequest (CSSM_TP_HANDLE TPHandle, const CSSM_TP_AUTHORITY_ID *PreferredAuthority, CSSM_TP_AUTHORITY_REQUEST_TYPE RequestType, const CSSM_TP_REQUEST_SET *RequestInput, const CSSM_TP_CALLERAUTH_CONTEXT *CallerAuthContext, sint32 *EstimatedTime, CSSM_DATA_PTR ReferenceIdentifier) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_RetrieveCredResult (CSSM_TP_HANDLE TPHandle, const SecAsn1Item *ReferenceIdentifier, const CSSM_TP_CALLERAUTH_CONTEXT *CallerAuthCredentials, sint32 *EstimatedTime, CSSM_BOOL *ConfirmationRequired, CSSM_TP_RESULT_SET_PTR *RetrieveOutput) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_ConfirmCredResult (CSSM_TP_HANDLE TPHandle, const SecAsn1Item *ReferenceIdentifier, const CSSM_TP_CALLERAUTH_CONTEXT *CallerAuthCredentials, const CSSM_TP_CONFIRM_RESPONSE *Responses, const CSSM_TP_AUTHORITY_ID *PreferredAuthority) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_ReceiveConfirmation (CSSM_TP_HANDLE TPHandle, const SecAsn1Item *ReferenceIdentifier, CSSM_TP_CONFIRM_RESPONSE_PTR *Responses, sint32 *ElapsedTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertReclaimKey (CSSM_TP_HANDLE TPHandle, const CSSM_CERTGROUP *CertGroup, uint32 CertIndex, CSSM_LONG_HANDLE KeyCacheHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertReclaimAbort (CSSM_TP_HANDLE TPHandle, CSSM_LONG_HANDLE KeyCacheHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_FormRequest (CSSM_TP_HANDLE TPHandle, const CSSM_TP_AUTHORITY_ID *PreferredAuthority, CSSM_TP_FORM_TYPE FormType, CSSM_DATA_PTR BlankForm) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_FormSubmit (CSSM_TP_HANDLE TPHandle, CSSM_TP_FORM_TYPE FormType, const SecAsn1Item *Form, const CSSM_TP_AUTHORITY_ID *ClearanceAuthority, const CSSM_TP_AUTHORITY_ID *RepresentedAuthority, CSSM_ACCESS_CREDENTIALS_PTR Credentials) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertGroupVerify (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_CERTGROUP *CertGroupToBeVerified, const CSSM_TP_VERIFY_CONTEXT *VerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR VerifyContextResult) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertCreateTemplate (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CertFields, CSSM_DATA_PTR CertTemplate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertGetAllTemplateFields (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const SecAsn1Item *CertTemplate, uint32 *NumberOfFields, CSSM_FIELD_PTR *CertFields) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertSign (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertTemplateToBeSigned, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *SignerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR SignerVerifyResult, CSSM_DATA_PTR SignedCert) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CrlVerify (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_ENCODED_CRL *CrlToBeVerified, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *VerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CrlCreateTemplate (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CrlFields, CSSM_DATA_PTR NewCrlTemplate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertRevoke (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const SecAsn1Item *OldCrlTemplate, const CSSM_CERTGROUP *CertGroupToBeRevoked, const CSSM_CERTGROUP *RevokerCertGroup, const CSSM_TP_VERIFY_CONTEXT *RevokerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult, CSSM_TP_CERTCHANGE_REASON Reason, CSSM_DATA_PTR NewCrlTemplate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertRemoveFromCrlTemplate (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const SecAsn1Item *OldCrlTemplate, const CSSM_CERTGROUP *CertGroupToBeRemoved, const CSSM_CERTGROUP *RevokerCertGroup, const CSSM_TP_VERIFY_CONTEXT *RevokerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult, CSSM_DATA_PTR NewCrlTemplate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CrlSign (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_ENCODED_CRL *CrlToBeSigned, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *SignerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR SignerVerifyResult, CSSM_DATA_PTR SignedCrl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_ApplyCrlToDb (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_ENCODED_CRL *CrlToBeApplied, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *ApplyCrlVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR ApplyCrlVerifyResult) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertGroupConstruct (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_DL_DB_LIST *DBList, const void *ConstructParams, const CSSM_CERTGROUP *CertGroupFrag, CSSM_CERTGROUP_PTR *CertGroup) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertGroupPrune (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const CSSM_DL_DB_LIST *DBList, const CSSM_CERTGROUP *OrderedCertGroup, CSSM_CERTGROUP_PTR *PrunedCertGroup) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_CertGroupToTupleGroup (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const CSSM_CERTGROUP *CertGroup, CSSM_TUPLEGROUP_PTR *TupleGroup) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_TupleGroupToCertGroup (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const CSSM_TUPLEGROUP *TupleGroup, CSSM_CERTGROUP_PTR *CertTemplates) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_TP_PassThrough (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_DL_DB_LIST *DBList, uint32 PassThroughId, const void *InputParams, void **OutputParams) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_AC_AuthCompute (CSSM_AC_HANDLE ACHandle, const CSSM_TUPLEGROUP *BaseAuthorizations, const CSSM_TUPLEGROUP *Credentials, uint32 NumberOfRequestors, const CSSM_LIST *Requestors, const CSSM_LIST *RequestedAuthorizationPeriod, const CSSM_LIST *RequestedAuthorization, CSSM_TUPLEGROUP_PTR AuthorizationResult) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_AC_PassThrough (CSSM_AC_HANDLE ACHandle, CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_DL_DB_LIST *DBList, uint32 PassThroughId, const void *InputParams, void **OutputParams) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertCreateTemplate (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CertFields, CSSM_DATA_PTR CertTemplate) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetAllTemplateFields (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *CertTemplate, uint32 *NumberOfFields, CSSM_FIELD_PTR *CertFields) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertSign (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertTemplate, const CSSM_FIELD *SignScope, uint32 ScopeSize, CSSM_DATA_PTR SignedCert) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertVerify (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertToBeVerified, const SecAsn1Item *SignerCert, const CSSM_FIELD *VerifyScope, uint32 ScopeSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertVerifyWithKey (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertToBeVerified) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetFirstFieldValue (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, const SecAsn1Oid *CertField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetNextFieldValue (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertAbortQuery (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetKeyInfo (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, CSSM_KEY_PTR *Key) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetAllFields (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, uint32 *NumberOfFields, CSSM_FIELD_PTR *CertFields) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_FreeFields (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, CSSM_FIELD_PTR *Fields) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_FreeFieldValue (CSSM_CL_HANDLE CLHandle, const SecAsn1Oid *CertOrCrlOid, CSSM_DATA_PTR Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertCache (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, CSSM_HANDLE_PTR CertHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetFirstCachedFieldValue (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CertHandle, const SecAsn1Oid *CertField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGetNextCachedFieldValue (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertAbortCache (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CertHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGroupToSignedBundle (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CERTGROUP *CertGroupToBundle, const CSSM_CERT_BUNDLE_HEADER *BundleInfo, CSSM_DATA_PTR SignedBundle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertGroupFromVerifiedBundle (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CERT_BUNDLE *CertBundle, const SecAsn1Item *SignerCert, CSSM_CERTGROUP_PTR *CertGroup) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CertDescribeFormat (CSSM_CL_HANDLE CLHandle, uint32 *NumberOfFields, CSSM_OID_PTR *OidList) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlCreateTemplate (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CrlTemplate, CSSM_DATA_PTR NewCrl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlSetFields (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CrlTemplate, const SecAsn1Item *OldCrl, CSSM_DATA_PTR ModifiedCrl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlAddCert (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *Cert, uint32 NumberOfFields, const CSSM_FIELD *CrlEntryFields, const SecAsn1Item *OldCrl, CSSM_DATA_PTR NewCrl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlRemoveCert (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, const SecAsn1Item *OldCrl, CSSM_DATA_PTR NewCrl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlSign (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *UnsignedCrl, const CSSM_FIELD *SignScope, uint32 ScopeSize, CSSM_DATA_PTR SignedCrl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlVerify (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CrlToBeVerified, const SecAsn1Item *SignerCert, const CSSM_FIELD *VerifyScope, uint32 ScopeSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlVerifyWithKey (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CrlToBeVerified) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_IsCertInCrl (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, const SecAsn1Item *Crl, CSSM_BOOL *CertFound) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlGetFirstFieldValue (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Crl, const SecAsn1Oid *CrlField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlGetNextFieldValue (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlAbortQuery (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlGetAllFields (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Crl, uint32 *NumberOfCrlFields, CSSM_FIELD_PTR *CrlFields) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlCache (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Crl, CSSM_HANDLE_PTR CrlHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_IsCertInCachedCrl (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, CSSM_HANDLE CrlHandle, CSSM_BOOL *CertFound, CSSM_DATA_PTR CrlRecordIndex) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlGetFirstCachedFieldValue (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CrlHandle, const SecAsn1Item *CrlRecordIndex, const SecAsn1Oid *CrlField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlGetNextCachedFieldValue (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlGetAllCachedRecordFields (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CrlHandle, const SecAsn1Item *CrlRecordIndex, uint32 *NumberOfFields, CSSM_FIELD_PTR *CrlFields) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlAbortCache (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CrlHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_CrlDescribeFormat (CSSM_CL_HANDLE CLHandle, uint32 *NumberOfFields, CSSM_OID_PTR *OidList) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_CL_PassThrough (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, uint32 PassThroughId, const void *InputParams, void **OutputParams) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DbOpen (CSSM_DL_HANDLE DLHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_ACCESS_CREDENTIALS *AccessCred, const void *OpenParameters, CSSM_DB_HANDLE *DbHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DbClose (CSSM_DL_DB_HANDLE DLDBHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DbCreate (CSSM_DL_HANDLE DLHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, const CSSM_DBINFO *DBInfo, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, const void *OpenParameters, CSSM_DB_HANDLE *DbHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DbDelete (CSSM_DL_HANDLE DLHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, const CSSM_ACCESS_CREDENTIALS *AccessCred) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_CreateRelation (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RelationID, const char *RelationName, uint32 NumberOfAttributes, const CSSM_DB_SCHEMA_ATTRIBUTE_INFO *pAttributeInfo, uint32 NumberOfIndexes, const CSSM_DB_SCHEMA_INDEX_INFO *pIndexInfo) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DestroyRelation (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RelationID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_Authenticate (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_ACCESS_CREDENTIALS *AccessCred) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_GetDbAcl (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_STRING *SelectionTag, uint32 *NumberOfAclInfos, CSSM_ACL_ENTRY_INFO_PTR *AclInfos) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_ChangeDbAcl (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_EDIT *AclEdit) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_GetDbOwner (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_ACL_OWNER_PROTOTYPE_PTR Owner) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_ChangeDbOwner (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_OWNER_PROTOTYPE *NewOwner) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_GetDbNames (CSSM_DL_HANDLE DLHandle, CSSM_NAME_LIST_PTR *NameList) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_GetDbNameFromHandle (CSSM_DL_DB_HANDLE DLDBHandle, char **DbName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_FreeNameList (CSSM_DL_HANDLE DLHandle, CSSM_NAME_LIST_PTR NameList) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataInsert (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RecordType, const CSSM_DB_RECORD_ATTRIBUTE_DATA *Attributes, const SecAsn1Item *Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataDelete (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_DB_UNIQUE_RECORD *UniqueRecordIdentifier) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataModify (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RecordType, CSSM_DB_UNIQUE_RECORD_PTR UniqueRecordIdentifier, const CSSM_DB_RECORD_ATTRIBUTE_DATA *AttributesToBeModified, const SecAsn1Item *DataToBeModified, CSSM_DB_MODIFY_MODE ModifyMode) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataGetFirst (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_QUERY *Query, CSSM_HANDLE_PTR ResultsHandle, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataGetNext (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_HANDLE ResultsHandle, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataAbortQuery (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_HANDLE ResultsHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_DataGetFromUniqueRecordId (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_DB_UNIQUE_RECORD *UniqueRecord, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_FreeUniqueRecord (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN CSSM_DL_PassThrough (CSSM_DL_DB_HANDLE DLDBHandle, uint32 PassThroughId, const void *InputParams, void **OutputParams) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_spi_ac_funcs { CSSM_RETURN ( *AuthCompute) (CSSM_AC_HANDLE ACHandle, const CSSM_TUPLEGROUP *BaseAuthorizations, const CSSM_TUPLEGROUP *Credentials, uint32 NumberOfRequestors, const CSSM_LIST *Requestors, const CSSM_LIST *RequestedAuthorizationPeriod, const CSSM_LIST *RequestedAuthorization, CSSM_TUPLEGROUP_PTR AuthorizationResult); CSSM_RETURN ( *PassThrough) (CSSM_AC_HANDLE ACHandle, CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_DL_DB_LIST *DBList, uint32 PassThroughId, const void *InputParams, void **OutputParams); } CSSM_SPI_AC_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SPI_AC_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_spi_cl_funcs { CSSM_RETURN ( *CertCreateTemplate) (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CertFields, CSSM_DATA_PTR CertTemplate); CSSM_RETURN ( *CertGetAllTemplateFields) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *CertTemplate, uint32 *NumberOfFields, CSSM_FIELD_PTR *CertFields); CSSM_RETURN ( *CertSign) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertTemplate, const CSSM_FIELD *SignScope, uint32 ScopeSize, CSSM_DATA_PTR SignedCert); CSSM_RETURN ( *CertVerify) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertToBeVerified, const SecAsn1Item *SignerCert, const CSSM_FIELD *VerifyScope, uint32 ScopeSize); CSSM_RETURN ( *CertVerifyWithKey) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertToBeVerified); CSSM_RETURN ( *CertGetFirstFieldValue) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, const SecAsn1Oid *CertField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CertGetNextFieldValue) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CertAbortQuery) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle); CSSM_RETURN ( *CertGetKeyInfo) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, CSSM_KEY_PTR *Key); CSSM_RETURN ( *CertGetAllFields) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, uint32 *NumberOfFields, CSSM_FIELD_PTR *CertFields); CSSM_RETURN ( *FreeFields) (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, CSSM_FIELD_PTR *FieldArray); CSSM_RETURN ( *FreeFieldValue) (CSSM_CL_HANDLE CLHandle, const SecAsn1Oid *CertOrCrlOid, CSSM_DATA_PTR Value); CSSM_RETURN ( *CertCache) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, CSSM_HANDLE_PTR CertHandle); CSSM_RETURN ( *CertGetFirstCachedFieldValue) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CertHandle, const SecAsn1Oid *CertField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CertGetNextCachedFieldValue) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CertAbortCache) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CertHandle); CSSM_RETURN ( *CertGroupToSignedBundle) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CERTGROUP *CertGroupToBundle, const CSSM_CERT_BUNDLE_HEADER *BundleInfo, CSSM_DATA_PTR SignedBundle); CSSM_RETURN ( *CertGroupFromVerifiedBundle) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CERT_BUNDLE *CertBundle, const SecAsn1Item *SignerCert, CSSM_CERTGROUP_PTR *CertGroup); CSSM_RETURN ( *CertDescribeFormat) (CSSM_CL_HANDLE CLHandle, uint32 *NumberOfFields, CSSM_OID_PTR *OidList); CSSM_RETURN ( *CrlCreateTemplate) (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CrlTemplate, CSSM_DATA_PTR NewCrl); CSSM_RETURN ( *CrlSetFields) (CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CrlTemplate, const SecAsn1Item *OldCrl, CSSM_DATA_PTR ModifiedCrl); CSSM_RETURN ( *CrlAddCert) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *Cert, uint32 NumberOfFields, const CSSM_FIELD *CrlEntryFields, const SecAsn1Item *OldCrl, CSSM_DATA_PTR NewCrl); CSSM_RETURN ( *CrlRemoveCert) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, const SecAsn1Item *OldCrl, CSSM_DATA_PTR NewCrl); CSSM_RETURN ( *CrlSign) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *UnsignedCrl, const CSSM_FIELD *SignScope, uint32 ScopeSize, CSSM_DATA_PTR SignedCrl); CSSM_RETURN ( *CrlVerify) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CrlToBeVerified, const SecAsn1Item *SignerCert, const CSSM_FIELD *VerifyScope, uint32 ScopeSize); CSSM_RETURN ( *CrlVerifyWithKey) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CrlToBeVerified); CSSM_RETURN ( *IsCertInCrl) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, const SecAsn1Item *Crl, CSSM_BOOL *CertFound); CSSM_RETURN ( *CrlGetFirstFieldValue) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Crl, const SecAsn1Oid *CrlField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CrlGetNextFieldValue) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CrlAbortQuery) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle); CSSM_RETURN ( *CrlGetAllFields) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Crl, uint32 *NumberOfCrlFields, CSSM_FIELD_PTR *CrlFields); CSSM_RETURN ( *CrlCache) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Crl, CSSM_HANDLE_PTR CrlHandle); CSSM_RETURN ( *IsCertInCachedCrl) (CSSM_CL_HANDLE CLHandle, const SecAsn1Item *Cert, CSSM_HANDLE CrlHandle, CSSM_BOOL *CertFound, CSSM_DATA_PTR CrlRecordIndex); CSSM_RETURN ( *CrlGetFirstCachedFieldValue) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CrlHandle, const SecAsn1Item *CrlRecordIndex, const SecAsn1Oid *CrlField, CSSM_HANDLE_PTR ResultsHandle, uint32 *NumberOfMatchedFields, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CrlGetNextCachedFieldValue) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE ResultsHandle, CSSM_DATA_PTR *Value); CSSM_RETURN ( *CrlGetAllCachedRecordFields) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CrlHandle, const SecAsn1Item *CrlRecordIndex, uint32 *NumberOfFields, CSSM_FIELD_PTR *CrlFields); CSSM_RETURN ( *CrlAbortCache) (CSSM_CL_HANDLE CLHandle, CSSM_HANDLE CrlHandle); CSSM_RETURN ( *CrlDescribeFormat) (CSSM_CL_HANDLE CLHandle, uint32 *NumberOfFields, CSSM_OID_PTR *OidList); CSSM_RETURN ( *PassThrough) (CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, uint32 PassThroughId, const void *InputParams, void **OutputParams); } CSSM_SPI_CL_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SPI_CL_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef CSSM_RETURN ( *CSSM_SPI_ModuleEventHandler) (const CSSM_GUID *ModuleGuid, void *CssmNotifyCallbackCtx, uint32 SubserviceId, CSSM_SERVICE_TYPE ServiceType, CSSM_MODULE_EVENT EventType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_CONTEXT_EVENT; enum { CSSM_CONTEXT_EVENT_CREATE = 1, CSSM_CONTEXT_EVENT_DELETE = 2, CSSM_CONTEXT_EVENT_UPDATE = 3 }; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_module_funcs { CSSM_SERVICE_TYPE ServiceType; uint32 NumberOfServiceFuncs; const CSSM_PROC_ADDR *ServiceFuncs; } CSSM_MODULE_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_MODULE_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef void *( *CSSM_UPCALLS_MALLOC) (CSSM_HANDLE AddInHandle, size_t size) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef void ( *CSSM_UPCALLS_FREE) (CSSM_HANDLE AddInHandle, void *memblock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef void *( *CSSM_UPCALLS_REALLOC) (CSSM_HANDLE AddInHandle, void *memblock, size_t size) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef void *( *CSSM_UPCALLS_CALLOC) (CSSM_HANDLE AddInHandle, size_t num, size_t size) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_upcalls { CSSM_UPCALLS_MALLOC malloc_func; CSSM_UPCALLS_FREE free_func; CSSM_UPCALLS_REALLOC realloc_func; CSSM_UPCALLS_CALLOC calloc_func; CSSM_RETURN ( *CcToHandle_func) (CSSM_CC_HANDLE Cc, CSSM_MODULE_HANDLE_PTR ModuleHandle); CSSM_RETURN ( *GetModuleInfo_func) (CSSM_MODULE_HANDLE Module, CSSM_GUID_PTR Guid, CSSM_VERSION_PTR Version, uint32 *SubServiceId, CSSM_SERVICE_TYPE *SubServiceType, CSSM_ATTACH_FLAGS *AttachFlags, CSSM_KEY_HIERARCHY *KeyHierarchy, CSSM_API_MEMORY_FUNCS_PTR AttachedMemFuncs, CSSM_FUNC_NAME_ADDR_PTR FunctionTable, uint32 NumFunctions); } CSSM_UPCALLS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_UPCALLS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_spi_csp_funcs { CSSM_RETURN ( *EventNotify) (CSSM_CSP_HANDLE CSPHandle, CSSM_CONTEXT_EVENT Event, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context); CSSM_RETURN ( *QuerySize) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, CSSM_BOOL Encrypt, uint32 QuerySizeCount, CSSM_QUERY_SIZE_DATA_PTR DataBlock); CSSM_RETURN ( *SignData) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_ALGORITHMS DigestAlgorithm, CSSM_DATA_PTR Signature); CSSM_RETURN ( *SignDataInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context); CSSM_RETURN ( *SignDataUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount); CSSM_RETURN ( *SignDataFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Signature); CSSM_RETURN ( *VerifyData) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_ALGORITHMS DigestAlgorithm, const SecAsn1Item *Signature); CSSM_RETURN ( *VerifyDataInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context); CSSM_RETURN ( *VerifyDataUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount); CSSM_RETURN ( *VerifyDataFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *Signature); CSSM_RETURN ( *DigestData) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_DATA_PTR Digest); CSSM_RETURN ( *DigestDataInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context); CSSM_RETURN ( *DigestDataUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount); CSSM_RETURN ( *DigestDataClone) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, CSSM_CC_HANDLE ClonedCCHandle); CSSM_RETURN ( *DigestDataFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Digest); CSSM_RETURN ( *GenerateMac) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *DataBufs, uint32 DataBufCount, CSSM_DATA_PTR Mac); CSSM_RETURN ( *GenerateMacInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context); CSSM_RETURN ( *GenerateMacUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount); CSSM_RETURN ( *GenerateMacFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR Mac); CSSM_RETURN ( *VerifyMac) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *DataBufs, uint32 DataBufCount, const SecAsn1Item *Mac); CSSM_RETURN ( *VerifyMacInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context); CSSM_RETURN ( *VerifyMacUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *DataBufs, uint32 DataBufCount); CSSM_RETURN ( *VerifyMacFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *Mac); CSSM_RETURN ( *EncryptData) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *ClearBufs, uint32 ClearBufCount, CSSM_DATA_PTR CipherBufs, uint32 CipherBufCount, CSSM_SIZE *bytesEncrypted, CSSM_DATA_PTR RemData, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *EncryptDataInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *EncryptDataUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *ClearBufs, uint32 ClearBufCount, CSSM_DATA_PTR CipherBufs, uint32 CipherBufCount, CSSM_SIZE *bytesEncrypted); CSSM_RETURN ( *EncryptDataFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR RemData); CSSM_RETURN ( *DecryptData) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const SecAsn1Item *CipherBufs, uint32 CipherBufCount, CSSM_DATA_PTR ClearBufs, uint32 ClearBufCount, CSSM_SIZE *bytesDecrypted, CSSM_DATA_PTR RemData, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *DecryptDataInit) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *DecryptDataUpdate) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CipherBufs, uint32 CipherBufCount, CSSM_DATA_PTR ClearBufs, uint32 ClearBufCount, CSSM_SIZE *bytesDecrypted); CSSM_RETURN ( *DecryptDataFinal) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, CSSM_DATA_PTR RemData); CSSM_RETURN ( *QueryKeySizeInBits) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const CSSM_KEY *Key, CSSM_KEY_SIZE_PTR KeySize); CSSM_RETURN ( *GenerateKey) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR Key, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *GenerateKeyPair) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, uint32 PublicKeyUsage, uint32 PublicKeyAttr, const SecAsn1Item *PublicKeyLabel, CSSM_KEY_PTR PublicKey, uint32 PrivateKeyUsage, uint32 PrivateKeyAttr, const SecAsn1Item *PrivateKeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR PrivateKey, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *GenerateRandom) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, CSSM_DATA_PTR RandomNumber); CSSM_RETURN ( *GenerateAlgorithmParams) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, uint32 ParamBits, CSSM_DATA_PTR Param, uint32 *NumberOfUpdatedAttibutes, CSSM_CONTEXT_ATTRIBUTE_PTR *UpdatedAttributes); CSSM_RETURN ( *WrapKey) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, const SecAsn1Item *DescriptiveData, CSSM_WRAP_KEY_PTR WrappedKey, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *UnwrapKey) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, const CSSM_KEY *PublicKey, const CSSM_WRAP_KEY *WrappedKey, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR UnwrappedKey, CSSM_DATA_PTR DescriptiveData, CSSM_PRIVILEGE Privilege); CSSM_RETURN ( *DeriveKey) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, CSSM_DATA_PTR Param, uint32 KeyUsage, uint32 KeyAttr, const SecAsn1Item *KeyLabel, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, CSSM_KEY_PTR DerivedKey); CSSM_RETURN ( *FreeKey) (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, CSSM_KEY_PTR KeyPtr, CSSM_BOOL Delete); CSSM_RETURN ( *PassThrough) (CSSM_CSP_HANDLE CSPHandle, CSSM_CC_HANDLE CCHandle, const CSSM_CONTEXT *Context, uint32 PassThroughId, const void *InData, void **OutData); CSSM_RETURN ( *Login) (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const SecAsn1Item *LoginName, const void *Reserved); CSSM_RETURN ( *Logout) (CSSM_CSP_HANDLE CSPHandle); CSSM_RETURN ( *ChangeLoginAcl) (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_EDIT *AclEdit); CSSM_RETURN ( *ObtainPrivateKeyFromPublicKey) (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *PublicKey, CSSM_KEY_PTR PrivateKey); CSSM_RETURN ( *RetrieveUniqueId) (CSSM_CSP_HANDLE CSPHandle, CSSM_DATA_PTR UniqueID); CSSM_RETURN ( *RetrieveCounter) (CSSM_CSP_HANDLE CSPHandle, CSSM_DATA_PTR Counter); CSSM_RETURN ( *VerifyDevice) (CSSM_CSP_HANDLE CSPHandle, const SecAsn1Item *DeviceCert); CSSM_RETURN ( *GetTimeValue) (CSSM_CSP_HANDLE CSPHandle, CSSM_ALGORITHMS TimeAlgorithm, SecAsn1Item *TimeData); CSSM_RETURN ( *GetOperationalStatistics) (CSSM_CSP_HANDLE CSPHandle, CSSM_CSP_OPERATIONAL_STATISTICS *Statistics); CSSM_RETURN ( *GetLoginAcl) (CSSM_CSP_HANDLE CSPHandle, const CSSM_STRING *SelectionTag, uint32 *NumberOfAclInfos, CSSM_ACL_ENTRY_INFO_PTR *AclInfos); CSSM_RETURN ( *GetKeyAcl) (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *Key, const CSSM_STRING *SelectionTag, uint32 *NumberOfAclInfos, CSSM_ACL_ENTRY_INFO_PTR *AclInfos); CSSM_RETURN ( *ChangeKeyAcl) (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_EDIT *AclEdit, const CSSM_KEY *Key); CSSM_RETURN ( *GetKeyOwner) (CSSM_CSP_HANDLE CSPHandle, const CSSM_KEY *Key, CSSM_ACL_OWNER_PROTOTYPE_PTR Owner); CSSM_RETURN ( *ChangeKeyOwner) (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_KEY *Key, const CSSM_ACL_OWNER_PROTOTYPE *NewOwner); CSSM_RETURN ( *GetLoginOwner) (CSSM_CSP_HANDLE CSPHandle, CSSM_ACL_OWNER_PROTOTYPE_PTR Owner); CSSM_RETURN ( *ChangeLoginOwner) (CSSM_CSP_HANDLE CSPHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_OWNER_PROTOTYPE *NewOwner); } CSSM_SPI_CSP_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SPI_CSP_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_spi_dl_funcs { CSSM_RETURN ( *DbOpen) (CSSM_DL_HANDLE DLHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_ACCESS_CREDENTIALS *AccessCred, const void *OpenParameters, CSSM_DB_HANDLE *DbHandle); CSSM_RETURN ( *DbClose) (CSSM_DL_DB_HANDLE DLDBHandle); CSSM_RETURN ( *DbCreate) (CSSM_DL_HANDLE DLHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, const CSSM_DBINFO *DBInfo, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, const void *OpenParameters, CSSM_DB_HANDLE *DbHandle); CSSM_RETURN ( *DbDelete) (CSSM_DL_HANDLE DLHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, const CSSM_ACCESS_CREDENTIALS *AccessCred); CSSM_RETURN ( *CreateRelation) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RelationID, const char *RelationName, uint32 NumberOfAttributes, const CSSM_DB_SCHEMA_ATTRIBUTE_INFO *pAttributeInfo, uint32 NumberOfIndexes, const CSSM_DB_SCHEMA_INDEX_INFO *pIndexInfo); CSSM_RETURN ( *DestroyRelation) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RelationID); CSSM_RETURN ( *Authenticate) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_ACCESS_CREDENTIALS *AccessCred); CSSM_RETURN ( *GetDbAcl) (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_STRING *SelectionTag, uint32 *NumberOfAclInfos, CSSM_ACL_ENTRY_INFO_PTR *AclInfos); CSSM_RETURN ( *ChangeDbAcl) (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_EDIT *AclEdit); CSSM_RETURN ( *GetDbOwner) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_ACL_OWNER_PROTOTYPE_PTR Owner); CSSM_RETURN ( *ChangeDbOwner) (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_ACCESS_CREDENTIALS *AccessCred, const CSSM_ACL_OWNER_PROTOTYPE *NewOwner); CSSM_RETURN ( *GetDbNames) (CSSM_DL_HANDLE DLHandle, CSSM_NAME_LIST_PTR *NameList); CSSM_RETURN ( *GetDbNameFromHandle) (CSSM_DL_DB_HANDLE DLDBHandle, char **DbName); CSSM_RETURN ( *FreeNameList) (CSSM_DL_HANDLE DLHandle, CSSM_NAME_LIST_PTR NameList); CSSM_RETURN ( *DataInsert) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RecordType, const CSSM_DB_RECORD_ATTRIBUTE_DATA *Attributes, const SecAsn1Item *Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId); CSSM_RETURN ( *DataDelete) (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_DB_UNIQUE_RECORD *UniqueRecordIdentifier); CSSM_RETURN ( *DataModify) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_RECORDTYPE RecordType, CSSM_DB_UNIQUE_RECORD_PTR UniqueRecordIdentifier, const CSSM_DB_RECORD_ATTRIBUTE_DATA *AttributesToBeModified, const SecAsn1Item *DataToBeModified, CSSM_DB_MODIFY_MODE ModifyMode); CSSM_RETURN ( *DataGetFirst) (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_QUERY *Query, CSSM_HANDLE_PTR ResultsHandle, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId); CSSM_RETURN ( *DataGetNext) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_HANDLE ResultsHandle, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId); CSSM_RETURN ( *DataAbortQuery) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_HANDLE ResultsHandle); CSSM_RETURN ( *DataGetFromUniqueRecordId) (CSSM_DL_DB_HANDLE DLDBHandle, const CSSM_DB_UNIQUE_RECORD *UniqueRecord, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data); CSSM_RETURN ( *FreeUniqueRecord) (CSSM_DL_DB_HANDLE DLDBHandle, CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord); CSSM_RETURN ( *PassThrough) (CSSM_DL_DB_HANDLE DLDBHandle, uint32 PassThroughId, const void *InputParams, void **OutputParams); } CSSM_SPI_DL_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SPI_DL_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef uint32 CSSM_KRSP_HANDLE; typedef struct cssm_kr_name { uint8 Type; uint8 Length; char *Name; } CSSM_KR_NAME __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_kr_profile { CSSM_KR_NAME UserName; CSSM_CERTGROUP_PTR UserCertificate; CSSM_CERTGROUP_PTR KRSCertChain; uint8 LE_KRANum; CSSM_CERTGROUP_PTR LE_KRACertChainList; uint8 ENT_KRANum; CSSM_CERTGROUP_PTR ENT_KRACertChainList; uint8 INDIV_KRANum; CSSM_CERTGROUP_PTR INDIV_KRACertChainList; CSSM_DATA_PTR INDIV_AuthenticationInfo; uint32 KRSPFlags; CSSM_DATA_PTR KRSPExtensions; } CSSM_KR_PROFILE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KR_PROFILE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_kr_wrappedproductinfo { CSSM_VERSION StandardVersion; CSSM_STRING StandardDescription; CSSM_VERSION ProductVersion; CSSM_STRING ProductDescription; CSSM_STRING ProductVendor; uint32 ProductFlags; } CSSM_KR_WRAPPEDPRODUCT_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KR_WRAPPEDPRODUCT_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_krsubservice { uint32 SubServiceId; char *Description; CSSM_KR_WRAPPEDPRODUCT_INFO WrappedProduct; } CSSM_KRSUBSERVICE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KRSUBSERVICE_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef uint32 CSSM_KR_POLICY_TYPE; typedef uint32 CSSM_KR_POLICY_FLAGS; typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_kr_policy_list_item { struct kr_policy_list_item *next; CSSM_ALGORITHMS AlgorithmId; CSSM_ENCRYPT_MODE Mode; uint32 MaxKeyLength; uint32 MaxRounds; uint8 WorkFactor; CSSM_KR_POLICY_FLAGS PolicyFlags; CSSM_CONTEXT_TYPE AlgClass; } CSSM_KR_POLICY_LIST_ITEM __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KR_POLICY_LIST_ITEM_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_kr_policy_info { CSSM_BOOL krbNotAllowed; uint32 numberOfEntries; CSSM_KR_POLICY_LIST_ITEM *policyEntry; } CSSM_KR_POLICY_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_KR_POLICY_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_spi_kr_funcs { CSSM_RETURN ( *RegistrationRequest) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_CC_HANDLE KRRegistrationContextHandle, const CSSM_CONTEXT *KRRegistrationContext, const SecAsn1Item *KRInData, const CSSM_ACCESS_CREDENTIALS *AccessCredentials, CSSM_KR_POLICY_FLAGS KRFlags, sint32 *EstimatedTime, CSSM_HANDLE_PTR ReferenceHandle); CSSM_RETURN ( *RegistrationRetrieve) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_HANDLE ReferenceHandle, sint32 *EstimatedTime, CSSM_KR_PROFILE_PTR KRProfile); CSSM_RETURN ( *GenerateRecoveryFields) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_CC_HANDLE KREnablementContextHandle, const CSSM_CONTEXT *KREnablementContext, CSSM_CC_HANDLE CryptoContextHandle, const CSSM_CONTEXT *CryptoContext, const SecAsn1Item *KRSPOptions, CSSM_KR_POLICY_FLAGS KRFlags, CSSM_DATA_PTR KRFields); CSSM_RETURN ( *ProcessRecoveryFields) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_CC_HANDLE KREnablementContextHandle, const CSSM_CONTEXT *KREnablementContext, CSSM_CC_HANDLE CryptoContextHandle, const CSSM_CONTEXT *CryptoContext, const SecAsn1Item *KRSPOptions, CSSM_KR_POLICY_FLAGS KRFlags, const SecAsn1Item *KRFields); CSSM_RETURN ( *RecoveryRequest) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_CC_HANDLE KRRequestContextHandle, const CSSM_CONTEXT *KRRequestContext, const SecAsn1Item *KRInData, const CSSM_ACCESS_CREDENTIALS *AccessCredentials, sint32 *EstimatedTime, CSSM_HANDLE_PTR ReferenceHandle); CSSM_RETURN ( *RecoveryRetrieve) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_HANDLE ReferenceHandle, sint32 *EstimatedTime, CSSM_HANDLE_PTR CacheHandle, uint32 *NumberOfRecoveredKeys); CSSM_RETURN ( *GetRecoveredObject) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_HANDLE CacheHandle, uint32 IndexInResults, CSSM_CSP_HANDLE CSPHandle, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry, uint32 Flags, CSSM_KEY_PTR RecoveredKey, CSSM_DATA_PTR OtherInfo); CSSM_RETURN ( *RecoveryRequestAbort) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_HANDLE ResultsHandle); CSSM_RETURN ( *PassThrough) (CSSM_KRSP_HANDLE KRSPHandle, CSSM_CC_HANDLE KeyRecoveryContextHandle, const CSSM_CONTEXT *KeyRecoveryContext, CSSM_CC_HANDLE CryptoContextHandle, const CSSM_CONTEXT *CryptoContext, uint32 PassThroughId, const void *InputParams, void **OutputParams); } CSSM_SPI_KR_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SPI_KR_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_spi_tp_funcs { CSSM_RETURN ( *SubmitCredRequest) (CSSM_TP_HANDLE TPHandle, const CSSM_TP_AUTHORITY_ID *PreferredAuthority, CSSM_TP_AUTHORITY_REQUEST_TYPE RequestType, const CSSM_TP_REQUEST_SET *RequestInput, const CSSM_TP_CALLERAUTH_CONTEXT *CallerAuthContext, sint32 *EstimatedTime, CSSM_DATA_PTR ReferenceIdentifier); CSSM_RETURN ( *RetrieveCredResult) (CSSM_TP_HANDLE TPHandle, const SecAsn1Item *ReferenceIdentifier, const CSSM_TP_CALLERAUTH_CONTEXT *CallerAuthCredentials, sint32 *EstimatedTime, CSSM_BOOL *ConfirmationRequired, CSSM_TP_RESULT_SET_PTR *RetrieveOutput); CSSM_RETURN ( *ConfirmCredResult) (CSSM_TP_HANDLE TPHandle, const SecAsn1Item *ReferenceIdentifier, const CSSM_TP_CALLERAUTH_CONTEXT *CallerAuthCredentials, const CSSM_TP_CONFIRM_RESPONSE *Responses, const CSSM_TP_AUTHORITY_ID *PreferredAuthority); CSSM_RETURN ( *ReceiveConfirmation) (CSSM_TP_HANDLE TPHandle, const SecAsn1Item *ReferenceIdentifier, CSSM_TP_CONFIRM_RESPONSE_PTR *Responses, sint32 *ElapsedTime); CSSM_RETURN ( *CertReclaimKey) (CSSM_TP_HANDLE TPHandle, const CSSM_CERTGROUP *CertGroup, uint32 CertIndex, CSSM_LONG_HANDLE KeyCacheHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_RESOURCE_CONTROL_CONTEXT *CredAndAclEntry); CSSM_RETURN ( *CertReclaimAbort) (CSSM_TP_HANDLE TPHandle, CSSM_LONG_HANDLE KeyCacheHandle); CSSM_RETURN ( *FormRequest) (CSSM_TP_HANDLE TPHandle, const CSSM_TP_AUTHORITY_ID *PreferredAuthority, CSSM_TP_FORM_TYPE FormType, CSSM_DATA_PTR BlankForm); CSSM_RETURN ( *FormSubmit) (CSSM_TP_HANDLE TPHandle, CSSM_TP_FORM_TYPE FormType, const SecAsn1Item *Form, const CSSM_TP_AUTHORITY_ID *ClearanceAuthority, const CSSM_TP_AUTHORITY_ID *RepresentedAuthority, CSSM_ACCESS_CREDENTIALS_PTR Credentials); CSSM_RETURN ( *CertGroupVerify) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_CERTGROUP *CertGroupToBeVerified, const CSSM_TP_VERIFY_CONTEXT *VerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR VerifyContextResult); CSSM_RETURN ( *CertCreateTemplate) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CertFields, CSSM_DATA_PTR CertTemplate); CSSM_RETURN ( *CertGetAllTemplateFields) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const SecAsn1Item *CertTemplate, uint32 *NumberOfFields, CSSM_FIELD_PTR *CertFields); CSSM_RETURN ( *CertSign) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const SecAsn1Item *CertTemplateToBeSigned, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *SignerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR SignerVerifyResult, CSSM_DATA_PTR SignedCert); CSSM_RETURN ( *CrlVerify) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_ENCODED_CRL *CrlToBeVerified, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *VerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult); CSSM_RETURN ( *CrlCreateTemplate) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, uint32 NumberOfFields, const CSSM_FIELD *CrlFields, CSSM_DATA_PTR NewCrlTemplate); CSSM_RETURN ( *CertRevoke) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const SecAsn1Item *OldCrlTemplate, const CSSM_CERTGROUP *CertGroupToBeRevoked, const CSSM_CERTGROUP *RevokerCertGroup, const CSSM_TP_VERIFY_CONTEXT *RevokerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult, CSSM_TP_CERTCHANGE_REASON Reason, CSSM_DATA_PTR NewCrlTemplate); CSSM_RETURN ( *CertRemoveFromCrlTemplate) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const SecAsn1Item *OldCrlTemplate, const CSSM_CERTGROUP *CertGroupToBeRemoved, const CSSM_CERTGROUP *RevokerCertGroup, const CSSM_TP_VERIFY_CONTEXT *RevokerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR RevokerVerifyResult, CSSM_DATA_PTR NewCrlTemplate); CSSM_RETURN ( *CrlSign) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_ENCODED_CRL *CrlToBeSigned, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *SignerVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR SignerVerifyResult, CSSM_DATA_PTR SignedCrl); CSSM_RETURN ( *ApplyCrlToDb) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_ENCODED_CRL *CrlToBeApplied, const CSSM_CERTGROUP *SignerCertGroup, const CSSM_TP_VERIFY_CONTEXT *ApplyCrlVerifyContext, CSSM_TP_VERIFY_CONTEXT_RESULT_PTR ApplyCrlVerifyResult); CSSM_RETURN ( *CertGroupConstruct) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CSP_HANDLE CSPHandle, const CSSM_DL_DB_LIST *DBList, const void *ConstructParams, const CSSM_CERTGROUP *CertGroupFrag, CSSM_CERTGROUP_PTR *CertGroup); CSSM_RETURN ( *CertGroupPrune) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const CSSM_DL_DB_LIST *DBList, const CSSM_CERTGROUP *OrderedCertGroup, CSSM_CERTGROUP_PTR *PrunedCertGroup); CSSM_RETURN ( *CertGroupToTupleGroup) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const CSSM_CERTGROUP *CertGroup, CSSM_TUPLEGROUP_PTR *TupleGroup); CSSM_RETURN ( *TupleGroupToCertGroup) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, const CSSM_TUPLEGROUP *TupleGroup, CSSM_CERTGROUP_PTR *CertTemplates); CSSM_RETURN ( *PassThrough) (CSSM_TP_HANDLE TPHandle, CSSM_CL_HANDLE CLHandle, CSSM_CC_HANDLE CCHandle, const CSSM_DL_DB_LIST *DBList, uint32 PassThroughId, const void *InputParams, void **OutputParams); } CSSM_SPI_TP_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_SPI_TP_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_state_funcs { CSSM_RETURN ( *cssm_GetAttachFunctions) (CSSM_MODULE_HANDLE hAddIn, CSSM_SERVICE_MASK AddinType, void **SPFunctions, CSSM_GUID_PTR Guid, CSSM_BOOL *Serialized); CSSM_RETURN ( *cssm_ReleaseAttachFunctions) (CSSM_MODULE_HANDLE hAddIn); CSSM_RETURN ( *cssm_GetAppMemoryFunctions) (CSSM_MODULE_HANDLE hAddIn, CSSM_UPCALLS_PTR UpcallTable); CSSM_RETURN ( *cssm_IsFuncCallValid) (CSSM_MODULE_HANDLE hAddin, CSSM_PROC_ADDR SrcAddress, CSSM_PROC_ADDR DestAddress, CSSM_PRIVILEGE InPriv, CSSM_PRIVILEGE *OutPriv, CSSM_BITMASK Hints, CSSM_BOOL *IsOK); CSSM_RETURN ( *cssm_DeregisterManagerServices) (const CSSM_GUID *GUID); CSSM_RETURN ( *cssm_DeliverModuleManagerEvent) (const CSSM_MANAGER_EVENT_NOTIFICATION *EventDescription); } CSSM_STATE_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_STATE_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) cssm_manager_registration_info { CSSM_RETURN ( *Initialize) (uint32 VerMajor, uint32 VerMinor); CSSM_RETURN ( *Terminate) (void); CSSM_RETURN ( *RegisterDispatchTable) (CSSM_STATE_FUNCS_PTR CssmStateCallTable); CSSM_RETURN ( *DeregisterDispatchTable) (void); CSSM_RETURN ( *EventNotifyManager) (const CSSM_MANAGER_EVENT_NOTIFICATION *EventDescription); CSSM_RETURN ( *RefreshFunctionTable) (CSSM_FUNC_NAME_ADDR_PTR FuncNameAddrPtr, uint32 NumOfFuncNameAddr); } CSSM_MANAGER_REGISTRATION_INFO __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *CSSM_MANAGER_REGISTRATION_INFO_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); enum { CSSM_HINT_NONE = 0, CSSM_HINT_ADDRESS_APP = 1 << 0, CSSM_HINT_ADDRESS_SP = 1 << 1 }; #pragma clang diagnostic pop } extern "C" { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" typedef CSSM_DL_HANDLE MDS_HANDLE; typedef CSSM_DL_DB_HANDLE MDS_DB_HANDLE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); typedef struct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) mds_funcs { CSSM_RETURN ( *DbOpen) (MDS_HANDLE MdsHandle, const char *DbName, const CSSM_NET_ADDRESS *DbLocation, CSSM_DB_ACCESS_TYPE AccessRequest, const CSSM_ACCESS_CREDENTIALS *AccessCred, const void *OpenParameters, CSSM_DB_HANDLE *hMds); CSSM_RETURN ( *DbClose) (MDS_DB_HANDLE MdsDbHandle); CSSM_RETURN ( *GetDbNames) (MDS_HANDLE MdsHandle, CSSM_NAME_LIST_PTR *NameList); CSSM_RETURN ( *GetDbNameFromHandle) (MDS_DB_HANDLE MdsDbHandle, char **DbName); CSSM_RETURN ( *FreeNameList) (MDS_HANDLE MdsHandle, CSSM_NAME_LIST_PTR NameList); CSSM_RETURN ( *DataInsert) (MDS_DB_HANDLE MdsDbHandle, CSSM_DB_RECORDTYPE RecordType, const CSSM_DB_RECORD_ATTRIBUTE_DATA *Attributes, const SecAsn1Item *Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId); CSSM_RETURN ( *DataDelete) (MDS_DB_HANDLE MdsDbHandle, const CSSM_DB_UNIQUE_RECORD *UniqueRecordIdentifier); CSSM_RETURN ( *DataModify) (MDS_DB_HANDLE MdsDbHandle, CSSM_DB_RECORDTYPE RecordType, CSSM_DB_UNIQUE_RECORD_PTR UniqueRecordIdentifier, const CSSM_DB_RECORD_ATTRIBUTE_DATA *AttributesToBeModified, const SecAsn1Item *DataToBeModified, CSSM_DB_MODIFY_MODE ModifyMode); CSSM_RETURN ( *DataGetFirst) (MDS_DB_HANDLE MdsDbHandle, const CSSM_QUERY *Query, CSSM_HANDLE_PTR ResultsHandle, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId); CSSM_RETURN ( *DataGetNext) (MDS_DB_HANDLE MdsDbHandle, CSSM_HANDLE ResultsHandle, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data, CSSM_DB_UNIQUE_RECORD_PTR *UniqueId); CSSM_RETURN ( *DataAbortQuery) (MDS_DB_HANDLE MdsDbHandle, CSSM_HANDLE ResultsHandle); CSSM_RETURN ( *DataGetFromUniqueRecordId) (MDS_DB_HANDLE MdsDbHandle, const CSSM_DB_UNIQUE_RECORD *UniqueRecord, CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR Attributes, CSSM_DATA_PTR Data); CSSM_RETURN ( *FreeUniqueRecord) (MDS_DB_HANDLE MdsDbHandle, CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord); CSSM_RETURN ( *CreateRelation) (MDS_DB_HANDLE MdsDbHandle, CSSM_DB_RECORDTYPE RelationID, const char *RelationName, uint32 NumberOfAttributes, const CSSM_DB_SCHEMA_ATTRIBUTE_INFO *pAttributeInfo, uint32 NumberOfIndexes, const CSSM_DB_SCHEMA_INDEX_INFO *pIndexInfo); CSSM_RETURN ( *DestroyRelation) (MDS_DB_HANDLE MdsDbHandle, CSSM_DB_RECORDTYPE RelationID); } MDS_FUNCS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), *MDS_FUNCS_PTR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN MDS_Initialize (const CSSM_GUID *pCallerGuid, const CSSM_MEMORY_FUNCS *pMemoryFunctions, MDS_FUNCS_PTR pDlFunctions, MDS_HANDLE *hMds) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN MDS_Terminate (MDS_HANDLE MdsHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN MDS_Install (MDS_HANDLE MdsHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); CSSM_RETURN MDS_Uninstall (MDS_HANDLE MdsHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang diagnostic pop } extern "C" { } extern "C" { extern const SecAsn1Oid CSSMOID_MD2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MD4 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MD5 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_RSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MD2WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MD4WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MD5WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA1WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA224WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA256WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA384WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA512WithRSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA1WithRSA_OIW __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_RSAWithOAEP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OAEP_MGF1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OAEP_ID_PSPECIFIED __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DES_CBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_PUB_NUMBER __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_STATIC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_ONE_FLOW __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_EPHEM __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_HYBRID1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_HYBRID2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_HYBRID_ONEFLOW __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_MQV1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_MQV2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_STATIC_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_ONE_FLOW_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_EPHEM_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_HYBRID1_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_DH_HYBRID2_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_MQV1_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ANSI_MQV2_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS3 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DH __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DSA_CMS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DSA_JDK __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA1WithDSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA1WithDSA_CMS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA1WithDSA_JDK __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA224 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA256 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA384 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SHA512 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ecPublicKey __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ECDSA_WithSHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ECDSA_WithSHA224 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ECDSA_WithSHA256 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ECDSA_WithSHA384 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ECDSA_WithSHA512 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ECDSA_WithSpecified __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_ISIGN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_X509_BASIC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_SSL __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_LOCAL_CERT_GEN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_CSR_GEN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_REVOCATION_CRL __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_REVOCATION_OCSP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_SMIME __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_EAP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_CODE_SIGN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_SW_UPDATE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_IP_SEC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_ICHAT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_RESOURCE_SIGN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PKINIT_CLIENT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PKINIT_SERVER __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_CODE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PACKAGE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_MACAPPSTORE_RECEIPT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_APPLEID_SHARING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_TIMESTAMPING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_REVOCATION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PASSBOOK_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_MOBILE_STORE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_ESCROW_SERVICE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PROFILE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_QA_PROFILE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_TEST_MOBILE_STORE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PCS_ESCROW_SERVICE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_TP_PROVISIONING_PROFILE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_FEE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_ASC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_FEE_MD5 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_FEE_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_FEED __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_FEEDEXP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_ECDSA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_IDENTITY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_EMAIL_SIGN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_EMAIL_ENCRYPT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_ARCHIVE_LIST __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_ARCHIVE_STORE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_ARCHIVE_FETCH __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_ARCHIVE_REMOVE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_SHARED_SERVICES __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_VALUE_USERNAME __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_VALUE_PASSWORD __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_VALUE_HOSTNAME __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_VALUE_RENEW __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_VALUE_ASYNC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_REQ_VALUE_IS_PENDING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_DIGEST_ALG __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_ENCRYPT_ALG __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_HMAC_SHA1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_pbeWithMD2AndDES __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_pbeWithMD2AndRC2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_pbeWithMD5AndDES __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_pbeWithMD5AndRC2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_pbeWithSHA1AndDES __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_pbeWithSHA1AndRC2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_PBKDF2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_PBES2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_PBMAC1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_RC2_CBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_DES_EDE3_CBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS5_RC5_CBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_pbeWithSHAAnd128BitRC4 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_pbeWithSHAAnd40BitRC4 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_pbeWithSHAAnd3Key3DESCBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_pbeWithSHAAnd2Key3DESCBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_pbeWithSHAAnd128BitRC2CBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_pbewithSHAAnd40BitRC2CBC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); } extern "C" { } extern const SecAsn1Oid CSSMOID_ObjectClass __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AliasedEntryName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KnowledgeInformation __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CommonName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Surname __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SerialNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CountryName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_LocalityName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_StateProvinceName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveStateProvinceName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_StreetAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveStreetAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OrganizationName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveOrganizationName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OrganizationalUnitName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveOrganizationalUnitName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Title __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Description __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SearchGuide __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_BusinessCategory __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PostalAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectivePostalAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PostalCode __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectivePostalCode __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PostOfficeBox __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectivePostOfficeBox __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PhysicalDeliveryOfficeName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectivePhysicalDeliveryOfficeName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_TelephoneNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveTelephoneNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_TelexNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveTelexNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_TelexTerminalIdentifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveTelexTerminalIdentifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_FacsimileTelephoneNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveFacsimileTelephoneNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X_121Address __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_InternationalISDNNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CollectiveInternationalISDNNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_RegisteredAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DestinationIndicator __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PreferredDeliveryMethod __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PresentationAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SupportedApplicationContext __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Member __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Owner __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_RoleOccupant __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SeeAlso __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UserPassword __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UserCertificate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CACertificate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AuthorityRevocationList __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CertificateRevocationList __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CrossCertificatePair __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Name __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_GivenName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Initials __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_GenerationQualifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UniqueIdentifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DNQualifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_EnhancedSearchGuide __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ProtocolInformation __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DistinguishedName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UniqueMember __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_HouseIdentifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_EmailAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UnstructuredName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ContentType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MessageDigest __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SigningTime __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CounterSignature __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ChallengePassword __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UnstructuredAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ExtendedCertificateAttributes __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_PKCS9_Id_Ct_TSTInfo __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_TimeStampToken __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_QT_CPS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_QT_UNOTICE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AD_OCSP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AD_CA_ISSUERS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AD_TIME_STAMPING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AD_CA_REPOSITORY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PDA_DATE_OF_BIRTH __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PDA_PLACE_OF_BIRTH __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PDA_GENDER __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PDA_COUNTRY_CITIZEN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PDA_COUNTRY_RESIDENCE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OID_QCS_SYNTAX_V1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OID_QCS_SYNTAX_V2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_ETSI_QCS_QC_COMPLIANCE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ETSI_QCS_QC_LIMIT_VALUE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ETSI_QCS_QC_RETENTION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ETSI_QCS_QC_SSCD __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_PKCS7_Data __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_SignedData __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_EnvelopedData __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_SignedAndEnvelopedData __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_DigestedData __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_EncryptedData __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_DataWithAttributes __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS7_EncryptedPrivateKeyInfo __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_FriendlyName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_LocalKeyId __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_CertTypes __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_CrlTypes __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_X509Certificate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_SdsiCertificate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS9_X509Crl __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_keyBag __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_shroudedKeyBag __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_certBag __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_crlBag __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_secretBag __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKCS12_safeContentsBag __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UserID __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DomainComponent __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KERBv5_PKINIT_AUTH_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KERBv5_PKINIT_DH_KEY_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KERBv5_PKINIT_RKEY_DATA __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_X9_62 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X9_62_FieldType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X9_62_PubKeyType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X9_62_EllCurve __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X9_62_C_TwoCurve __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X9_62_PrimeCurve __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X9_62_SigType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp192r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp256r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_Certicom __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CerticomEllCurve __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp112r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp112r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp128r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp128r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp160k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp160r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp160r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp192k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp224k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp224r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp256k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp384r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_secp521r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect113r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect113r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect131r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect131r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect163k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect163r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect163r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect193r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect193r2 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect233k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect233r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect239k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect283k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect283r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect409k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect409r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect571k1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_sect571r1 __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern "C" { extern const SecAsn1Oid CSSMOID_X509V3SignedCertificate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3SignedCertificateCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3Certificate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1Version __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SerialNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1IssuerName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1IssuerNameStd __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1IssuerNameCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1IssuerNameLDAP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1ValidityNotBefore __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1ValidityNotAfter __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectNameStd __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectNameCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectNameLDAP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CSSMKeyStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectPublicKeyCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectPublicKeyAlgorithm __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectPublicKeyAlgorithmParameters __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SubjectPublicKey __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CertificateIssuerUniqueId __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CertificateSubjectUniqueId __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionsStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionsCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateNumberOfExtensions __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionId __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionCritical __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V3CertificateExtensionValue __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SignatureStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SignatureCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SignatureAlgorithm __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SignatureAlgorithmTBS __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1SignatureAlgorithmParameters __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1Signature __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SubjectSignatureBitmap __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SubjectPicture __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SubjectEmailAddress __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_UseExemptions __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_SubjectDirectoryAttributes __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SubjectKeyIdentifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KeyUsage __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PrivateKeyUsagePeriod __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SubjectAltName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_IssuerAltName __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_BasicConstraints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CrlNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CrlReason __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_HoldInstructionCode __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_InvalidityDate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DeltaCrlIndicator __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_IssuingDistributionPoint __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_IssuingDistributionPoints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CertIssuer __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_NameConstraints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CrlDistributionPoints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_CertificatePolicies __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PolicyMappings __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PolicyConstraints __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AuthorityKeyIdentifier __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ExtendedKeyUsage __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_InhibitAnyPolicy __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_AuthorityInfoAccess __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_BiometricInfo __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_QC_Statements __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_SubjectInfoAccess __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ExtendedKeyUsageAny __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ServerAuth __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ClientAuth __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ExtendedUseCodeSigning __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_EmailProtection __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_TimeStamping __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_OCSPSigning __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KERBv5_PKINIT_KP_CLIENT_AUTH __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_KERBv5_PKINIT_KP_KDC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_EKU_IPSec __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_EXTENSION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_IDENTITY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_EMAIL_SIGN __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_EMAIL_ENCRYPT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_DOTMAC_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_ADC_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MACAPPSTORE_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MACAPPSTORE_RECEIPT_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLEID_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLEID_SHARING_CERT_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_MOBILE_STORE_SIGNING_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_TEST_MOBILE_STORE_SIGNING_POLICY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_CODE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_CODE_SIGNING_DEV __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_RESOURCE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_ICHAT_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_ICHAT_ENCRYPTION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_SYSTEM_IDENTITY __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_PASSBOOK_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_PROFILE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EKU_QA_PROFILE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_CODE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_APPLE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_ADC_DEV_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_ADC_APPLE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_PASSBOOK_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_MACAPPSTORE_RECEIPT __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_INTERMEDIATE_MARKER __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_WWDR_INTERMEDIATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_ITMS_INTERMEDIATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_AAI_INTERMEDIATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_APPLEID_INTERMEDIATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_APPLEID_SHARING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_SYSINT2_INTERMEDIATE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_DEVELOPER_AUTHENTICATION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_SERVER_AUTHENTICATION __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_ESCROW_SERVICE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_APPLE_EXTENSION_PROVISIONING_PROFILE_SIGNING __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))) ; extern const SecAsn1Oid CSSMOID_NetscapeCertType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_NetscapeCertSequence __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_NetscapeSGC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern const SecAsn1Oid CSSMOID_MicrosoftSGC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); } extern "C" { extern const SecAsn1Oid CSSMOID_X509V2CRLSignedCrlStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLSignedCrlCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLTbsCertListStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLTbsCertListCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLVersion __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLIssuerStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLIssuerNameCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLIssuerNameLDAP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLThisUpdate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLNextUpdate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLRevokedCertificatesStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLRevokedCertificatesCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLNumberOfRevokedCertEntries __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLRevokedEntryStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLRevokedEntryCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLRevokedEntrySerialNumber __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V1CRLRevokedEntryRevocationDate __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryAllExtensionsStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryAllExtensionsCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryNumberOfExtensions __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntrySingleExtensionStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntrySingleExtensionCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryExtensionId __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryExtensionCritical __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryExtensionType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLRevokedEntryExtensionValue __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLAllExtensionsStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLAllExtensionsCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLNumberOfExtensions __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLSingleExtensionStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLSingleExtensionCStruct __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLExtensionId __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLExtensionCritical __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_X509V2CRLExtensionType __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_BASIC __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_NONCE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_CRL __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_RESPONSE __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_NOCHECK __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_ARCHIVE_CUTOFF __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))), CSSMOID_PKIX_OCSP_SERVICE_LOCATOR __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); } extern "C" { #pragma clang assume_nonnull begin typedef uint16 SecKeychainPromptSelector; enum { kSecKeychainPromptRequirePassphase = 0x0001, kSecKeychainPromptUnsigned = 0x0010, kSecKeychainPromptUnsignedAct = 0x0020, kSecKeychainPromptInvalid = 0x0040, kSecKeychainPromptInvalidAct = 0x0080, }; CFTypeID SecACLGetTypeID(void) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecACLCreateFromSimpleContents(SecAccessRef access, CFArrayRef _Nullable applicationList, CFStringRef description, const CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR *promptSelector, SecACLRef * _Nonnull __attribute__((cf_returns_retained)) newAcl) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecACLCreateWithSimpleContents(SecAccessRef access, CFArrayRef _Nullable applicationList, CFStringRef description, SecKeychainPromptSelector promptSelector, SecACLRef * _Nonnull __attribute__((cf_returns_retained)) newAcl) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecACLRemove(SecACLRef aclRef) __attribute__((availability(macosx,introduced=10.3))); OSStatus SecACLCopySimpleContents(SecACLRef acl, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) applicationList, CFStringRef * _Nonnull __attribute__((cf_returns_retained)) description, CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR *promptSelector) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecACLCopyContents(SecACLRef acl, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) applicationList, CFStringRef * _Nonnull __attribute__((cf_returns_retained)) description, SecKeychainPromptSelector *promptSelector) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecACLSetSimpleContents(SecACLRef acl, CFArrayRef _Nullable applicationList, CFStringRef description, const CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR *promptSelector) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecACLSetContents(SecACLRef acl, CFArrayRef _Nullable applicationList, CFStringRef description, SecKeychainPromptSelector promptSelector) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecACLGetAuthorizations(SecACLRef acl, CSSM_ACL_AUTHORIZATION_TAG *tags, uint32 *tagCount) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); CFArrayRef SecACLCopyAuthorizations(SecACLRef acl) __attribute__((availability(macosx,introduced=10.7))); OSStatus SecACLSetAuthorizations(SecACLRef acl, CSSM_ACL_AUTHORIZATION_TAG *tags, uint32 tagCount) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecACLUpdateAuthorizations(SecACLRef acl, CFArrayRef authorizations) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecOIDADC_CERT_POLICY __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_CERT_POLICY __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EKU_CODE_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EKU_CODE_SIGNING_DEV __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EKU_ICHAT_ENCRYPTION __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EKU_ICHAT_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EKU_RESOURCE_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EKU_SYSTEM_IDENTITY __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_ADC_APPLE_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_ADC_DEV_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_APPLE_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_CODE_SIGNING __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_INTERMEDIATE_MARKER __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_WWDR_INTERMEDIATE __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_ITMS_INTERMEDIATE __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_AAI_INTERMEDIATE __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAPPLE_EXTENSION_APPLEID_INTERMEDIATE __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAuthorityInfoAccess __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDAuthorityKeyIdentifier __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDBasicConstraints __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDBiometricInfo __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCSSMKeyStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCertIssuer __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCertificatePolicies __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDClientAuth __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCollectiveStateProvinceName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCollectiveStreetAddress __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCommonName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCountryName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCrlDistributionPoints __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCrlNumber __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDCrlReason __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDOTMAC_CERT_EMAIL_ENCRYPT __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDOTMAC_CERT_EMAIL_SIGN __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDOTMAC_CERT_EXTENSION __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDOTMAC_CERT_IDENTITY __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDOTMAC_CERT_POLICY __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDeltaCrlIndicator __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDDescription __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDEKU_IPSec __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDEmailAddress __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDEmailProtection __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDExtendedKeyUsage __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDExtendedKeyUsageAny __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDExtendedUseCodeSigning __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDGivenName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDHoldInstructionCode __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDInvalidityDate __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDIssuerAltName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDIssuingDistributionPoint __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDIssuingDistributionPoints __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDKERBv5_PKINIT_KP_CLIENT_AUTH __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDKERBv5_PKINIT_KP_KDC __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDKeyUsage __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDLocalityName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDMS_NTPrincipalName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDMicrosoftSGC __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDNameConstraints __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDNetscapeCertSequence __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDNetscapeCertType __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDNetscapeSGC __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDOCSPSigning __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDOrganizationName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDOrganizationalUnitName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDPolicyConstraints __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDPolicyMappings __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDPrivateKeyUsagePeriod __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDQC_Statements __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSerialNumber __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDServerAuth __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDStateProvinceName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDStreetAddress __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectAltName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectDirectoryAttributes __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectEmailAddress __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectInfoAccess __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectKeyIdentifier __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectPicture __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSubjectSignatureBitmap __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSurname __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDTimeStamping __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDTitle __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDUseExemptions __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1CertificateIssuerUniqueId __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1CertificateSubjectUniqueId __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1IssuerName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1IssuerNameCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1IssuerNameLDAP __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1IssuerNameStd __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SerialNumber __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1Signature __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SignatureAlgorithm __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SignatureAlgorithmParameters __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SignatureAlgorithmTBS __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SignatureCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SignatureStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectName __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectNameCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectNameLDAP __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectNameStd __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectPublicKey __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectPublicKeyAlgorithm __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectPublicKeyAlgorithmParameters __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1SubjectPublicKeyCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1ValidityNotAfter __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1ValidityNotBefore __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V1Version __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3Certificate __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionCritical __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionId __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionType __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionValue __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionsCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateExtensionsStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3CertificateNumberOfExtensions __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3SignedCertificate __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDX509V3SignedCertificateCStruct __attribute__((availability(macosx,introduced=10.7))); extern const CFStringRef kSecOIDSRVName __attribute__((availability(macosx,introduced=10.8))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) OpaqueSecIdentitySearchRef *SecIdentitySearchRef; CFTypeID SecIdentitySearchGetTypeID(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecIdentitySearchCreate(CFTypeRef _Nullable keychainOrArray, CSSM_KEYUSE keyUsage, SecIdentitySearchRef * _Nullable __attribute__((cf_returns_retained)) searchRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecIdentitySearchCopyNext(SecIdentitySearchRef searchRef, SecIdentityRef * _Nullable __attribute__((cf_returns_retained)) identity) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef FourCharCode SecItemClass; enum { kSecInternetPasswordItemClass = 'inet', kSecGenericPasswordItemClass = 'genp', kSecAppleSharePasswordItemClass __attribute__((availability(macosx,introduced=10_0,deprecated=10_9,message="" ))) = 'ashp', kSecCertificateItemClass = 0x80001000, kSecPublicKeyItemClass = 0x0000000F, kSecPrivateKeyItemClass = 0x00000010, kSecSymmetricKeyItemClass = 0x00000011 }; typedef FourCharCode SecItemAttr; enum { kSecCreationDateItemAttr = 'cdat', kSecModDateItemAttr = 'mdat', kSecDescriptionItemAttr = 'desc', kSecCommentItemAttr = 'icmt', kSecCreatorItemAttr = 'crtr', kSecTypeItemAttr = 'type', kSecScriptCodeItemAttr = 'scrp', kSecLabelItemAttr = 'labl', kSecInvisibleItemAttr = 'invi', kSecNegativeItemAttr = 'nega', kSecCustomIconItemAttr = 'cusi', kSecAccountItemAttr = 'acct', kSecServiceItemAttr = 'svce', kSecGenericItemAttr = 'gena', kSecSecurityDomainItemAttr = 'sdmn', kSecServerItemAttr = 'srvr', kSecAuthenticationTypeItemAttr = 'atyp', kSecPortItemAttr = 'port', kSecPathItemAttr = 'path', kSecVolumeItemAttr = 'vlme', kSecAddressItemAttr = 'addr', kSecSignatureItemAttr = 'ssig', kSecProtocolItemAttr = 'ptcl', kSecCertificateType = 'ctyp', kSecCertificateEncoding = 'cenc', kSecCrlType = 'crtp', kSecCrlEncoding = 'crnc', kSecAlias = 'alis' }; typedef UInt8 SecAFPServerSignature[16]; typedef UInt8 SecPublicKeyHash[20]; CFTypeID SecKeychainItemGetTypeID(void); OSStatus SecKeychainItemModifyAttributesAndData(SecKeychainItemRef itemRef, const SecKeychainAttributeList * _Nullable attrList, UInt32 length, const void * _Nullable data) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCreateFromContent(SecItemClass itemClass, SecKeychainAttributeList *attrList, UInt32 length, const void * _Nullable data, SecKeychainRef _Nullable keychainRef, SecAccessRef _Nullable initialAccess, SecKeychainItemRef * _Nullable __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemModifyContent(SecKeychainItemRef itemRef, const SecKeychainAttributeList * _Nullable attrList, UInt32 length, const void * _Nullable data) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCopyContent(SecKeychainItemRef itemRef, SecItemClass * _Nullable itemClass, SecKeychainAttributeList * _Nullable attrList, UInt32 * _Nullable length, void * _Nullable * _Nullable outData) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemFreeContent(SecKeychainAttributeList * _Nullable attrList, void * _Nullable data) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCopyAttributesAndData(SecKeychainItemRef itemRef, SecKeychainAttributeInfo * _Nullable info, SecItemClass * _Nullable itemClass, SecKeychainAttributeList * _Nullable * _Nullable attrList, UInt32 * _Nullable length, void * _Nullable * _Nullable outData) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemFreeAttributesAndData(SecKeychainAttributeList * _Nullable attrList, void * _Nullable data) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemDelete(SecKeychainItemRef itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCopyKeychain(SecKeychainItemRef itemRef, SecKeychainRef * _Nonnull __attribute__((cf_returns_retained)) keychainRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCreateCopy(SecKeychainItemRef itemRef, SecKeychainRef _Nullable destKeychainRef, SecAccessRef _Nullable initialAccess, SecKeychainItemRef * _Nonnull __attribute__((cf_returns_retained)) itemCopy) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCreatePersistentReference(SecKeychainItemRef itemRef, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) persistentItemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCopyFromPersistentReference(CFDataRef persistentItemRef, SecKeychainItemRef * _Nonnull __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemGetDLDBHandle(SecKeychainItemRef keyItemRef, CSSM_DL_DB_HANDLE * _Nonnull dldbHandle) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemGetUniqueRecordID(SecKeychainItemRef itemRef, const CSSM_DB_UNIQUE_RECORD * _Nullable * _Nonnull uniqueRecordID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="CSSM is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemCopyAccess(SecKeychainItemRef itemRef, SecAccessRef * _Nonnull __attribute__((cf_returns_retained)) access) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainItemSetAccess(SecKeychainItemRef itemRef, SecAccessRef access) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecKeychainSearchGetTypeID(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="SecKeychainSearch is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainSearchCreateFromAttributes(CFTypeRef _Nullable keychainOrArray, SecItemClass itemClass, const SecKeychainAttributeList * _Nullable attrList, SecKeychainSearchRef * _Nonnull __attribute__((cf_returns_retained)) searchRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="SecKeychainSearch is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecKeychainSearchCopyNext(SecKeychainSearchRef searchRef, SecKeychainItemRef * _Nonnull __attribute__((cf_returns_retained)) itemRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="SecKeychainSearch is not supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) OpaquePolicySearchRef *SecPolicySearchRef; CFTypeID SecPolicySearchGetTypeID(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecPolicySearchCreate(CSSM_CERT_TYPE certType, const SecAsn1Oid *policyOID, const SecAsn1Item * _Nullable value, SecPolicySearchRef * _Nonnull __attribute__((cf_returns_retained)) searchRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); OSStatus SecPolicySearchCopyNext(SecPolicySearchRef searchRef, SecPolicyRef * _Nonnull __attribute__((cf_returns_retained)) policyRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecTrustedApplicationGetTypeID(void); OSStatus SecTrustedApplicationCreateFromPath(const char * _Nullable path, SecTrustedApplicationRef * _Nonnull __attribute__((cf_returns_retained)) app) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecTrustedApplicationCopyData(SecTrustedApplicationRef appRef, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) data) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus SecTrustedApplicationSetData(SecTrustedApplicationRef appRef, CFDataRef data) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef uint32_t SecTrustSettingsKeyUsage; enum { kSecTrustSettingsKeyUseSignature = 0x00000001, kSecTrustSettingsKeyUseEnDecryptData = 0x00000002, kSecTrustSettingsKeyUseEnDecryptKey = 0x00000004, kSecTrustSettingsKeyUseSignCert = 0x00000008, kSecTrustSettingsKeyUseSignRevocation = 0x00000010, kSecTrustSettingsKeyUseKeyExchange = 0x00000020, kSecTrustSettingsKeyUseAny = 0xffffffff }; typedef uint32_t SecTrustSettingsResult; enum { kSecTrustSettingsResultInvalid = 0, kSecTrustSettingsResultTrustRoot, kSecTrustSettingsResultTrustAsRoot, kSecTrustSettingsResultDeny, kSecTrustSettingsResultUnspecified }; typedef uint32_t SecTrustSettingsDomain; enum { kSecTrustSettingsDomainUser = 0, kSecTrustSettingsDomainAdmin, kSecTrustSettingsDomainSystem }; OSStatus SecTrustSettingsCopyTrustSettings( SecCertificateRef certRef, SecTrustSettingsDomain domain, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) trustSettings); OSStatus SecTrustSettingsSetTrustSettings( SecCertificateRef certRef, SecTrustSettingsDomain domain, CFTypeRef _Nullable trustSettingsDictOrArray); OSStatus SecTrustSettingsRemoveTrustSettings( SecCertificateRef certRef, SecTrustSettingsDomain domain); OSStatus SecTrustSettingsCopyCertificates( SecTrustSettingsDomain domain, CFArrayRef * _Nullable __attribute__((cf_returns_retained)) certArray); OSStatus SecTrustSettingsCopyModificationDate( SecCertificateRef certRef, SecTrustSettingsDomain domain, CFDateRef * _Nonnull __attribute__((cf_returns_retained)) modificationDate); OSStatus SecTrustSettingsCreateExternalRepresentation( SecTrustSettingsDomain domain, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) trustSettings); OSStatus SecTrustSettingsImportExternalRepresentation( SecTrustSettingsDomain domain, CFDataRef trustSettings); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin enum { errSecCSUnimplemented = -67072, errSecCSInvalidObjectRef = -67071, errSecCSInvalidFlags = -67070, errSecCSObjectRequired = -67069, errSecCSStaticCodeNotFound = -67068, errSecCSUnsupportedGuestAttributes = -67067, errSecCSInvalidAttributeValues = -67066, errSecCSNoSuchCode = -67065, errSecCSMultipleGuests = -67064, errSecCSGuestInvalid = -67063, errSecCSUnsigned = -67062, errSecCSSignatureFailed = -67061, errSecCSSignatureNotVerifiable = -67060, errSecCSSignatureUnsupported = -67059, errSecCSBadDictionaryFormat = -67058, errSecCSResourcesNotSealed = -67057, errSecCSResourcesNotFound = -67056, errSecCSResourcesInvalid = -67055, errSecCSBadResource = -67054, errSecCSResourceRulesInvalid = -67053, errSecCSReqInvalid = -67052, errSecCSReqUnsupported = -67051, errSecCSReqFailed = -67050, errSecCSBadObjectFormat = -67049, errSecCSInternalError = -67048, errSecCSHostReject = -67047, errSecCSNotAHost = -67046, errSecCSSignatureInvalid = -67045, errSecCSHostProtocolRelativePath = -67044, errSecCSHostProtocolContradiction = -67043, errSecCSHostProtocolDedicationError = -67042, errSecCSHostProtocolNotProxy = -67041, errSecCSHostProtocolStateError = -67040, errSecCSHostProtocolUnrelated = -67039, errSecCSNotSupported = -67037, errSecCSCMSTooLarge = -67036, errSecCSHostProtocolInvalidHash = -67035, errSecCSStaticCodeChanged = -67034, errSecCSDBDenied = -67033, errSecCSDBAccess = -67032, errSecCSSigDBDenied = -67033, errSecCSSigDBAccess = -67032, errSecCSHostProtocolInvalidAttribute = -67031, errSecCSInfoPlistFailed = -67030, errSecCSNoMainExecutable = -67029, errSecCSBadBundleFormat = -67028, errSecCSNoMatches = -67027, errSecCSFileHardQuarantined = -67026, errSecCSOutdated = -67025, errSecCSDbCorrupt = -67024, errSecCSResourceDirectoryFailed = -67023, errSecCSUnsignedNestedCode = -67022, errSecCSBadNestedCode = -67021, errSecCSBadCallbackValue = -67020, errSecCSHelperFailed = -67019, errSecCSVetoed = -67018, errSecCSBadLVArch = -67017, errSecCSResourceNotSupported = -67016, errSecCSRegularFile = -67015, errSecCSUnsealedAppRoot = -67014, errSecCSWeakResourceRules = -67013, errSecCSDSStoreSymlink = -67012, errSecCSAmbiguousBundleFormat = -67011, errSecCSBadMainExecutable = -67010, errSecCSBadFrameworkVersion = -67009, errSecCSUnsealedFrameworkRoot = -67008, errSecCSWeakResourceEnvelope = -67007, errSecCSCancelled = -67006, errSecCSInvalidPlatform = -67005, errSecCSTooBig = -67004, errSecCSInvalidSymlink = -67003, errSecCSNotAppLike = -67002, errSecCSBadDiskImageFormat = -67001, errSecCSUnsupportedDigestAlgorithm = -67000, errSecCSInvalidAssociatedFileData = -66999, errSecCSInvalidTeamIdentifier = -66998, errSecCSBadTeamIdentifier = -66997, errSecCSSignatureUntrusted = -66996, errSecMultipleExecSegments = -66995, errSecCSInvalidEntitlements = -66994, errSecCSInvalidRuntimeVersion = -66993, errSecCSRevokedNotarization = -66992, }; extern const CFStringRef kSecCFErrorArchitecture; extern const CFStringRef kSecCFErrorPattern; extern const CFStringRef kSecCFErrorResourceSeal; extern const CFStringRef kSecCFErrorResourceAdded; extern const CFStringRef kSecCFErrorResourceAltered; extern const CFStringRef kSecCFErrorResourceMissing; extern const CFStringRef kSecCFErrorResourceSideband; extern const CFStringRef kSecCFErrorInfoPlist; extern const CFStringRef kSecCFErrorGuestAttributes; extern const CFStringRef kSecCFErrorRequirementSyntax; extern const CFStringRef kSecCFErrorPath; typedef struct __attribute__((objc_bridge(id))) __SecCode *SecCodeRef; typedef struct __attribute__((objc_bridge(id))) __SecCode const *SecStaticCodeRef; typedef struct __attribute__((objc_bridge(id))) __SecRequirement *SecRequirementRef; typedef u_int32_t SecGuestRef; enum { kSecNoGuest = 0, }; typedef uint32_t SecCSFlags; enum { kSecCSDefaultFlags = 0, kSecCSConsiderExpiration = 1U << 31, kSecCSEnforceRevocationChecks = 1 << 30, kSecCSNoNetworkAccess = 1 << 29, kSecCSReportProgress = 1 << 28, kSecCSCheckTrustedAnchors = 1 << 27, kSecCSQuickCheck = 1 << 26, kSecCSApplyEmbeddedPolicy = 1 << 25, }; typedef uint32_t SecCodeSignatureFlags; enum { kSecCodeSignatureHost = 0x0001, kSecCodeSignatureAdhoc = 0x0002, kSecCodeSignatureForceHard = 0x0100, kSecCodeSignatureForceKill = 0x0200, kSecCodeSignatureForceExpiration = 0x0400, kSecCodeSignatureRestrict = 0x0800, kSecCodeSignatureEnforcement = 0x1000, kSecCodeSignatureLibraryValidation = 0x2000, kSecCodeSignatureRuntime = 0x10000, kSecCodeSignatureLinkerSigned = 0x20000, }; typedef uint32_t SecCodeStatus; enum { kSecCodeStatusValid = 0x00000001, kSecCodeStatusHard = 0x00000100, kSecCodeStatusKill = 0x00000200, kSecCodeStatusDebugged = 0x10000000, kSecCodeStatusPlatform = 0x04000000, }; typedef uint32_t SecRequirementType; enum { kSecHostRequirementType = 1, kSecGuestRequirementType = 2, kSecDesignatedRequirementType = 3, kSecLibraryRequirementType = 4, kSecPluginRequirementType = 5, kSecInvalidRequirementType, kSecRequirementTypeCount = kSecInvalidRequirementType }; typedef uint32_t SecCSDigestAlgorithm; enum { kSecCodeSignatureNoHash = 0, kSecCodeSignatureHashSHA1 = 1, kSecCodeSignatureHashSHA256 = 2, kSecCodeSignatureHashSHA256Truncated = 3, kSecCodeSignatureHashSHA384 = 4, kSecCodeSignatureHashSHA512 = 5, }; #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecStaticCodeGetTypeID(void); OSStatus SecStaticCodeCreateWithPath(CFURLRef path, SecCSFlags flags, SecStaticCodeRef * _Nonnull __attribute__((cf_returns_retained)) staticCode); extern const CFStringRef kSecCodeAttributeArchitecture; extern const CFStringRef kSecCodeAttributeSubarchitecture; extern const CFStringRef kSecCodeAttributeUniversalFileOffset; extern const CFStringRef kSecCodeAttributeBundleVersion; OSStatus SecStaticCodeCreateWithPathAndAttributes(CFURLRef path, SecCSFlags flags, CFDictionaryRef attributes, SecStaticCodeRef * _Nonnull __attribute__((cf_returns_retained)) staticCode); enum { kSecCSCheckAllArchitectures = 1 << 0, kSecCSDoNotValidateExecutable = 1 << 1, kSecCSDoNotValidateResources = 1 << 2, kSecCSBasicValidateOnly = kSecCSDoNotValidateExecutable | kSecCSDoNotValidateResources, kSecCSCheckNestedCode = 1 << 3, kSecCSStrictValidate = 1 << 4, kSecCSFullReport = 1 << 5, kSecCSCheckGatekeeperArchitectures = (1 << 6) | kSecCSCheckAllArchitectures, kSecCSRestrictSymlinks = 1 << 7, kSecCSRestrictToAppLike = 1 << 8, kSecCSRestrictSidebandData = 1 << 9, kSecCSUseSoftwareSigningCert = 1 << 10, kSecCSValidatePEH = 1 << 11, kSecCSSingleThreaded = 1 << 12, kSecCSAllowNetworkAccess __attribute__((availability(macosx,introduced=11_3))) = 1 << 16, kSecCSFastExecutableValidation __attribute__((availability(macosx,introduced=11_3))) = 1 << 17, }; OSStatus SecStaticCodeCheckValidity(SecStaticCodeRef staticCode, SecCSFlags flags, SecRequirementRef _Nullable requirement); OSStatus SecStaticCodeCheckValidityWithErrors(SecStaticCodeRef staticCode, SecCSFlags flags, SecRequirementRef _Nullable requirement, CFErrorRef *errors); #pragma clang assume_nonnull end } extern "C" { int mlockall(int); int munlockall(void); int mlock(const void *, size_t); void * mmap(void *, size_t, int, int, int, off_t) __asm("_" "mmap" ); int mprotect(void *, size_t, int) __asm("_" "mprotect" ); int msync(void *, size_t, int) __asm("_" "msync" ); int munlock(const void *, size_t); int munmap(void *, size_t) __asm("_" "munmap" ); int shm_open(const char *, int, ...); int shm_unlink(const char *); int posix_madvise(void *, size_t, int); int madvise(void *, size_t, int); int mincore(const void *, size_t, char *); int minherit(void *, size_t, int); } typedef __darwin_uuid_string_t uuid_string_t; static const uuid_t UUID_NULL __attribute__ ((unused)) = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; extern "C" { void uuid_clear(uuid_t uu); int uuid_compare(const uuid_t uu1, const uuid_t uu2); void uuid_copy(uuid_t dst, const uuid_t src); void uuid_generate(uuid_t out); void uuid_generate_random(uuid_t out); void uuid_generate_time(uuid_t out); int uuid_is_null(const uuid_t uu); int uuid_parse(const uuid_string_t in, uuid_t uu); void uuid_unparse(const uuid_t uu, uuid_string_t out); void uuid_unparse_lower(const uuid_t uu, uuid_string_t out); void uuid_unparse_upper(const uuid_t uu, uuid_string_t out); } extern "C" { typedef uid_t au_id_t; typedef pid_t au_asid_t; typedef u_int16_t au_event_t; typedef u_int16_t au_emod_t; typedef u_int32_t au_class_t; typedef u_int64_t au_asflgs_t __attribute__ ((aligned(8))); typedef unsigned char au_ctlmode_t; struct au_tid { dev_t port; u_int32_t machine; }; typedef struct au_tid au_tid_t; struct au_tid_addr { dev_t at_port; u_int32_t at_type; u_int32_t at_addr[4]; }; typedef struct au_tid_addr au_tid_addr_t; struct au_mask { unsigned int am_success; unsigned int am_failure; }; typedef struct au_mask au_mask_t; struct auditinfo { au_id_t ai_auid; au_mask_t ai_mask; au_tid_t ai_termid; au_asid_t ai_asid; }; typedef struct auditinfo auditinfo_t; struct auditinfo_addr { au_id_t ai_auid; au_mask_t ai_mask; au_tid_addr_t ai_termid; au_asid_t ai_asid; au_asflgs_t ai_flags; }; typedef struct auditinfo_addr auditinfo_addr_t; struct auditpinfo { pid_t ap_pid; au_id_t ap_auid; au_mask_t ap_mask; au_tid_t ap_termid; au_asid_t ap_asid; }; typedef struct auditpinfo auditpinfo_t; struct auditpinfo_addr { pid_t ap_pid; au_id_t ap_auid; au_mask_t ap_mask; au_tid_addr_t ap_termid; au_asid_t ap_asid; au_asflgs_t ap_flags; }; typedef struct auditpinfo_addr auditpinfo_addr_t; struct au_session { auditinfo_addr_t *as_aia_p; au_mask_t as_mask; }; typedef struct au_session au_session_t; struct au_expire_after { time_t age; size_t size; unsigned char op_type; }; typedef struct au_expire_after au_expire_after_t; typedef struct au_token token_t; struct au_qctrl { int aq_hiwater; int aq_lowater; int aq_bufsz; int aq_delay; int aq_minfree; }; typedef struct au_qctrl au_qctrl_t; struct audit_stat { unsigned int as_version; unsigned int as_numevent; int as_generated; int as_nonattrib; int as_kernel; int as_audit; int as_auditctl; int as_enqueue; int as_written; int as_wblocked; int as_rblocked; int as_dropped; int as_totalsize; unsigned int as_memused; }; typedef struct audit_stat au_stat_t; struct audit_fstat { u_int64_t af_filesz; u_int64_t af_currsz; }; typedef struct audit_fstat au_fstat_t; struct au_evclass_map { au_event_t ec_number; au_class_t ec_class; }; typedef struct au_evclass_map au_evclass_map_t; int audit(const void *, int) __attribute__((availability(macos,introduced=10.4,deprecated=11.0,message="audit is deprecated"))); int auditon(int, void *, int) __attribute__((availability(macos,introduced=10.4,deprecated=11.0,message="audit is deprecated"))); int auditctl(const char *) __attribute__((availability(macos,introduced=10.4,deprecated=11.0,message="audit is deprecated"))); int getauid(au_id_t *); int setauid(const au_id_t *); int getaudit_addr(struct auditinfo_addr *, int); int setaudit_addr(const struct auditinfo_addr *, int); int getaudit(struct auditinfo *) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); int setaudit(const struct auditinfo *) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); mach_port_name_t audit_session_self(void); au_asid_t audit_session_join(mach_port_name_t port); int audit_session_port(au_asid_t asid, mach_port_name_t *portname); } extern "C" { } #pragma clang assume_nonnull begin extern "C" { typedef const struct _xpc_type_s * xpc_type_t; // @protocol OS_xpc_object <NSObject> /* @end */ typedef NSObject/*<OS_xpc_object>*/ * __attribute__((objc_independent_class)) xpc_object_t; static __inline__ __attribute__((__always_inline__)) __attribute__((__nonnull__)) void _xpc_object_validate(xpc_object_t object) { (void)*(unsigned long volatile *)( void *)object; } typedef void (*xpc_handler_t)(xpc_object_t object); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_connection; typedef xpc_object_t xpc_connection_t; typedef void (*xpc_connection_handler_t)(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_endpoint; typedef xpc_object_t xpc_endpoint_t; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_null; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_bool; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_bool_s _xpc_bool_true; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_bool_s _xpc_bool_false; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_int64; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_uint64; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_double; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_date; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_data; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_string; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_uuid; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_fd; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_shmem; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_array; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_dictionary; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_error; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const char * const _xpc_error_key_description; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const char * const _xpc_event_key_name; #pragma clang assume_nonnull end __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_endpoint_t _Nonnull xpc_endpoint_create(xpc_connection_t _Nonnull connection); __attribute__((visibility("hidden"))) __attribute__((__used__)) const char * xpc_debugger_api_misuse_info(void); #pragma clang assume_nonnull begin extern "C" { __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_dictionary_s _xpc_error_connection_interrupted; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_dictionary_s _xpc_error_connection_invalid; __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) const struct _xpc_dictionary_s _xpc_error_termination_imminent; __attribute__((availability(macos,introduced=12.0))) extern __attribute__((visibility("default"))) const struct _xpc_dictionary_s _xpc_error_peer_code_signing_requirement; typedef void (*xpc_finalizer_t)(void * _Nullable value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_connection_t xpc_connection_create(const char * _Nullable name, dispatch_queue_t _Nullable targetq); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_connection_t xpc_connection_create_mach_service(const char *name, dispatch_queue_t _Nullable targetq, uint64_t flags); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_connection_t xpc_connection_create_from_endpoint(xpc_endpoint_t endpoint); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_connection_set_target_queue(xpc_connection_t connection, dispatch_queue_t _Nullable targetq); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_set_event_handler(xpc_connection_t connection, xpc_handler_t handler); __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_activate(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_suspend(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_resume(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_send_message(xpc_connection_t connection, xpc_object_t message); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_send_barrier(xpc_connection_t connection, dispatch_block_t barrier); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(4))) void xpc_connection_send_message_with_reply(xpc_connection_t connection, xpc_object_t message, dispatch_queue_t _Nullable replyq, xpc_handler_t handler); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__ns_returns_retained__)) xpc_object_t xpc_connection_send_message_with_reply_sync(xpc_connection_t connection, xpc_object_t message); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) void xpc_connection_cancel(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) const char * _Nullable xpc_connection_get_name(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) uid_t xpc_connection_get_euid(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) gid_t xpc_connection_get_egid(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) pid_t xpc_connection_get_pid(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) au_asid_t xpc_connection_get_asid(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_connection_set_context(xpc_connection_t connection, void * _Nullable context); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) void * _Nullable xpc_connection_get_context(xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_connection_set_finalizer_f(xpc_connection_t connection, xpc_finalizer_t _Nullable finalizer); __attribute__((availability(macos,introduced=12.0))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) int xpc_connection_set_peer_code_signing_requirement(xpc_connection_t connection, const char *requirement); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin extern "C" { __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_INTERVAL; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_REPEATING; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_DELAY; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_GRACE_PERIOD; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_1_MIN; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_5_MIN; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_15_MIN; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_30_MIN; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_1_HOUR; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_4_HOURS; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_8_HOURS; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_1_DAY; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const int64_t XPC_ACTIVITY_INTERVAL_7_DAYS; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_PRIORITY; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_PRIORITY_MAINTENANCE; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_PRIORITY_UTILITY; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_ALLOW_BATTERY; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_PREVENT_DEVICE_SLEEP; __attribute__((availability(macosx,introduced=10.9,deprecated=10.9,message="REQUIRE_BATTERY_LEVEL is not implemented"))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL; __attribute__((availability(macosx,introduced=10.9,deprecated=10.9,message="REQUIRE_HDD_SPINNING is not implemented"))) extern __attribute__((visibility("default"))) const char * const XPC_ACTIVITY_REQUIRE_HDD_SPINNING; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const struct _xpc_type_s _xpc_type_activity; typedef xpc_object_t xpc_activity_t; __attribute__((__nonnull__(1))) typedef void (*xpc_activity_handler_t)(xpc_activity_t activity); __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) const xpc_object_t XPC_ACTIVITY_CHECK_IN; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) void xpc_activity_register(const char *identifier, xpc_object_t criteria, xpc_activity_handler_t handler); __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__ns_returns_retained__)) __attribute__((__nonnull__(1))) xpc_object_t _Nullable xpc_activity_copy_criteria(xpc_activity_t activity); __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_activity_set_criteria(xpc_activity_t activity, xpc_object_t criteria); enum { XPC_ACTIVITY_STATE_CHECK_IN, XPC_ACTIVITY_STATE_WAIT, XPC_ACTIVITY_STATE_RUN, XPC_ACTIVITY_STATE_DEFER, XPC_ACTIVITY_STATE_CONTINUE, XPC_ACTIVITY_STATE_DONE, }; typedef long xpc_activity_state_t; __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_activity_state_t xpc_activity_get_state(xpc_activity_t activity); __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) bool xpc_activity_set_state(xpc_activity_t activity, xpc_activity_state_t state); __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) bool xpc_activity_should_defer(xpc_activity_t activity); __attribute__((availability(macosx,introduced=10.9))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_activity_unregister(const char *identifier); } #pragma clang assume_nonnull end typedef vm_offset_t pointer_t ; typedef vm_offset_t vm_address_t ; typedef uint64_t addr64_t; typedef uint32_t reg64_t; typedef uint32_t ppnum_t; typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t; typedef uint64_t vm_object_offset_t; typedef uint64_t vm_object_size_t; typedef mach_port_t upl_t; typedef mach_port_t vm_named_entry_t; extern "C" { struct vm_statistics { natural_t free_count; natural_t active_count; natural_t inactive_count; natural_t wire_count; natural_t zero_fill_count; natural_t reactivations; natural_t pageins; natural_t pageouts; natural_t faults; natural_t cow_faults; natural_t lookups; natural_t hits; natural_t purgeable_count; natural_t purges; natural_t speculative_count; }; typedef struct vm_statistics *vm_statistics_t; typedef struct vm_statistics vm_statistics_data_t; struct vm_statistics64 { natural_t free_count; natural_t active_count; natural_t inactive_count; natural_t wire_count; uint64_t zero_fill_count; uint64_t reactivations; uint64_t pageins; uint64_t pageouts; uint64_t faults; uint64_t cow_faults; uint64_t lookups; uint64_t hits; uint64_t purges; natural_t purgeable_count; natural_t speculative_count; uint64_t decompressions; uint64_t compressions; uint64_t swapins; uint64_t swapouts; natural_t compressor_page_count; natural_t throttled_count; natural_t external_page_count; natural_t internal_page_count; uint64_t total_uncompressed_pages_in_compressor; } __attribute__((aligned(8))); typedef struct vm_statistics64 *vm_statistics64_t; typedef struct vm_statistics64 vm_statistics64_data_t; kern_return_t vm_stats(void *info, unsigned int *count); struct vm_extmod_statistics { int64_t task_for_pid_count; int64_t task_for_pid_caller_count; int64_t thread_creation_count; int64_t thread_creation_caller_count; int64_t thread_set_state_count; int64_t thread_set_state_caller_count; } __attribute__((aligned(8))); typedef struct vm_extmod_statistics *vm_extmod_statistics_t; typedef struct vm_extmod_statistics vm_extmod_statistics_data_t; typedef struct vm_purgeable_stat { uint64_t count; uint64_t size; }vm_purgeable_stat_t; struct vm_purgeable_info { vm_purgeable_stat_t fifo_data[8]; vm_purgeable_stat_t obsolete_data; vm_purgeable_stat_t lifo_data[8]; }; typedef struct vm_purgeable_info *vm_purgeable_info_t; enum virtual_memory_guard_exception_codes { kGUARD_EXC_DEALLOC_GAP = 1u << 0 }; } typedef integer_t *host_info_t; typedef integer_t *host_info64_t; typedef integer_t host_info_data_t[(1024)]; typedef char kernel_version_t[(512)]; typedef char kernel_boot_info_t[(4096)]; typedef integer_t host_flavor_t; struct host_can_has_debugger_info { boolean_t can_has_debugger; }; typedef struct host_can_has_debugger_info host_can_has_debugger_info_data_t; typedef struct host_can_has_debugger_info *host_can_has_debugger_info_t; #pragma pack(push, 4) struct host_basic_info { integer_t max_cpus; integer_t avail_cpus; natural_t memory_size; cpu_type_t cpu_type; cpu_subtype_t cpu_subtype; cpu_threadtype_t cpu_threadtype; integer_t physical_cpu; integer_t physical_cpu_max; integer_t logical_cpu; integer_t logical_cpu_max; uint64_t max_mem; }; #pragma pack(pop) typedef struct host_basic_info host_basic_info_data_t; typedef struct host_basic_info *host_basic_info_t; struct host_sched_info { integer_t min_timeout; integer_t min_quantum; }; typedef struct host_sched_info host_sched_info_data_t; typedef struct host_sched_info *host_sched_info_t; struct kernel_resource_sizes { natural_t task; natural_t thread; natural_t port; natural_t memory_region; natural_t memory_object; }; typedef struct kernel_resource_sizes kernel_resource_sizes_data_t; typedef struct kernel_resource_sizes *kernel_resource_sizes_t; struct host_priority_info { integer_t kernel_priority; integer_t system_priority; integer_t server_priority; integer_t user_priority; integer_t depress_priority; integer_t idle_priority; integer_t minimum_priority; integer_t maximum_priority; }; typedef struct host_priority_info host_priority_info_data_t; typedef struct host_priority_info *host_priority_info_t; struct host_load_info { integer_t avenrun[3]; integer_t mach_factor[3]; }; typedef struct host_load_info host_load_info_data_t; typedef struct host_load_info *host_load_info_t; typedef struct vm_purgeable_info host_purgable_info_data_t; typedef struct vm_purgeable_info *host_purgable_info_t; struct host_cpu_load_info { natural_t cpu_ticks[4]; }; typedef struct host_cpu_load_info host_cpu_load_info_data_t; typedef struct host_cpu_load_info *host_cpu_load_info_t; struct host_preferred_user_arch { cpu_type_t cpu_type; cpu_subtype_t cpu_subtype; }; typedef struct host_preferred_user_arch host_preferred_user_arch_data_t; typedef struct host_preferred_user_arch *host_preferred_user_arch_t; typedef int vm_prot_t; typedef unsigned vm_sync_t; typedef unsigned long long memory_object_offset_t; typedef unsigned long long memory_object_size_t; typedef natural_t memory_object_cluster_size_t; typedef natural_t * memory_object_fault_info_t; typedef unsigned long long vm_object_id_t; typedef mach_port_t memory_object_t; typedef mach_port_t memory_object_control_t; typedef memory_object_t *memory_object_array_t; typedef mach_port_t memory_object_name_t; typedef mach_port_t memory_object_default_t; typedef int memory_object_copy_strategy_t; typedef int memory_object_return_t; typedef int *memory_object_info_t; typedef int memory_object_flavor_t; typedef int memory_object_info_data_t[(1024)]; struct memory_object_perf_info { memory_object_cluster_size_t cluster_size; boolean_t may_cache; }; struct memory_object_attr_info { memory_object_copy_strategy_t copy_strategy; memory_object_cluster_size_t cluster_size; boolean_t may_cache_object; boolean_t temporary; }; struct memory_object_behave_info { memory_object_copy_strategy_t copy_strategy; boolean_t temporary; boolean_t invalidate; boolean_t silent_overwrite; boolean_t advisory_pageout; }; typedef struct memory_object_behave_info *memory_object_behave_info_t; typedef struct memory_object_behave_info memory_object_behave_info_data_t; typedef struct memory_object_perf_info *memory_object_perf_info_t; typedef struct memory_object_perf_info memory_object_perf_info_data_t; typedef struct memory_object_attr_info *memory_object_attr_info_t; typedef struct memory_object_attr_info memory_object_attr_info_data_t; struct x86_state_hdr { uint32_t flavor; uint32_t count; }; typedef struct x86_state_hdr x86_state_hdr_t; typedef struct __darwin_i386_thread_state i386_thread_state_t; typedef struct __darwin_i386_thread_state x86_thread_state32_t; typedef struct __darwin_i386_float_state i386_float_state_t; typedef struct __darwin_i386_float_state x86_float_state32_t; typedef struct __darwin_i386_avx_state x86_avx_state32_t; typedef struct __darwin_i386_avx512_state x86_avx512_state32_t; typedef struct __darwin_i386_exception_state i386_exception_state_t; typedef struct __darwin_i386_exception_state x86_exception_state32_t; typedef struct __darwin_x86_debug_state32 x86_debug_state32_t; typedef struct __darwin_x86_thread_state64 x86_thread_state64_t; typedef struct __darwin_x86_thread_full_state64 x86_thread_full_state64_t; typedef struct __darwin_x86_float_state64 x86_float_state64_t; typedef struct __darwin_x86_avx_state64 x86_avx_state64_t; typedef struct __darwin_x86_avx512_state64 x86_avx512_state64_t; typedef struct __darwin_x86_exception_state64 x86_exception_state64_t; typedef struct __darwin_x86_debug_state64 x86_debug_state64_t; typedef struct __x86_pagein_state x86_pagein_state_t; typedef struct __x86_instruction_state x86_instruction_state_t; typedef struct __last_branch_state last_branch_state_t; struct x86_thread_state { x86_state_hdr_t tsh; union { x86_thread_state32_t ts32; x86_thread_state64_t ts64; } uts; }; struct x86_float_state { x86_state_hdr_t fsh; union { x86_float_state32_t fs32; x86_float_state64_t fs64; } ufs; }; struct x86_exception_state { x86_state_hdr_t esh; union { x86_exception_state32_t es32; x86_exception_state64_t es64; } ues; }; struct x86_debug_state { x86_state_hdr_t dsh; union { x86_debug_state32_t ds32; x86_debug_state64_t ds64; } uds; }; struct x86_avx_state { x86_state_hdr_t ash; union { x86_avx_state32_t as32; x86_avx_state64_t as64; } ufs; }; struct x86_avx512_state { x86_state_hdr_t ash; union { x86_avx512_state32_t as32; x86_avx512_state64_t as64; } ufs; }; typedef struct x86_thread_state x86_thread_state_t; typedef struct x86_float_state x86_float_state_t; typedef struct x86_exception_state x86_exception_state_t; typedef struct x86_debug_state x86_debug_state_t; typedef struct x86_avx_state x86_avx_state_t; typedef struct x86_avx512_state x86_avx512_state_t; typedef natural_t *thread_state_t; typedef natural_t thread_state_data_t[1296]; typedef int thread_state_flavor_t; typedef thread_state_flavor_t *thread_state_flavor_array_t; typedef struct ipc_info_space { natural_t iis_genno_mask; natural_t iis_table_size; natural_t iis_table_next; natural_t iis_tree_size; natural_t iis_tree_small; natural_t iis_tree_hash; } ipc_info_space_t; typedef struct ipc_info_space_basic { natural_t iisb_genno_mask; natural_t iisb_table_size; natural_t iisb_table_next; natural_t iisb_table_inuse; natural_t iisb_reserved[2]; } ipc_info_space_basic_t; typedef struct ipc_info_name { mach_port_name_t iin_name; integer_t iin_collision; mach_port_type_t iin_type; mach_port_urefs_t iin_urefs; natural_t iin_object; natural_t iin_next; natural_t iin_hash; } ipc_info_name_t; typedef ipc_info_name_t *ipc_info_name_array_t; typedef struct ipc_info_tree_name { ipc_info_name_t iitn_name; mach_port_name_t iitn_lchild; mach_port_name_t iitn_rchild; } ipc_info_tree_name_t; typedef ipc_info_tree_name_t *ipc_info_tree_name_array_t; typedef struct ipc_info_port { natural_t iip_port_object; natural_t iip_receiver_object; } ipc_info_port_t; typedef ipc_info_port_t *exception_handler_info_array_t; typedef int exception_type_t; typedef integer_t exception_data_type_t; typedef int64_t mach_exception_data_type_t; typedef int exception_behavior_t; typedef exception_data_type_t *exception_data_t; typedef mach_exception_data_type_t *mach_exception_data_t; typedef unsigned int exception_mask_t; typedef exception_mask_t *exception_mask_array_t; typedef exception_behavior_t *exception_behavior_array_t; typedef thread_state_flavor_t *exception_flavor_array_t; typedef mach_port_t *exception_port_array_t; typedef ipc_info_port_t *exception_port_info_array_t; typedef mach_exception_data_type_t mach_exception_code_t; typedef mach_exception_data_type_t mach_exception_subcode_t; typedef mach_port_t mach_voucher_t; typedef mach_port_name_t mach_voucher_name_t; typedef mach_voucher_name_t *mach_voucher_name_array_t; typedef mach_voucher_t ipc_voucher_t; typedef uint32_t mach_voucher_selector_t; typedef uint32_t mach_voucher_attr_key_t; typedef mach_voucher_attr_key_t *mach_voucher_attr_key_array_t; typedef uint8_t *mach_voucher_attr_content_t; typedef uint32_t mach_voucher_attr_content_size_t; typedef uint32_t mach_voucher_attr_command_t; typedef uint32_t mach_voucher_attr_recipe_command_t; typedef mach_voucher_attr_recipe_command_t *mach_voucher_attr_recipe_command_array_t; #pragma pack(push, 1) typedef struct mach_voucher_attr_recipe_data { mach_voucher_attr_key_t key; mach_voucher_attr_recipe_command_t command; mach_voucher_name_t previous_voucher; mach_voucher_attr_content_size_t content_size; uint8_t content[]; } mach_voucher_attr_recipe_data_t; typedef mach_voucher_attr_recipe_data_t *mach_voucher_attr_recipe_t; typedef mach_msg_type_number_t mach_voucher_attr_recipe_size_t; typedef uint8_t *mach_voucher_attr_raw_recipe_t; typedef mach_voucher_attr_raw_recipe_t mach_voucher_attr_raw_recipe_array_t; typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_size_t; typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_array_size_t; #pragma pack(pop) typedef mach_port_t mach_voucher_attr_manager_t; typedef mach_port_t mach_voucher_attr_control_t; typedef mach_port_t ipc_voucher_attr_manager_t; typedef mach_port_t ipc_voucher_attr_control_t; typedef uint64_t mach_voucher_attr_value_handle_t ; typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t; typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t; typedef uint32_t mach_voucher_attr_value_reference_t; typedef uint32_t mach_voucher_attr_value_flags_t; typedef uint32_t mach_voucher_attr_control_flags_t; typedef uint32_t mach_voucher_attr_importance_refs; typedef integer_t *processor_info_t; typedef integer_t *processor_info_array_t; typedef integer_t processor_info_data_t[(1024)]; typedef integer_t *processor_set_info_t; typedef integer_t processor_set_info_data_t[(1024)]; typedef int processor_flavor_t; struct processor_basic_info { cpu_type_t cpu_type; cpu_subtype_t cpu_subtype; boolean_t running; int slot_num; boolean_t is_master; }; typedef struct processor_basic_info processor_basic_info_data_t; typedef struct processor_basic_info *processor_basic_info_t; struct processor_cpu_load_info { unsigned int cpu_ticks[4]; }; typedef struct processor_cpu_load_info processor_cpu_load_info_data_t; typedef struct processor_cpu_load_info *processor_cpu_load_info_t; typedef int processor_set_flavor_t; struct processor_set_basic_info { int processor_count; int default_policy; }; typedef struct processor_set_basic_info processor_set_basic_info_data_t; typedef struct processor_set_basic_info *processor_set_basic_info_t; struct processor_set_load_info { int task_count; int thread_count; integer_t load_average; integer_t mach_factor; }; typedef struct processor_set_load_info processor_set_load_info_data_t; typedef struct processor_set_load_info *processor_set_load_info_t; typedef int policy_t; typedef integer_t *policy_info_t; typedef integer_t *policy_base_t; typedef integer_t *policy_limit_t; struct policy_timeshare_base { integer_t base_priority; }; struct policy_timeshare_limit { integer_t max_priority; }; struct policy_timeshare_info { integer_t max_priority; integer_t base_priority; integer_t cur_priority; boolean_t depressed; integer_t depress_priority; }; typedef struct policy_timeshare_base *policy_timeshare_base_t; typedef struct policy_timeshare_limit *policy_timeshare_limit_t; typedef struct policy_timeshare_info *policy_timeshare_info_t; typedef struct policy_timeshare_base policy_timeshare_base_data_t; typedef struct policy_timeshare_limit policy_timeshare_limit_data_t; typedef struct policy_timeshare_info policy_timeshare_info_data_t; struct policy_rr_base { integer_t base_priority; integer_t quantum; }; struct policy_rr_limit { integer_t max_priority; }; struct policy_rr_info { integer_t max_priority; integer_t base_priority; integer_t quantum; boolean_t depressed; integer_t depress_priority; }; typedef struct policy_rr_base *policy_rr_base_t; typedef struct policy_rr_limit *policy_rr_limit_t; typedef struct policy_rr_info *policy_rr_info_t; typedef struct policy_rr_base policy_rr_base_data_t; typedef struct policy_rr_limit policy_rr_limit_data_t; typedef struct policy_rr_info policy_rr_info_data_t; struct policy_fifo_base { integer_t base_priority; }; struct policy_fifo_limit { integer_t max_priority; }; struct policy_fifo_info { integer_t max_priority; integer_t base_priority; boolean_t depressed; integer_t depress_priority; }; typedef struct policy_fifo_base *policy_fifo_base_t; typedef struct policy_fifo_limit *policy_fifo_limit_t; typedef struct policy_fifo_info *policy_fifo_info_t; typedef struct policy_fifo_base policy_fifo_base_data_t; typedef struct policy_fifo_limit policy_fifo_limit_data_t; typedef struct policy_fifo_info policy_fifo_info_data_t; struct policy_bases { policy_timeshare_base_data_t ts; policy_rr_base_data_t rr; policy_fifo_base_data_t fifo; }; struct policy_limits { policy_timeshare_limit_data_t ts; policy_rr_limit_data_t rr; policy_fifo_limit_data_t fifo; }; struct policy_infos { policy_timeshare_info_data_t ts; policy_rr_info_data_t rr; policy_fifo_info_data_t fifo; }; typedef struct policy_bases policy_base_data_t; typedef struct policy_limits policy_limit_data_t; typedef struct policy_infos policy_info_data_t; typedef natural_t task_flavor_t; typedef integer_t *task_info_t; typedef integer_t task_info_data_t[(1024)]; #pragma pack(push, 4) struct task_basic_info_32 { integer_t suspend_count; natural_t virtual_size; natural_t resident_size; time_value_t user_time; time_value_t system_time; policy_t policy; }; typedef struct task_basic_info_32 task_basic_info_32_data_t; typedef struct task_basic_info_32 *task_basic_info_32_t; struct task_basic_info_64 { integer_t suspend_count; mach_vm_size_t virtual_size; mach_vm_size_t resident_size; time_value_t user_time; time_value_t system_time; policy_t policy; }; typedef struct task_basic_info_64 task_basic_info_64_data_t; typedef struct task_basic_info_64 *task_basic_info_64_t; struct task_basic_info { integer_t suspend_count; vm_size_t virtual_size; vm_size_t resident_size; time_value_t user_time; time_value_t system_time; policy_t policy; }; typedef struct task_basic_info task_basic_info_data_t; typedef struct task_basic_info *task_basic_info_t; struct task_events_info { integer_t faults; integer_t pageins; integer_t cow_faults; integer_t messages_sent; integer_t messages_received; integer_t syscalls_mach; integer_t syscalls_unix; integer_t csw; }; typedef struct task_events_info task_events_info_data_t; typedef struct task_events_info *task_events_info_t; struct task_thread_times_info { time_value_t user_time; time_value_t system_time; }; typedef struct task_thread_times_info task_thread_times_info_data_t; typedef struct task_thread_times_info *task_thread_times_info_t; struct task_absolutetime_info { uint64_t total_user; uint64_t total_system; uint64_t threads_user; uint64_t threads_system; }; typedef struct task_absolutetime_info task_absolutetime_info_data_t; typedef struct task_absolutetime_info *task_absolutetime_info_t; struct task_kernelmemory_info { uint64_t total_palloc; uint64_t total_pfree; uint64_t total_salloc; uint64_t total_sfree; }; typedef struct task_kernelmemory_info task_kernelmemory_info_data_t; typedef struct task_kernelmemory_info *task_kernelmemory_info_t; struct task_affinity_tag_info { integer_t set_count; integer_t min; integer_t max; integer_t task_count; }; typedef struct task_affinity_tag_info task_affinity_tag_info_data_t; typedef struct task_affinity_tag_info *task_affinity_tag_info_t; struct task_dyld_info { mach_vm_address_t all_image_info_addr; mach_vm_size_t all_image_info_size; integer_t all_image_info_format; }; typedef struct task_dyld_info task_dyld_info_data_t; typedef struct task_dyld_info *task_dyld_info_t; struct task_extmod_info { unsigned char task_uuid[16]; vm_extmod_statistics_data_t extmod_statistics; }; typedef struct task_extmod_info task_extmod_info_data_t; typedef struct task_extmod_info *task_extmod_info_t; struct mach_task_basic_info { mach_vm_size_t virtual_size; mach_vm_size_t resident_size; mach_vm_size_t resident_size_max; time_value_t user_time; time_value_t system_time; policy_t policy; integer_t suspend_count; }; typedef struct mach_task_basic_info mach_task_basic_info_data_t; typedef struct mach_task_basic_info *mach_task_basic_info_t; struct task_power_info { uint64_t total_user; uint64_t total_system; uint64_t task_interrupt_wakeups; uint64_t task_platform_idle_wakeups; uint64_t task_timer_wakeups_bin_1; uint64_t task_timer_wakeups_bin_2; }; typedef struct task_power_info task_power_info_data_t; typedef struct task_power_info *task_power_info_t; struct task_vm_info { mach_vm_size_t virtual_size; integer_t region_count; integer_t page_size; mach_vm_size_t resident_size; mach_vm_size_t resident_size_peak; mach_vm_size_t device; mach_vm_size_t device_peak; mach_vm_size_t internal; mach_vm_size_t internal_peak; mach_vm_size_t external; mach_vm_size_t external_peak; mach_vm_size_t reusable; mach_vm_size_t reusable_peak; mach_vm_size_t purgeable_volatile_pmap; mach_vm_size_t purgeable_volatile_resident; mach_vm_size_t purgeable_volatile_virtual; mach_vm_size_t compressed; mach_vm_size_t compressed_peak; mach_vm_size_t compressed_lifetime; mach_vm_size_t phys_footprint; mach_vm_address_t min_address; mach_vm_address_t max_address; int64_t ledger_phys_footprint_peak; int64_t ledger_purgeable_nonvolatile; int64_t ledger_purgeable_novolatile_compressed; int64_t ledger_purgeable_volatile; int64_t ledger_purgeable_volatile_compressed; int64_t ledger_tag_network_nonvolatile; int64_t ledger_tag_network_nonvolatile_compressed; int64_t ledger_tag_network_volatile; int64_t ledger_tag_network_volatile_compressed; int64_t ledger_tag_media_footprint; int64_t ledger_tag_media_footprint_compressed; int64_t ledger_tag_media_nofootprint; int64_t ledger_tag_media_nofootprint_compressed; int64_t ledger_tag_graphics_footprint; int64_t ledger_tag_graphics_footprint_compressed; int64_t ledger_tag_graphics_nofootprint; int64_t ledger_tag_graphics_nofootprint_compressed; int64_t ledger_tag_neural_footprint; int64_t ledger_tag_neural_footprint_compressed; int64_t ledger_tag_neural_nofootprint; int64_t ledger_tag_neural_nofootprint_compressed; uint64_t limit_bytes_remaining; integer_t decompressions; }; typedef struct task_vm_info task_vm_info_data_t; typedef struct task_vm_info *task_vm_info_t; typedef struct vm_purgeable_info task_purgable_info_t; struct task_trace_memory_info { uint64_t user_memory_address; uint64_t buffer_size; uint64_t mailbox_array_size; }; typedef struct task_trace_memory_info task_trace_memory_info_data_t; typedef struct task_trace_memory_info * task_trace_memory_info_t; struct task_wait_state_info { uint64_t total_wait_state_time; uint64_t total_wait_sfi_state_time; uint32_t _reserved[4]; }; typedef struct task_wait_state_info task_wait_state_info_data_t; typedef struct task_wait_state_info * task_wait_state_info_t; typedef struct { uint64_t task_gpu_utilisation; uint64_t task_gpu_stat_reserved0; uint64_t task_gpu_stat_reserved1; uint64_t task_gpu_stat_reserved2; } gpu_energy_data; typedef gpu_energy_data *gpu_energy_data_t; struct task_power_info_v2 { task_power_info_data_t cpu_energy; gpu_energy_data gpu_energy; uint64_t task_ptime; uint64_t task_pset_switches; }; typedef struct task_power_info_v2 task_power_info_v2_data_t; typedef struct task_power_info_v2 *task_power_info_v2_t; struct task_flags_info { uint32_t flags; }; typedef struct task_flags_info task_flags_info_data_t; typedef struct task_flags_info * task_flags_info_t; typedef uint32_t task_exc_guard_behavior_t; typedef uint32_t task_corpse_forking_behavior_t; #pragma pack(pop) typedef natural_t task_inspect_flavor_t; enum task_inspect_flavor { TASK_INSPECT_BASIC_COUNTS = 1, }; struct task_inspect_basic_counts { uint64_t instructions; uint64_t cycles; }; typedef struct task_inspect_basic_counts task_inspect_basic_counts_data_t; typedef struct task_inspect_basic_counts *task_inspect_basic_counts_t; typedef integer_t *task_inspect_info_t; typedef natural_t task_policy_flavor_t; typedef integer_t *task_policy_t; typedef enum task_role { TASK_RENICED = -1, TASK_UNSPECIFIED = 0, TASK_FOREGROUND_APPLICATION = 1, TASK_BACKGROUND_APPLICATION = 2, TASK_CONTROL_APPLICATION = 3, TASK_GRAPHICS_SERVER = 4, TASK_THROTTLE_APPLICATION = 5, TASK_NONUI_APPLICATION = 6, TASK_DEFAULT_APPLICATION = 7, TASK_DARWINBG_APPLICATION = 8, } task_role_t; struct task_category_policy { task_role_t role; }; typedef struct task_category_policy task_category_policy_data_t; typedef struct task_category_policy *task_category_policy_t; enum task_latency_qos { LATENCY_QOS_TIER_UNSPECIFIED = 0x0, LATENCY_QOS_TIER_0 = ((0xFF << 16) | 1), LATENCY_QOS_TIER_1 = ((0xFF << 16) | 2), LATENCY_QOS_TIER_2 = ((0xFF << 16) | 3), LATENCY_QOS_TIER_3 = ((0xFF << 16) | 4), LATENCY_QOS_TIER_4 = ((0xFF << 16) | 5), LATENCY_QOS_TIER_5 = ((0xFF << 16) | 6) }; typedef integer_t task_latency_qos_t; enum task_throughput_qos { THROUGHPUT_QOS_TIER_UNSPECIFIED = 0x0, THROUGHPUT_QOS_TIER_0 = ((0xFE << 16) | 1), THROUGHPUT_QOS_TIER_1 = ((0xFE << 16) | 2), THROUGHPUT_QOS_TIER_2 = ((0xFE << 16) | 3), THROUGHPUT_QOS_TIER_3 = ((0xFE << 16) | 4), THROUGHPUT_QOS_TIER_4 = ((0xFE << 16) | 5), THROUGHPUT_QOS_TIER_5 = ((0xFE << 16) | 6), }; typedef integer_t task_throughput_qos_t; struct task_qos_policy { task_latency_qos_t task_latency_qos_tier; task_throughput_qos_t task_throughput_qos_tier; }; typedef struct task_qos_policy *task_qos_policy_t; typedef int task_special_port_t; typedef natural_t thread_flavor_t; typedef integer_t *thread_info_t; typedef integer_t thread_info_data_t[(32)]; struct thread_basic_info { time_value_t user_time; time_value_t system_time; integer_t cpu_usage; policy_t policy; integer_t run_state; integer_t flags; integer_t suspend_count; integer_t sleep_time; }; typedef struct thread_basic_info thread_basic_info_data_t; typedef struct thread_basic_info *thread_basic_info_t; struct thread_identifier_info { uint64_t thread_id; uint64_t thread_handle; uint64_t dispatch_qaddr; }; typedef struct thread_identifier_info thread_identifier_info_data_t; typedef struct thread_identifier_info *thread_identifier_info_t; struct thread_extended_info { uint64_t pth_user_time; uint64_t pth_system_time; int32_t pth_cpu_usage; int32_t pth_policy; int32_t pth_run_state; int32_t pth_flags; int32_t pth_sleep_time; int32_t pth_curpri; int32_t pth_priority; int32_t pth_maxpriority; char pth_name[64]; }; typedef struct thread_extended_info thread_extended_info_data_t; typedef struct thread_extended_info * thread_extended_info_t; struct io_stat_entry { uint64_t count; uint64_t size; }; struct io_stat_info { struct io_stat_entry disk_reads; struct io_stat_entry io_priority[4]; struct io_stat_entry paging; struct io_stat_entry metadata; struct io_stat_entry total_io; }; typedef struct io_stat_info *io_stat_info_t; typedef natural_t thread_policy_flavor_t; typedef integer_t *thread_policy_t; struct thread_standard_policy { natural_t no_data; }; typedef struct thread_standard_policy thread_standard_policy_data_t; typedef struct thread_standard_policy *thread_standard_policy_t; struct thread_extended_policy { boolean_t timeshare; }; typedef struct thread_extended_policy thread_extended_policy_data_t; typedef struct thread_extended_policy *thread_extended_policy_t; struct thread_time_constraint_policy { uint32_t period; uint32_t computation; uint32_t constraint; boolean_t preemptible; }; typedef struct thread_time_constraint_policy thread_time_constraint_policy_data_t; typedef struct thread_time_constraint_policy *thread_time_constraint_policy_t; struct thread_precedence_policy { integer_t importance; }; typedef struct thread_precedence_policy thread_precedence_policy_data_t; typedef struct thread_precedence_policy *thread_precedence_policy_t; struct thread_affinity_policy { integer_t affinity_tag; }; typedef struct thread_affinity_policy thread_affinity_policy_data_t; typedef struct thread_affinity_policy *thread_affinity_policy_t; struct thread_background_policy { integer_t priority; }; typedef struct thread_background_policy thread_background_policy_data_t; typedef struct thread_background_policy *thread_background_policy_t; typedef integer_t thread_latency_qos_t; struct thread_latency_qos_policy { thread_latency_qos_t thread_latency_qos_tier; }; typedef struct thread_latency_qos_policy thread_latency_qos_policy_data_t; typedef struct thread_latency_qos_policy *thread_latency_qos_policy_t; typedef integer_t thread_throughput_qos_t; struct thread_throughput_qos_policy { thread_throughput_qos_t thread_throughput_qos_tier; }; typedef struct thread_throughput_qos_policy thread_throughput_qos_policy_data_t; typedef struct thread_throughput_qos_policy *thread_throughput_qos_policy_t; typedef unsigned int vm_machine_attribute_t; typedef int vm_machine_attribute_val_t; typedef unsigned int vm_inherit_t; typedef int vm_purgable_t; typedef int vm_behavior_t; extern "C" { extern vm_size_t vm_page_size; extern vm_size_t vm_page_mask; extern int vm_page_shift; extern vm_size_t vm_kernel_page_size __attribute__((availability(macosx,introduced=10.9))); extern vm_size_t vm_kernel_page_mask __attribute__((availability(macosx,introduced=10.9))); extern int vm_kernel_page_shift __attribute__((availability(macosx,introduced=10.9))); } #pragma pack(push, 4) typedef uint32_t vm32_object_id_t; typedef int *vm_region_info_t; typedef int *vm_region_info_64_t; typedef int *vm_region_recurse_info_t; typedef int *vm_region_recurse_info_64_t; typedef int vm_region_flavor_t; typedef int vm_region_info_data_t[(1024)]; struct vm_region_basic_info_64 { vm_prot_t protection; vm_prot_t max_protection; vm_inherit_t inheritance; boolean_t shared; boolean_t reserved; memory_object_offset_t offset; vm_behavior_t behavior; unsigned short user_wired_count; }; typedef struct vm_region_basic_info_64 *vm_region_basic_info_64_t; typedef struct vm_region_basic_info_64 vm_region_basic_info_data_64_t; struct vm_region_basic_info { vm_prot_t protection; vm_prot_t max_protection; vm_inherit_t inheritance; boolean_t shared; boolean_t reserved; uint32_t offset; vm_behavior_t behavior; unsigned short user_wired_count; }; typedef struct vm_region_basic_info *vm_region_basic_info_t; typedef struct vm_region_basic_info vm_region_basic_info_data_t; struct vm_region_extended_info { vm_prot_t protection; unsigned int user_tag; unsigned int pages_resident; unsigned int pages_shared_now_private; unsigned int pages_swapped_out; unsigned int pages_dirtied; unsigned int ref_count; unsigned short shadow_depth; unsigned char external_pager; unsigned char share_mode; unsigned int pages_reusable; }; typedef struct vm_region_extended_info *vm_region_extended_info_t; typedef struct vm_region_extended_info vm_region_extended_info_data_t; struct vm_region_top_info { unsigned int obj_id; unsigned int ref_count; unsigned int private_pages_resident; unsigned int shared_pages_resident; unsigned char share_mode; }; typedef struct vm_region_top_info *vm_region_top_info_t; typedef struct vm_region_top_info vm_region_top_info_data_t; struct vm_region_submap_info { vm_prot_t protection; vm_prot_t max_protection; vm_inherit_t inheritance; uint32_t offset; unsigned int user_tag; unsigned int pages_resident; unsigned int pages_shared_now_private; unsigned int pages_swapped_out; unsigned int pages_dirtied; unsigned int ref_count; unsigned short shadow_depth; unsigned char external_pager; unsigned char share_mode; boolean_t is_submap; vm_behavior_t behavior; vm32_object_id_t object_id; unsigned short user_wired_count; }; typedef struct vm_region_submap_info *vm_region_submap_info_t; typedef struct vm_region_submap_info vm_region_submap_info_data_t; struct vm_region_submap_info_64 { vm_prot_t protection; vm_prot_t max_protection; vm_inherit_t inheritance; memory_object_offset_t offset; unsigned int user_tag; unsigned int pages_resident; unsigned int pages_shared_now_private; unsigned int pages_swapped_out; unsigned int pages_dirtied; unsigned int ref_count; unsigned short shadow_depth; unsigned char external_pager; unsigned char share_mode; boolean_t is_submap; vm_behavior_t behavior; vm32_object_id_t object_id; unsigned short user_wired_count; unsigned int pages_reusable; vm_object_id_t object_id_full; }; typedef struct vm_region_submap_info_64 *vm_region_submap_info_64_t; typedef struct vm_region_submap_info_64 vm_region_submap_info_data_64_t; struct vm_region_submap_short_info_64 { vm_prot_t protection; vm_prot_t max_protection; vm_inherit_t inheritance; memory_object_offset_t offset; unsigned int user_tag; unsigned int ref_count; unsigned short shadow_depth; unsigned char external_pager; unsigned char share_mode; boolean_t is_submap; vm_behavior_t behavior; vm32_object_id_t object_id; unsigned short user_wired_count; }; typedef struct vm_region_submap_short_info_64 *vm_region_submap_short_info_64_t; typedef struct vm_region_submap_short_info_64 vm_region_submap_short_info_data_64_t; struct mach_vm_read_entry { mach_vm_address_t address; mach_vm_size_t size; }; struct vm_read_entry { vm_address_t address; vm_size_t size; }; typedef struct mach_vm_read_entry mach_vm_read_entry_t[(256)]; typedef struct vm_read_entry vm_read_entry_t[(256)]; #pragma pack(pop) typedef int *vm_page_info_t; typedef int vm_page_info_data_t[]; typedef int vm_page_info_flavor_t; struct vm_page_info_basic { int disposition; int ref_count; vm_object_id_t object_id; memory_object_offset_t offset; int depth; int __pad; }; typedef struct vm_page_info_basic *vm_page_info_basic_t; typedef struct vm_page_info_basic vm_page_info_basic_data_t; extern "C" { typedef int kmod_t; struct kmod_info; typedef kern_return_t kmod_start_func_t(struct kmod_info * ki, void * data); typedef kern_return_t kmod_stop_func_t(struct kmod_info * ki, void * data); #pragma pack(push, 4) typedef struct kmod_reference { struct kmod_reference * next; struct kmod_info * info; } kmod_reference_t; typedef struct kmod_info { struct kmod_info * next; int32_t info_version; uint32_t id; char name[64]; char version[64]; int32_t reference_count; kmod_reference_t * reference_list; vm_address_t address; vm_size_t size; vm_size_t hdr_size; kmod_start_func_t * start; kmod_stop_func_t * stop; } kmod_info_t; typedef struct kmod_info_32_v1 { uint32_t next_addr; int32_t info_version; uint32_t id; uint8_t name[64]; uint8_t version[64]; int32_t reference_count; uint32_t reference_list_addr; uint32_t address; uint32_t size; uint32_t hdr_size; uint32_t start_addr; uint32_t stop_addr; } kmod_info_32_v1_t; typedef struct kmod_info_64_v1 { uint64_t next_addr; int32_t info_version; uint32_t id; uint8_t name[64]; uint8_t version[64]; int32_t reference_count; uint64_t reference_list_addr; uint64_t address; uint64_t size; uint64_t hdr_size; uint64_t start_addr; uint64_t stop_addr; } kmod_info_64_v1_t; #pragma pack(pop) typedef void * kmod_args_t; typedef int kmod_control_flavor_t; typedef kmod_info_t * kmod_info_array_t; } typedef struct fsid { int32_t val[2]; } fsid_t; typedef struct fsobj_id { u_int32_t fid_objno; u_int32_t fid_generation; } fsobj_id_t; struct dyld_kernel_image_info { uuid_t uuid; fsobj_id_t fsobjid; fsid_t fsid; uint64_t load_addr; }; struct dyld_kernel_process_info { struct dyld_kernel_image_info cache_image_info; uint64_t timestamp; uint32_t imageCount; uint32_t initialImageCount; uint8_t dyldState; boolean_t no_cache; boolean_t private_cache; }; typedef struct dyld_kernel_image_info dyld_kernel_image_info_t; typedef struct dyld_kernel_process_info dyld_kernel_process_info_t; typedef dyld_kernel_image_info_t *dyld_kernel_image_info_array_t; typedef mach_port_t task_t; typedef mach_port_t task_name_t; typedef mach_port_t task_policy_set_t; typedef mach_port_t task_policy_get_t; typedef mach_port_t task_inspect_t; typedef mach_port_t task_read_t; typedef mach_port_t task_suspension_token_t; typedef mach_port_t thread_t; typedef mach_port_t thread_act_t; typedef mach_port_t thread_inspect_t; typedef mach_port_t thread_read_t; typedef mach_port_t ipc_space_t; typedef mach_port_t ipc_space_read_t; typedef mach_port_t ipc_space_inspect_t; typedef mach_port_t coalition_t; typedef mach_port_t host_t; typedef mach_port_t host_priv_t; typedef mach_port_t host_security_t; typedef mach_port_t processor_t; typedef mach_port_t processor_set_t; typedef mach_port_t processor_set_control_t; typedef mach_port_t semaphore_t; typedef mach_port_t lock_set_t; typedef mach_port_t ledger_t; typedef mach_port_t alarm_t; typedef mach_port_t clock_serv_t; typedef mach_port_t clock_ctrl_t; typedef mach_port_t arcade_register_t; typedef mach_port_t ipc_eventlink_t; typedef mach_port_t eventlink_port_pair_t[2]; typedef mach_port_t suid_cred_t; typedef mach_port_t task_id_token_t; typedef processor_set_t processor_set_name_t; typedef mach_port_t clock_reply_t; typedef mach_port_t bootstrap_t; typedef mach_port_t mem_entry_name_port_t; typedef mach_port_t exception_handler_t; typedef exception_handler_t *exception_handler_array_t; typedef mach_port_t vm_task_entry_t; typedef mach_port_t io_master_t; typedef mach_port_t UNDServerRef; typedef mach_port_t mach_eventlink_t; typedef ipc_info_port_t exception_handler_info_t; typedef task_t *task_array_t; typedef thread_t *thread_array_t; typedef processor_set_t *processor_set_array_t; typedef processor_set_t *processor_set_name_array_t; typedef processor_t *processor_array_t; typedef thread_act_t *thread_act_array_t; typedef ledger_t *ledger_array_t; typedef task_t task_port_t; typedef task_array_t task_port_array_t; typedef thread_t thread_port_t; typedef thread_array_t thread_port_array_t; typedef ipc_space_t ipc_space_port_t; typedef host_t host_name_t; typedef host_t host_name_port_t; typedef processor_set_t processor_set_port_t; typedef processor_set_t processor_set_name_port_t; typedef processor_set_array_t processor_set_name_port_array_t; typedef processor_set_t processor_set_control_port_t; typedef processor_t processor_port_t; typedef processor_array_t processor_port_array_t; typedef thread_act_t thread_act_port_t; typedef thread_act_array_t thread_act_port_array_t; typedef semaphore_t semaphore_port_t; typedef lock_set_t lock_set_port_t; typedef ledger_t ledger_port_t; typedef ledger_array_t ledger_port_array_t; typedef alarm_t alarm_port_t; typedef clock_serv_t clock_serv_port_t; typedef clock_ctrl_t clock_ctrl_port_t; typedef exception_handler_t exception_port_t; typedef exception_handler_array_t exception_port_arrary_t; typedef char vfs_path_t[4096]; typedef char nspace_path_t[1024]; typedef char nspace_name_t[1024]; typedef char suid_cred_path_t[1024]; typedef uint32_t suid_cred_uid_t; typedef unsigned int mach_task_flavor_t; typedef unsigned int mach_thread_flavor_t; typedef natural_t ledger_item_t; typedef int64_t ledger_amount_t; typedef mach_vm_offset_t *emulation_vector_t; typedef char *user_subsystem_t; typedef char *labelstr_t; typedef struct { unsigned char mig_vers; unsigned char if_vers; unsigned char reserved1; unsigned char mig_encoding; unsigned char int_rep; unsigned char char_rep; unsigned char float_rep; unsigned char reserved2; } NDR_record_t; extern NDR_record_t NDR_record; typedef mach_port_t notify_port_t; typedef struct { mach_msg_header_t not_header; NDR_record_t NDR; mach_port_name_t not_port; mach_msg_format_0_trailer_t trailer; } mach_port_deleted_notification_t; typedef struct { mach_msg_header_t not_header; NDR_record_t NDR; mach_port_name_t not_port; mach_msg_format_0_trailer_t trailer; } mach_send_possible_notification_t; typedef struct { mach_msg_header_t not_header; mach_msg_body_t not_body; mach_msg_port_descriptor_t not_port; mach_msg_format_0_trailer_t trailer; } mach_port_destroyed_notification_t; typedef struct { mach_msg_header_t not_header; NDR_record_t NDR; mach_msg_type_number_t not_count; mach_msg_format_0_trailer_t trailer; } mach_no_senders_notification_t; typedef struct { mach_msg_header_t not_header; mach_msg_format_0_trailer_t trailer; } mach_send_once_notification_t; typedef struct { mach_msg_header_t not_header; NDR_record_t NDR; mach_port_name_t not_port; mach_msg_format_0_trailer_t trailer; } mach_dead_name_notification_t; typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); typedef mig_stub_routine_t mig_routine_t; typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP); typedef kern_return_t (*mig_impl_routine_t)(void); typedef mach_msg_type_descriptor_t routine_arg_descriptor; typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t; typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t; struct routine_descriptor { mig_impl_routine_t impl_routine; mig_stub_routine_t stub_routine; unsigned int argc; unsigned int descr_count; routine_arg_descriptor_t arg_descr; unsigned int max_reply_msg; }; typedef struct routine_descriptor *routine_descriptor_t; typedef struct routine_descriptor mig_routine_descriptor; typedef mig_routine_descriptor *mig_routine_descriptor_t; typedef struct mig_subsystem { mig_server_routine_t server; mach_msg_id_t start; mach_msg_id_t end; mach_msg_size_t maxsize; vm_address_t reserved; mig_routine_descriptor routine[1]; } *mig_subsystem_t; typedef struct mig_symtab { char *ms_routine_name; int ms_routine_number; void (*ms_routine)(void); } mig_symtab_t; extern "C" { extern mach_port_t mig_get_reply_port(void); extern void mig_dealloc_reply_port(mach_port_t reply_port); extern void mig_put_reply_port(mach_port_t reply_port); extern int mig_strncpy(char *dest, const char *src, int len); extern int mig_strncpy_zerofill(char *dest, const char *src, int len); extern void mig_allocate(vm_address_t *, vm_size_t); extern void mig_deallocate(vm_address_t, vm_size_t); } #pragma pack(4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } mig_reply_error_t; #pragma pack() extern "C" { static __inline__ void __NDR_convert__mig_reply_error_t(__attribute__((__unused__)) mig_reply_error_t *x) { } } extern "C" { extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); } extern "C" { extern kern_return_t clock_set_time ( clock_ctrl_t clock_ctrl, mach_timespec_t new_time ); extern kern_return_t clock_set_attributes ( clock_ctrl_t clock_ctrl, clock_flavor_t flavor, clock_attr_t clock_attr, mach_msg_type_number_t clock_attrCnt ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_timespec_t new_time; } __Request__clock_set_time_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; clock_flavor_t flavor; mach_msg_type_number_t clock_attrCnt; int clock_attr[1]; } __Request__clock_set_attributes_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__clock_priv_subsystem { __Request__clock_set_time_t Request_clock_set_time; __Request__clock_set_attributes_t Request_clock_set_attributes; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__clock_set_time_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__clock_set_attributes_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__clock_priv_subsystem { __Reply__clock_set_time_t Reply_clock_set_time; __Reply__clock_set_attributes_t Reply_clock_set_attributes; }; #pragma pack(4) typedef struct mach_vm_info_region { mach_vm_offset_t vir_start; mach_vm_offset_t vir_end; mach_vm_offset_t vir_object; memory_object_offset_t vir_offset; boolean_t vir_needs_copy; vm_prot_t vir_protection; vm_prot_t vir_max_protection; vm_inherit_t vir_inheritance; natural_t vir_wired_count; natural_t vir_user_wired_count; } mach_vm_info_region_t; typedef struct vm_info_region_64 { natural_t vir_start; natural_t vir_end; natural_t vir_object; memory_object_offset_t vir_offset; boolean_t vir_needs_copy; vm_prot_t vir_protection; vm_prot_t vir_max_protection; vm_inherit_t vir_inheritance; natural_t vir_wired_count; natural_t vir_user_wired_count; } vm_info_region_64_t; typedef struct vm_info_region { natural_t vir_start; natural_t vir_end; natural_t vir_object; natural_t vir_offset; boolean_t vir_needs_copy; vm_prot_t vir_protection; vm_prot_t vir_max_protection; vm_inherit_t vir_inheritance; natural_t vir_wired_count; natural_t vir_user_wired_count; } vm_info_region_t; typedef struct vm_info_object { natural_t vio_object; natural_t vio_size; unsigned int vio_ref_count; unsigned int vio_resident_page_count; unsigned int vio_absent_count; natural_t vio_copy; natural_t vio_shadow; natural_t vio_shadow_offset; natural_t vio_paging_offset; memory_object_copy_strategy_t vio_copy_strategy; vm_offset_t vio_last_alloc; unsigned int vio_paging_in_progress; boolean_t vio_pager_created; boolean_t vio_pager_initialized; boolean_t vio_pager_ready; boolean_t vio_can_persist; boolean_t vio_internal; boolean_t vio_temporary; boolean_t vio_alive; boolean_t vio_purgable; boolean_t vio_purgable_volatile; } vm_info_object_t; typedef vm_info_object_t *vm_info_object_array_t; #pragma pack() typedef struct zone_name { char zn_name[80]; } zone_name_t; typedef zone_name_t *zone_name_array_t; typedef struct zone_info { integer_t zi_count; vm_size_t zi_cur_size; vm_size_t zi_max_size; vm_size_t zi_elem_size; vm_size_t zi_alloc_size; integer_t zi_pageable; integer_t zi_sleepable; integer_t zi_exhaustible; integer_t zi_collectable; } zone_info_t; typedef zone_info_t *zone_info_array_t; typedef struct mach_zone_name { char mzn_name[80]; } mach_zone_name_t; typedef mach_zone_name_t *mach_zone_name_array_t; typedef struct mach_zone_info_data { uint64_t mzi_count; uint64_t mzi_cur_size; uint64_t mzi_max_size; uint64_t mzi_elem_size; uint64_t mzi_alloc_size; uint64_t mzi_sum_size; uint64_t mzi_exhaustible; uint64_t mzi_collectable; } mach_zone_info_t; typedef mach_zone_info_t *mach_zone_info_array_t; typedef struct task_zone_info_data { uint64_t tzi_count; uint64_t tzi_cur_size; uint64_t tzi_max_size; uint64_t tzi_elem_size; uint64_t tzi_alloc_size; uint64_t tzi_sum_size; uint64_t tzi_exhaustible; uint64_t tzi_collectable; uint64_t tzi_caller_acct; uint64_t tzi_task_alloc; uint64_t tzi_task_free; } task_zone_info_t; typedef task_zone_info_t *task_zone_info_array_t; typedef struct mach_memory_info { uint64_t flags; uint64_t site; uint64_t size; uint64_t free; uint64_t largest; uint64_t collectable_bytes; uint64_t mapped; uint64_t peak; uint16_t tag; uint16_t zone; uint16_t _resvA[2]; uint64_t _resv[3]; char name[80]; } mach_memory_info_t; typedef mach_memory_info_t *mach_memory_info_array_t; typedef struct zone_btrecord { uint32_t ref_count; uint32_t operation_type; uint64_t bt[15]; } zone_btrecord_t; typedef zone_btrecord_t *zone_btrecord_array_t; typedef vm_offset_t *page_address_array_t; typedef struct hash_info_bucket { natural_t hib_count; } hash_info_bucket_t; typedef hash_info_bucket_t *hash_info_bucket_array_t; typedef struct lockgroup_info { char lockgroup_name[64]; uint64_t lockgroup_attr; uint64_t lock_spin_cnt; uint64_t lock_spin_util_cnt; uint64_t lock_spin_held_cnt; uint64_t lock_spin_miss_cnt; uint64_t lock_spin_held_max; uint64_t lock_spin_held_cum; uint64_t lock_mtx_cnt; uint64_t lock_mtx_util_cnt; uint64_t lock_mtx_held_cnt; uint64_t lock_mtx_miss_cnt; uint64_t lock_mtx_wait_cnt; uint64_t lock_mtx_held_max; uint64_t lock_mtx_held_cum; uint64_t lock_mtx_wait_max; uint64_t lock_mtx_wait_cum; uint64_t lock_rw_cnt; uint64_t lock_rw_util_cnt; uint64_t lock_rw_held_cnt; uint64_t lock_rw_miss_cnt; uint64_t lock_rw_wait_cnt; uint64_t lock_rw_held_max; uint64_t lock_rw_held_cum; uint64_t lock_rw_wait_max; uint64_t lock_rw_wait_cum; } lockgroup_info_t; typedef lockgroup_info_t *lockgroup_info_array_t; typedef char symtab_name_t[32]; struct mach_core_details { uint64_t gzip_offset; uint64_t gzip_length; char core_name[16]; }; struct mach_core_fileheader { uint64_t signature; uint64_t log_offset; uint64_t log_length; uint64_t num_files; struct mach_core_details files[16]; }; struct mach_core_details_v2 { uint64_t flags; uint64_t offset; uint64_t length; char core_name[16]; }; struct mach_core_fileheader_base { uint64_t signature; uint32_t version; }; struct mach_core_fileheader_v2 { uint64_t signature; uint32_t version; uint64_t flags; uint64_t pub_key_offset; uint16_t pub_key_length; uint64_t log_offset; uint64_t log_length; uint64_t num_files; struct mach_core_details_v2 files[]; }; typedef char kobject_description_t[512]; extern "C" { extern kern_return_t host_get_boot_info ( host_priv_t host_priv, kernel_boot_info_t boot_info ); extern kern_return_t host_reboot ( host_priv_t host_priv, int options ); extern kern_return_t host_priv_statistics ( host_priv_t host_priv, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt ); extern kern_return_t host_default_memory_manager ( host_priv_t host_priv, memory_object_default_t *default_manager, memory_object_cluster_size_t cluster_size ); extern kern_return_t vm_wire ( host_priv_t host_priv, vm_map_t task, vm_address_t address, vm_size_t size, vm_prot_t desired_access ); extern kern_return_t thread_wire ( host_priv_t host_priv, thread_act_t thread, boolean_t wired ); extern kern_return_t vm_allocate_cpm ( host_priv_t host_priv, vm_map_t task, vm_address_t *address, vm_size_t size, int flags ); extern kern_return_t host_processors ( host_priv_t host_priv, processor_array_t *out_processor_list, mach_msg_type_number_t *out_processor_listCnt ); extern kern_return_t host_get_clock_control ( host_priv_t host_priv, clock_id_t clock_id, clock_ctrl_t *clock_ctrl ); extern kern_return_t kmod_create ( host_priv_t host_priv, vm_address_t info, kmod_t *module ); extern kern_return_t kmod_destroy ( host_priv_t host_priv, kmod_t module ); extern kern_return_t kmod_control ( host_priv_t host_priv, kmod_t module, kmod_control_flavor_t flavor, kmod_args_t *data, mach_msg_type_number_t *dataCnt ); extern kern_return_t host_get_special_port ( host_priv_t host_priv, int node, int which, mach_port_t *port ); extern kern_return_t host_set_special_port ( host_priv_t host_priv, int which, mach_port_t port ); extern kern_return_t host_set_exception_ports ( host_priv_t host_priv, exception_mask_t exception_mask, mach_port_t new_port, exception_behavior_t behavior, thread_state_flavor_t new_flavor ); extern kern_return_t host_get_exception_ports ( host_priv_t host_priv, exception_mask_t exception_mask, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_array_t old_handlers, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern kern_return_t host_swap_exception_ports ( host_priv_t host_priv, exception_mask_t exception_mask, mach_port_t new_port, exception_behavior_t behavior, thread_state_flavor_t new_flavor, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_array_t old_handlerss, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern kern_return_t mach_vm_wire ( host_priv_t host_priv, vm_map_t task, mach_vm_address_t address, mach_vm_size_t size, vm_prot_t desired_access ); extern kern_return_t host_processor_sets ( host_priv_t host_priv, processor_set_name_array_t *processor_sets, mach_msg_type_number_t *processor_setsCnt ); extern kern_return_t host_processor_set_priv ( host_priv_t host_priv, processor_set_name_t set_name, processor_set_t *set ); extern kern_return_t host_set_UNDServer ( host_priv_t host, UNDServerRef server ); extern kern_return_t host_get_UNDServer ( host_priv_t host, UNDServerRef *server ); extern kern_return_t kext_request ( host_priv_t host_priv, uint32_t user_log_flags, vm_offset_t request_data, mach_msg_type_number_t request_dataCnt, vm_offset_t *response_data, mach_msg_type_number_t *response_dataCnt, vm_offset_t *log_data, mach_msg_type_number_t *log_dataCnt, kern_return_t *op_result ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_get_boot_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int options; } __Request__host_reboot_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; host_flavor_t flavor; mach_msg_type_number_t host_info_outCnt; } __Request__host_priv_statistics_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t default_manager; NDR_record_t NDR; memory_object_cluster_size_t cluster_size; } __Request__host_default_memory_manager_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t task; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_prot_t desired_access; } __Request__vm_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t thread; NDR_record_t NDR; boolean_t wired; } __Request__thread_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t task; NDR_record_t NDR; vm_address_t address; vm_size_t size; int flags; } __Request__vm_allocate_cpm_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_processors_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; clock_id_t clock_id; } __Request__host_get_clock_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t info; } __Request__kmod_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kmod_t module; } __Request__kmod_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t data; NDR_record_t NDR; kmod_t module; kmod_control_flavor_t flavor; mach_msg_type_number_t dataCnt; } __Request__kmod_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int node; int which; } __Request__host_get_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t port; NDR_record_t NDR; int which; } __Request__host_set_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_port; NDR_record_t NDR; exception_mask_t exception_mask; exception_behavior_t behavior; thread_state_flavor_t new_flavor; } __Request__host_set_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; exception_mask_t exception_mask; } __Request__host_get_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_port; NDR_record_t NDR; exception_mask_t exception_mask; exception_behavior_t behavior; thread_state_flavor_t new_flavor; } __Request__host_swap_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t task; NDR_record_t NDR; mach_vm_address_t address; mach_vm_size_t size; vm_prot_t desired_access; } __Request__mach_vm_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_processor_sets_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t set_name; } __Request__host_processor_set_priv_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t server; } __Request__host_set_UNDServer_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_get_UNDServer_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t request_data; NDR_record_t NDR; uint32_t user_log_flags; mach_msg_type_number_t request_dataCnt; } __Request__kext_request_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__host_priv_subsystem { __Request__host_get_boot_info_t Request_host_get_boot_info; __Request__host_reboot_t Request_host_reboot; __Request__host_priv_statistics_t Request_host_priv_statistics; __Request__host_default_memory_manager_t Request_host_default_memory_manager; __Request__vm_wire_t Request_vm_wire; __Request__thread_wire_t Request_thread_wire; __Request__vm_allocate_cpm_t Request_vm_allocate_cpm; __Request__host_processors_t Request_host_processors; __Request__host_get_clock_control_t Request_host_get_clock_control; __Request__kmod_create_t Request_kmod_create; __Request__kmod_destroy_t Request_kmod_destroy; __Request__kmod_control_t Request_kmod_control; __Request__host_get_special_port_t Request_host_get_special_port; __Request__host_set_special_port_t Request_host_set_special_port; __Request__host_set_exception_ports_t Request_host_set_exception_ports; __Request__host_get_exception_ports_t Request_host_get_exception_ports; __Request__host_swap_exception_ports_t Request_host_swap_exception_ports; __Request__mach_vm_wire_t Request_mach_vm_wire; __Request__host_processor_sets_t Request_host_processor_sets; __Request__host_processor_set_priv_t Request_host_processor_set_priv; __Request__host_set_UNDServer_t Request_host_set_UNDServer; __Request__host_get_UNDServer_t Request_host_get_UNDServer; __Request__kext_request_t Request_kext_request; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t boot_infoOffset; mach_msg_type_number_t boot_infoCnt; char boot_info[4096]; } __Reply__host_get_boot_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_reboot_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t host_info_outCnt; integer_t host_info_out[68]; } __Reply__host_priv_statistics_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t default_manager; } __Reply__host_default_memory_manager_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t address; } __Reply__vm_allocate_cpm_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t out_processor_list; NDR_record_t NDR; mach_msg_type_number_t out_processor_listCnt; } __Reply__host_processors_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t clock_ctrl; } __Reply__host_get_clock_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; kmod_t module; } __Reply__kmod_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__kmod_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t data; NDR_record_t NDR; mach_msg_type_number_t dataCnt; } __Reply__kmod_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t port; } __Reply__host_get_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_set_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_set_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_handlers[32]; NDR_record_t NDR; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__host_get_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_handlerss[32]; NDR_record_t NDR; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__host_swap_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_vm_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t processor_sets; NDR_record_t NDR; mach_msg_type_number_t processor_setsCnt; } __Reply__host_processor_sets_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t set; } __Reply__host_processor_set_priv_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_set_UNDServer_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t server; } __Reply__host_get_UNDServer_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t response_data; mach_msg_ool_descriptor_t log_data; NDR_record_t NDR; mach_msg_type_number_t response_dataCnt; mach_msg_type_number_t log_dataCnt; kern_return_t op_result; } __Reply__kext_request_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__host_priv_subsystem { __Reply__host_get_boot_info_t Reply_host_get_boot_info; __Reply__host_reboot_t Reply_host_reboot; __Reply__host_priv_statistics_t Reply_host_priv_statistics; __Reply__host_default_memory_manager_t Reply_host_default_memory_manager; __Reply__vm_wire_t Reply_vm_wire; __Reply__thread_wire_t Reply_thread_wire; __Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; __Reply__host_processors_t Reply_host_processors; __Reply__host_get_clock_control_t Reply_host_get_clock_control; __Reply__kmod_create_t Reply_kmod_create; __Reply__kmod_destroy_t Reply_kmod_destroy; __Reply__kmod_control_t Reply_kmod_control; __Reply__host_get_special_port_t Reply_host_get_special_port; __Reply__host_set_special_port_t Reply_host_set_special_port; __Reply__host_set_exception_ports_t Reply_host_set_exception_ports; __Reply__host_get_exception_ports_t Reply_host_get_exception_ports; __Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; __Reply__mach_vm_wire_t Reply_mach_vm_wire; __Reply__host_processor_sets_t Reply_host_processor_sets; __Reply__host_processor_set_priv_t Reply_host_processor_set_priv; __Reply__host_set_UNDServer_t Reply_host_set_UNDServer; __Reply__host_get_UNDServer_t Reply_host_get_UNDServer; __Reply__kext_request_t Reply_kext_request; }; extern "C" { extern kern_return_t host_security_create_task_token ( host_security_t host_security, task_t parent_task, security_token_t sec_token, audit_token_t audit_token, host_t host, ledger_array_t ledgers, mach_msg_type_number_t ledgersCnt, boolean_t inherit_memory, task_t *child_task ); extern kern_return_t host_security_set_task_token ( host_security_t host_security, task_t target_task, security_token_t sec_token, audit_token_t audit_token, host_t host ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t parent_task; mach_msg_port_descriptor_t host; mach_msg_ool_ports_descriptor_t ledgers; NDR_record_t NDR; security_token_t sec_token; audit_token_t audit_token; mach_msg_type_number_t ledgersCnt; boolean_t inherit_memory; } __Request__host_security_create_task_token_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t target_task; mach_msg_port_descriptor_t host; NDR_record_t NDR; security_token_t sec_token; audit_token_t audit_token; } __Request__host_security_set_task_token_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__host_security_subsystem { __Request__host_security_create_task_token_t Request_host_security_create_task_token; __Request__host_security_set_task_token_t Request_host_security_set_task_token; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t child_task; } __Reply__host_security_create_task_token_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_security_set_task_token_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__host_security_subsystem { __Reply__host_security_create_task_token_t Reply_host_security_create_task_token; __Reply__host_security_set_task_token_t Reply_host_security_set_task_token; }; extern "C" { extern kern_return_t lock_acquire ( lock_set_t lock_set, int lock_id ); extern kern_return_t lock_release ( lock_set_t lock_set, int lock_id ); extern kern_return_t lock_try ( lock_set_t lock_set, int lock_id ); extern kern_return_t lock_make_stable ( lock_set_t lock_set, int lock_id ); extern kern_return_t lock_handoff ( lock_set_t lock_set, int lock_id ); extern kern_return_t lock_handoff_accept ( lock_set_t lock_set, int lock_id ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int lock_id; } __Request__lock_acquire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int lock_id; } __Request__lock_release_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int lock_id; } __Request__lock_try_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int lock_id; } __Request__lock_make_stable_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int lock_id; } __Request__lock_handoff_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int lock_id; } __Request__lock_handoff_accept_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__lock_set_subsystem { __Request__lock_acquire_t Request_lock_acquire; __Request__lock_release_t Request_lock_release; __Request__lock_try_t Request_lock_try; __Request__lock_make_stable_t Request_lock_make_stable; __Request__lock_handoff_t Request_lock_handoff; __Request__lock_handoff_accept_t Request_lock_handoff_accept; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_acquire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_release_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_try_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_make_stable_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_handoff_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_handoff_accept_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__lock_set_subsystem { __Reply__lock_acquire_t Reply_lock_acquire; __Reply__lock_release_t Reply_lock_release; __Reply__lock_try_t Reply_lock_try; __Reply__lock_make_stable_t Reply_lock_make_stable; __Reply__lock_handoff_t Reply_lock_handoff; __Reply__lock_handoff_accept_t Reply_lock_handoff_accept; }; extern "C" { extern kern_return_t processor_start ( processor_t processor ); extern kern_return_t processor_exit ( processor_t processor ); extern kern_return_t processor_info ( processor_t processor, processor_flavor_t flavor, host_t *host, processor_info_t processor_info_out, mach_msg_type_number_t *processor_info_outCnt ); extern kern_return_t processor_control ( processor_t processor, processor_info_t processor_cmd, mach_msg_type_number_t processor_cmdCnt ); extern kern_return_t processor_assign ( processor_t processor, processor_set_t new_set, boolean_t wait ); extern kern_return_t processor_get_assignment ( processor_t processor, processor_set_name_t *assigned_set ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_start_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_exit_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; processor_flavor_t flavor; mach_msg_type_number_t processor_info_outCnt; } __Request__processor_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_msg_type_number_t processor_cmdCnt; integer_t processor_cmd[20]; } __Request__processor_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_set; NDR_record_t NDR; boolean_t wait; } __Request__processor_assign_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_get_assignment_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__processor_subsystem { __Request__processor_start_t Request_processor_start; __Request__processor_exit_t Request_processor_exit; __Request__processor_info_t Request_processor_info; __Request__processor_control_t Request_processor_control; __Request__processor_assign_t Request_processor_assign; __Request__processor_get_assignment_t Request_processor_get_assignment; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_start_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_exit_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t host; NDR_record_t NDR; mach_msg_type_number_t processor_info_outCnt; integer_t processor_info_out[20]; } __Reply__processor_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_assign_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t assigned_set; } __Reply__processor_get_assignment_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__processor_subsystem { __Reply__processor_start_t Reply_processor_start; __Reply__processor_exit_t Reply_processor_exit; __Reply__processor_info_t Reply_processor_info; __Reply__processor_control_t Reply_processor_control; __Reply__processor_assign_t Reply_processor_assign; __Reply__processor_get_assignment_t Reply_processor_get_assignment; }; extern "C" { extern kern_return_t processor_set_statistics ( processor_set_name_t pset, processor_set_flavor_t flavor, processor_set_info_t info_out, mach_msg_type_number_t *info_outCnt ); extern kern_return_t processor_set_destroy ( processor_set_t set ); extern kern_return_t processor_set_max_priority ( processor_set_t processor_set, int max_priority, boolean_t change_threads ); extern kern_return_t processor_set_policy_enable ( processor_set_t processor_set, int policy ); extern kern_return_t processor_set_policy_disable ( processor_set_t processor_set, int policy, boolean_t change_threads ); extern kern_return_t processor_set_tasks ( processor_set_t processor_set, task_array_t *task_list, mach_msg_type_number_t *task_listCnt ); extern kern_return_t processor_set_threads ( processor_set_t processor_set, thread_act_array_t *thread_list, mach_msg_type_number_t *thread_listCnt ); extern kern_return_t processor_set_policy_control ( processor_set_t pset, processor_set_flavor_t flavor, processor_set_info_t policy_info, mach_msg_type_number_t policy_infoCnt, boolean_t change ); extern kern_return_t processor_set_stack_usage ( processor_set_t pset, unsigned *ltotal, vm_size_t *space, vm_size_t *resident, vm_size_t *maxusage, vm_offset_t *maxstack ); extern kern_return_t processor_set_info ( processor_set_name_t set_name, int flavor, host_t *host, processor_set_info_t info_out, mach_msg_type_number_t *info_outCnt ); extern kern_return_t processor_set_tasks_with_flavor ( processor_set_t processor_set, mach_task_flavor_t flavor, task_array_t *task_list, mach_msg_type_number_t *task_listCnt ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; processor_set_flavor_t flavor; mach_msg_type_number_t info_outCnt; } __Request__processor_set_statistics_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_set_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int max_priority; boolean_t change_threads; } __Request__processor_set_max_priority_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int policy; } __Request__processor_set_policy_enable_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int policy; boolean_t change_threads; } __Request__processor_set_policy_disable_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_set_tasks_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_set_threads_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; processor_set_flavor_t flavor; mach_msg_type_number_t policy_infoCnt; integer_t policy_info[5]; boolean_t change; } __Request__processor_set_policy_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_set_stack_usage_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int flavor; mach_msg_type_number_t info_outCnt; } __Request__processor_set_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_task_flavor_t flavor; } __Request__processor_set_tasks_with_flavor_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__processor_set_subsystem { __Request__processor_set_statistics_t Request_processor_set_statistics; __Request__processor_set_destroy_t Request_processor_set_destroy; __Request__processor_set_max_priority_t Request_processor_set_max_priority; __Request__processor_set_policy_enable_t Request_processor_set_policy_enable; __Request__processor_set_policy_disable_t Request_processor_set_policy_disable; __Request__processor_set_tasks_t Request_processor_set_tasks; __Request__processor_set_threads_t Request_processor_set_threads; __Request__processor_set_policy_control_t Request_processor_set_policy_control; __Request__processor_set_stack_usage_t Request_processor_set_stack_usage; __Request__processor_set_info_t Request_processor_set_info; __Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t info_outCnt; integer_t info_out[5]; } __Reply__processor_set_statistics_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_set_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_set_max_priority_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_set_policy_enable_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_set_policy_disable_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t task_list; NDR_record_t NDR; mach_msg_type_number_t task_listCnt; } __Reply__processor_set_tasks_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t thread_list; NDR_record_t NDR; mach_msg_type_number_t thread_listCnt; } __Reply__processor_set_threads_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__processor_set_policy_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; unsigned ltotal; vm_size_t space; vm_size_t resident; vm_size_t maxusage; vm_offset_t maxstack; } __Reply__processor_set_stack_usage_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t host; NDR_record_t NDR; mach_msg_type_number_t info_outCnt; integer_t info_out[5]; } __Reply__processor_set_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t task_list; NDR_record_t NDR; mach_msg_type_number_t task_listCnt; } __Reply__processor_set_tasks_with_flavor_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__processor_set_subsystem { __Reply__processor_set_statistics_t Reply_processor_set_statistics; __Reply__processor_set_destroy_t Reply_processor_set_destroy; __Reply__processor_set_max_priority_t Reply_processor_set_max_priority; __Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable; __Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable; __Reply__processor_set_tasks_t Reply_processor_set_tasks; __Reply__processor_set_threads_t Reply_processor_set_threads; __Reply__processor_set_policy_control_t Reply_processor_set_policy_control; __Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage; __Reply__processor_set_info_t Reply_processor_set_info; __Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor; }; typedef int sync_policy_t; extern "C" { extern kern_return_t semaphore_signal(semaphore_t semaphore); extern kern_return_t semaphore_signal_all(semaphore_t semaphore); extern kern_return_t semaphore_wait(semaphore_t semaphore); extern kern_return_t semaphore_timedwait(semaphore_t semaphore, mach_timespec_t wait_time); extern kern_return_t semaphore_timedwait_signal(semaphore_t wait_semaphore, semaphore_t signal_semaphore, mach_timespec_t wait_time); extern kern_return_t semaphore_wait_signal(semaphore_t wait_semaphore, semaphore_t signal_semaphore); extern kern_return_t semaphore_signal_thread(semaphore_t semaphore, thread_t thread); } extern "C" { extern kern_return_t task_create ( task_t target_task, ledger_array_t ledgers, mach_msg_type_number_t ledgersCnt, boolean_t inherit_memory, task_t *child_task ); extern kern_return_t task_terminate ( task_t target_task ); extern kern_return_t task_threads ( task_inspect_t target_task, thread_act_array_t *act_list, mach_msg_type_number_t *act_listCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t mach_ports_register ( task_t target_task, mach_port_array_t init_port_set, mach_msg_type_number_t init_port_setCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t mach_ports_lookup ( task_t target_task, mach_port_array_t *init_port_set, mach_msg_type_number_t *init_port_setCnt ); extern kern_return_t task_info ( task_name_t target_task, task_flavor_t flavor, task_info_t task_info_out, mach_msg_type_number_t *task_info_outCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_info ( task_t target_task, task_flavor_t flavor, task_info_t task_info_in, mach_msg_type_number_t task_info_inCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_suspend ( task_read_t target_task ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_resume ( task_read_t target_task ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_get_special_port ( task_inspect_t task, int which_port, mach_port_t *special_port ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_special_port ( task_t task, int which_port, mach_port_t special_port ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_create ( task_t parent_task, thread_act_t *child_act ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_create_running ( task_t parent_task, thread_state_flavor_t flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt, thread_act_t *child_act ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_exception_ports ( task_t task, exception_mask_t exception_mask, mach_port_t new_port, exception_behavior_t behavior, thread_state_flavor_t new_flavor ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_get_exception_ports ( task_t task, exception_mask_t exception_mask, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_array_t old_handlers, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_swap_exception_ports ( task_t task, exception_mask_t exception_mask, mach_port_t new_port, exception_behavior_t behavior, thread_state_flavor_t new_flavor, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_array_t old_handlers, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern kern_return_t lock_set_create ( task_t task, lock_set_t *new_lock_set, int n_ulocks, int policy ); extern kern_return_t lock_set_destroy ( task_t task, lock_set_t lock_set ); extern kern_return_t semaphore_create ( task_t task, semaphore_t *semaphore, int policy, int value ); extern kern_return_t semaphore_destroy ( task_t task, semaphore_t semaphore ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_policy_set ( task_policy_set_t task, task_policy_flavor_t flavor, task_policy_t policy_info, mach_msg_type_number_t policy_infoCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_policy_get ( task_policy_get_t task, task_policy_flavor_t flavor, task_policy_t policy_info, mach_msg_type_number_t *policy_infoCnt, boolean_t *get_default ); extern kern_return_t task_sample ( task_t task, mach_port_t reply ); extern kern_return_t task_policy ( task_t task, policy_t policy, policy_base_t base, mach_msg_type_number_t baseCnt, boolean_t set_limit, boolean_t change ); extern kern_return_t task_set_emulation ( task_t target_port, vm_address_t routine_entry_pt, int routine_number ); extern kern_return_t task_get_emulation_vector ( task_t task, int *vector_start, emulation_vector_t *emulation_vector, mach_msg_type_number_t *emulation_vectorCnt ); extern kern_return_t task_set_emulation_vector ( task_t task, int vector_start, emulation_vector_t emulation_vector, mach_msg_type_number_t emulation_vectorCnt ); extern kern_return_t task_set_ras_pc ( task_t target_task, vm_address_t basepc, vm_address_t boundspc ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_zone_info ( task_inspect_t target_task, mach_zone_name_array_t *names, mach_msg_type_number_t *namesCnt, task_zone_info_array_t *info, mach_msg_type_number_t *infoCnt ); extern kern_return_t task_assign ( task_t task, processor_set_t new_set, boolean_t assign_threads ); extern kern_return_t task_assign_default ( task_t task, boolean_t assign_threads ); extern kern_return_t task_get_assignment ( task_inspect_t task, processor_set_name_t *assigned_set ); extern kern_return_t task_set_policy ( task_t task, processor_set_t pset, policy_t policy, policy_base_t base, mach_msg_type_number_t baseCnt, policy_limit_t limit, mach_msg_type_number_t limitCnt, boolean_t change ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_get_state ( task_read_t task, thread_state_flavor_t flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_state ( task_t task, thread_state_flavor_t flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_phys_footprint_limit ( task_t task, int new_limit, int *old_limit ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_suspend2 ( task_read_t target_task, task_suspension_token_t *suspend_token ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_resume2 ( task_suspension_token_t suspend_token ); extern kern_return_t task_purgable_info ( task_inspect_t task, task_purgable_info_t *stats ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_get_mach_voucher ( task_read_t task, mach_voucher_selector_t which, ipc_voucher_t *voucher ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_mach_voucher ( task_t task, ipc_voucher_t voucher ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_swap_mach_voucher ( task_t task, ipc_voucher_t new_voucher, ipc_voucher_t *old_voucher ); extern kern_return_t task_generate_corpse ( task_read_t task, mach_port_t *corpse_task_port ); extern kern_return_t task_map_corpse_info ( task_t task, task_read_t corspe_task, vm_address_t *kcd_addr_begin, uint32_t *kcd_size ); extern kern_return_t task_register_dyld_image_infos ( task_t task, dyld_kernel_image_info_array_t dyld_images, mach_msg_type_number_t dyld_imagesCnt ); extern kern_return_t task_unregister_dyld_image_infos ( task_t task, dyld_kernel_image_info_array_t dyld_images, mach_msg_type_number_t dyld_imagesCnt ); extern kern_return_t task_get_dyld_image_infos ( task_read_t task, dyld_kernel_image_info_array_t *dyld_images, mach_msg_type_number_t *dyld_imagesCnt ); extern kern_return_t task_register_dyld_shared_cache_image_info ( task_t task, dyld_kernel_image_info_t dyld_cache_image, boolean_t no_cache, boolean_t private_cache ); extern kern_return_t task_register_dyld_set_dyld_state ( task_t task, uint8_t dyld_state ); extern kern_return_t task_register_dyld_get_process_state ( task_t task, dyld_kernel_process_info_t *dyld_process_state ); extern kern_return_t task_map_corpse_info_64 ( task_t task, task_read_t corspe_task, mach_vm_address_t *kcd_addr_begin, mach_vm_size_t *kcd_size ); extern kern_return_t task_inspect ( task_inspect_t task, task_inspect_flavor_t flavor, task_inspect_info_t info_out, mach_msg_type_number_t *info_outCnt ); extern kern_return_t task_get_exc_guard_behavior ( task_inspect_t task, task_exc_guard_behavior_t *behavior ); extern kern_return_t task_set_exc_guard_behavior ( task_t task, task_exc_guard_behavior_t behavior ); extern kern_return_t task_create_suid_cred ( task_t task, suid_cred_path_t path, suid_cred_uid_t uid, suid_cred_t *delegation ); extern kern_return_t task_dyld_process_info_notify_register ( task_read_t target_task, mach_port_t notify ); extern kern_return_t task_create_identity_token ( task_t task, task_id_token_t *token ); extern kern_return_t task_identity_token_get_task_port ( task_id_token_t token, task_flavor_t flavor, mach_port_t *task_port ); extern kern_return_t task_dyld_process_info_notify_deregister ( task_read_t target_task, mach_port_name_t notify ); extern kern_return_t task_get_exception_ports_info ( mach_port_t port, exception_mask_t exception_mask, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_info_array_t old_handlers_info, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern kern_return_t task_test_sync_upcall ( task_t task, mach_port_t port ); extern kern_return_t task_set_corpse_forking_behavior ( task_t task, task_corpse_forking_behavior_t behavior ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t ledgers; NDR_record_t NDR; mach_msg_type_number_t ledgersCnt; boolean_t inherit_memory; } __Request__task_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_terminate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_threads_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t init_port_set; NDR_record_t NDR; mach_msg_type_number_t init_port_setCnt; } __Request__mach_ports_register_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__mach_ports_lookup_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_flavor_t flavor; mach_msg_type_number_t task_info_outCnt; } __Request__task_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_flavor_t flavor; mach_msg_type_number_t task_info_inCnt; integer_t task_info_in[87]; } __Request__task_set_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_suspend_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_resume_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int which_port; } __Request__task_get_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t special_port; NDR_record_t NDR; int which_port; } __Request__task_set_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_state_flavor_t flavor; mach_msg_type_number_t new_stateCnt; natural_t new_state[1296]; } __Request__thread_create_running_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_port; NDR_record_t NDR; exception_mask_t exception_mask; exception_behavior_t behavior; thread_state_flavor_t new_flavor; } __Request__task_set_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; exception_mask_t exception_mask; } __Request__task_get_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_port; NDR_record_t NDR; exception_mask_t exception_mask; exception_behavior_t behavior; thread_state_flavor_t new_flavor; } __Request__task_swap_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int n_ulocks; int policy; } __Request__lock_set_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t lock_set; } __Request__lock_set_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int policy; int value; } __Request__semaphore_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t semaphore; } __Request__semaphore_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_policy_flavor_t flavor; mach_msg_type_number_t policy_infoCnt; integer_t policy_info[16]; } __Request__task_policy_set_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_policy_flavor_t flavor; mach_msg_type_number_t policy_infoCnt; boolean_t get_default; } __Request__task_policy_get_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t reply; } __Request__task_sample_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; policy_t policy; mach_msg_type_number_t baseCnt; integer_t base[5]; boolean_t set_limit; boolean_t change; } __Request__task_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t routine_entry_pt; int routine_number; } __Request__task_set_emulation_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_get_emulation_vector_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t emulation_vector; NDR_record_t NDR; int vector_start; mach_msg_type_number_t emulation_vectorCnt; } __Request__task_set_emulation_vector_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t basepc; vm_address_t boundspc; } __Request__task_set_ras_pc_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_zone_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_set; NDR_record_t NDR; boolean_t assign_threads; } __Request__task_assign_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; boolean_t assign_threads; } __Request__task_assign_default_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_get_assignment_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t pset; NDR_record_t NDR; policy_t policy; mach_msg_type_number_t baseCnt; integer_t base[5]; mach_msg_type_number_t limitCnt; integer_t limit[1]; boolean_t change; } __Request__task_set_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_state_flavor_t flavor; mach_msg_type_number_t old_stateCnt; } __Request__task_get_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_state_flavor_t flavor; mach_msg_type_number_t new_stateCnt; natural_t new_state[1296]; } __Request__task_set_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int new_limit; } __Request__task_set_phys_footprint_limit_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_suspend2_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_resume2_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_purgable_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_voucher_selector_t which; } __Request__task_get_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t voucher; } __Request__task_set_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_voucher; mach_msg_port_descriptor_t old_voucher; } __Request__task_swap_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_generate_corpse_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t corspe_task; } __Request__task_map_corpse_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t dyld_images; NDR_record_t NDR; mach_msg_type_number_t dyld_imagesCnt; } __Request__task_register_dyld_image_infos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t dyld_images; NDR_record_t NDR; mach_msg_type_number_t dyld_imagesCnt; } __Request__task_unregister_dyld_image_infos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_get_dyld_image_infos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; dyld_kernel_image_info_t dyld_cache_image; boolean_t no_cache; boolean_t private_cache; } __Request__task_register_dyld_shared_cache_image_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; uint8_t dyld_state; char dyld_statePad[3]; } __Request__task_register_dyld_set_dyld_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_register_dyld_get_process_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t corspe_task; } __Request__task_map_corpse_info_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_inspect_flavor_t flavor; mach_msg_type_number_t info_outCnt; } __Request__task_inspect_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_get_exc_guard_behavior_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_exc_guard_behavior_t behavior; } __Request__task_set_exc_guard_behavior_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_msg_type_number_t pathOffset; mach_msg_type_number_t pathCnt; char path[1024]; suid_cred_uid_t uid; } __Request__task_create_suid_cred_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t notify; } __Request__task_dyld_process_info_notify_register_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__task_create_identity_token_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_flavor_t flavor; } __Request__task_identity_token_get_task_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t notify; } __Request__task_dyld_process_info_notify_deregister_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; exception_mask_t exception_mask; } __Request__task_get_exception_ports_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t port; } __Request__task_test_sync_upcall_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; task_corpse_forking_behavior_t behavior; } __Request__task_set_corpse_forking_behavior_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__task_subsystem { __Request__task_create_t Request_task_create; __Request__task_terminate_t Request_task_terminate; __Request__task_threads_t Request_task_threads; __Request__mach_ports_register_t Request_mach_ports_register; __Request__mach_ports_lookup_t Request_mach_ports_lookup; __Request__task_info_t Request_task_info; __Request__task_set_info_t Request_task_set_info; __Request__task_suspend_t Request_task_suspend; __Request__task_resume_t Request_task_resume; __Request__task_get_special_port_t Request_task_get_special_port; __Request__task_set_special_port_t Request_task_set_special_port; __Request__thread_create_t Request_thread_create; __Request__thread_create_running_t Request_thread_create_running; __Request__task_set_exception_ports_t Request_task_set_exception_ports; __Request__task_get_exception_ports_t Request_task_get_exception_ports; __Request__task_swap_exception_ports_t Request_task_swap_exception_ports; __Request__lock_set_create_t Request_lock_set_create; __Request__lock_set_destroy_t Request_lock_set_destroy; __Request__semaphore_create_t Request_semaphore_create; __Request__semaphore_destroy_t Request_semaphore_destroy; __Request__task_policy_set_t Request_task_policy_set; __Request__task_policy_get_t Request_task_policy_get; __Request__task_sample_t Request_task_sample; __Request__task_policy_t Request_task_policy; __Request__task_set_emulation_t Request_task_set_emulation; __Request__task_get_emulation_vector_t Request_task_get_emulation_vector; __Request__task_set_emulation_vector_t Request_task_set_emulation_vector; __Request__task_set_ras_pc_t Request_task_set_ras_pc; __Request__task_zone_info_t Request_task_zone_info; __Request__task_assign_t Request_task_assign; __Request__task_assign_default_t Request_task_assign_default; __Request__task_get_assignment_t Request_task_get_assignment; __Request__task_set_policy_t Request_task_set_policy; __Request__task_get_state_t Request_task_get_state; __Request__task_set_state_t Request_task_set_state; __Request__task_set_phys_footprint_limit_t Request_task_set_phys_footprint_limit; __Request__task_suspend2_t Request_task_suspend2; __Request__task_resume2_t Request_task_resume2; __Request__task_purgable_info_t Request_task_purgable_info; __Request__task_get_mach_voucher_t Request_task_get_mach_voucher; __Request__task_set_mach_voucher_t Request_task_set_mach_voucher; __Request__task_swap_mach_voucher_t Request_task_swap_mach_voucher; __Request__task_generate_corpse_t Request_task_generate_corpse; __Request__task_map_corpse_info_t Request_task_map_corpse_info; __Request__task_register_dyld_image_infos_t Request_task_register_dyld_image_infos; __Request__task_unregister_dyld_image_infos_t Request_task_unregister_dyld_image_infos; __Request__task_get_dyld_image_infos_t Request_task_get_dyld_image_infos; __Request__task_register_dyld_shared_cache_image_info_t Request_task_register_dyld_shared_cache_image_info; __Request__task_register_dyld_set_dyld_state_t Request_task_register_dyld_set_dyld_state; __Request__task_register_dyld_get_process_state_t Request_task_register_dyld_get_process_state; __Request__task_map_corpse_info_64_t Request_task_map_corpse_info_64; __Request__task_inspect_t Request_task_inspect; __Request__task_get_exc_guard_behavior_t Request_task_get_exc_guard_behavior; __Request__task_set_exc_guard_behavior_t Request_task_set_exc_guard_behavior; __Request__task_create_suid_cred_t Request_task_create_suid_cred; __Request__task_dyld_process_info_notify_register_t Request_task_dyld_process_info_notify_register; __Request__task_create_identity_token_t Request_task_create_identity_token; __Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port; __Request__task_dyld_process_info_notify_deregister_t Request_task_dyld_process_info_notify_deregister; __Request__task_get_exception_ports_info_t Request_task_get_exception_ports_info; __Request__task_test_sync_upcall_t Request_task_test_sync_upcall; __Request__task_set_corpse_forking_behavior_t Request_task_set_corpse_forking_behavior; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t child_task; } __Reply__task_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_terminate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t act_list; NDR_record_t NDR; mach_msg_type_number_t act_listCnt; } __Reply__task_threads_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_ports_register_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_ports_descriptor_t init_port_set; NDR_record_t NDR; mach_msg_type_number_t init_port_setCnt; } __Reply__mach_ports_lookup_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t task_info_outCnt; integer_t task_info_out[87]; } __Reply__task_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_suspend_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_resume_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t special_port; } __Reply__task_get_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t child_act; } __Reply__thread_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t child_act; } __Reply__thread_create_running_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_handlers[32]; NDR_record_t NDR; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__task_get_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_handlers[32]; NDR_record_t NDR; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__task_swap_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_lock_set; } __Reply__lock_set_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__lock_set_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t semaphore; } __Reply__semaphore_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__semaphore_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_policy_set_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t policy_infoCnt; integer_t policy_info[16]; boolean_t get_default; } __Reply__task_policy_get_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_sample_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_emulation_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t emulation_vector; NDR_record_t NDR; int vector_start; mach_msg_type_number_t emulation_vectorCnt; } __Reply__task_get_emulation_vector_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_emulation_vector_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_ras_pc_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t names; mach_msg_ool_descriptor_t info; NDR_record_t NDR; mach_msg_type_number_t namesCnt; mach_msg_type_number_t infoCnt; } __Reply__task_zone_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_assign_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_assign_default_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t assigned_set; } __Reply__task_get_assignment_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t old_stateCnt; natural_t old_state[1296]; } __Reply__task_get_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; int old_limit; } __Reply__task_set_phys_footprint_limit_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t suspend_token; } __Reply__task_suspend2_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_resume2_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; task_purgable_info_t stats; } __Reply__task_purgable_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t voucher; } __Reply__task_get_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_voucher; } __Reply__task_swap_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t corpse_task_port; } __Reply__task_generate_corpse_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t kcd_addr_begin; uint32_t kcd_size; } __Reply__task_map_corpse_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_register_dyld_image_infos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_unregister_dyld_image_infos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t dyld_images; NDR_record_t NDR; mach_msg_type_number_t dyld_imagesCnt; } __Reply__task_get_dyld_image_infos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_register_dyld_shared_cache_image_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_register_dyld_set_dyld_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; dyld_kernel_process_info_t dyld_process_state; } __Reply__task_register_dyld_get_process_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_vm_address_t kcd_addr_begin; mach_vm_size_t kcd_size; } __Reply__task_map_corpse_info_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t info_outCnt; integer_t info_out[4]; } __Reply__task_inspect_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; task_exc_guard_behavior_t behavior; } __Reply__task_get_exc_guard_behavior_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_exc_guard_behavior_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t delegation; } __Reply__task_create_suid_cred_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_dyld_process_info_notify_register_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t token; } __Reply__task_create_identity_token_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t task_port; } __Reply__task_identity_token_get_task_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_dyld_process_info_notify_deregister_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_handler_info_t old_handlers_info[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__task_get_exception_ports_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_test_sync_upcall_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_corpse_forking_behavior_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__task_subsystem { __Reply__task_create_t Reply_task_create; __Reply__task_terminate_t Reply_task_terminate; __Reply__task_threads_t Reply_task_threads; __Reply__mach_ports_register_t Reply_mach_ports_register; __Reply__mach_ports_lookup_t Reply_mach_ports_lookup; __Reply__task_info_t Reply_task_info; __Reply__task_set_info_t Reply_task_set_info; __Reply__task_suspend_t Reply_task_suspend; __Reply__task_resume_t Reply_task_resume; __Reply__task_get_special_port_t Reply_task_get_special_port; __Reply__task_set_special_port_t Reply_task_set_special_port; __Reply__thread_create_t Reply_thread_create; __Reply__thread_create_running_t Reply_thread_create_running; __Reply__task_set_exception_ports_t Reply_task_set_exception_ports; __Reply__task_get_exception_ports_t Reply_task_get_exception_ports; __Reply__task_swap_exception_ports_t Reply_task_swap_exception_ports; __Reply__lock_set_create_t Reply_lock_set_create; __Reply__lock_set_destroy_t Reply_lock_set_destroy; __Reply__semaphore_create_t Reply_semaphore_create; __Reply__semaphore_destroy_t Reply_semaphore_destroy; __Reply__task_policy_set_t Reply_task_policy_set; __Reply__task_policy_get_t Reply_task_policy_get; __Reply__task_sample_t Reply_task_sample; __Reply__task_policy_t Reply_task_policy; __Reply__task_set_emulation_t Reply_task_set_emulation; __Reply__task_get_emulation_vector_t Reply_task_get_emulation_vector; __Reply__task_set_emulation_vector_t Reply_task_set_emulation_vector; __Reply__task_set_ras_pc_t Reply_task_set_ras_pc; __Reply__task_zone_info_t Reply_task_zone_info; __Reply__task_assign_t Reply_task_assign; __Reply__task_assign_default_t Reply_task_assign_default; __Reply__task_get_assignment_t Reply_task_get_assignment; __Reply__task_set_policy_t Reply_task_set_policy; __Reply__task_get_state_t Reply_task_get_state; __Reply__task_set_state_t Reply_task_set_state; __Reply__task_set_phys_footprint_limit_t Reply_task_set_phys_footprint_limit; __Reply__task_suspend2_t Reply_task_suspend2; __Reply__task_resume2_t Reply_task_resume2; __Reply__task_purgable_info_t Reply_task_purgable_info; __Reply__task_get_mach_voucher_t Reply_task_get_mach_voucher; __Reply__task_set_mach_voucher_t Reply_task_set_mach_voucher; __Reply__task_swap_mach_voucher_t Reply_task_swap_mach_voucher; __Reply__task_generate_corpse_t Reply_task_generate_corpse; __Reply__task_map_corpse_info_t Reply_task_map_corpse_info; __Reply__task_register_dyld_image_infos_t Reply_task_register_dyld_image_infos; __Reply__task_unregister_dyld_image_infos_t Reply_task_unregister_dyld_image_infos; __Reply__task_get_dyld_image_infos_t Reply_task_get_dyld_image_infos; __Reply__task_register_dyld_shared_cache_image_info_t Reply_task_register_dyld_shared_cache_image_info; __Reply__task_register_dyld_set_dyld_state_t Reply_task_register_dyld_set_dyld_state; __Reply__task_register_dyld_get_process_state_t Reply_task_register_dyld_get_process_state; __Reply__task_map_corpse_info_64_t Reply_task_map_corpse_info_64; __Reply__task_inspect_t Reply_task_inspect; __Reply__task_get_exc_guard_behavior_t Reply_task_get_exc_guard_behavior; __Reply__task_set_exc_guard_behavior_t Reply_task_set_exc_guard_behavior; __Reply__task_create_suid_cred_t Reply_task_create_suid_cred; __Reply__task_dyld_process_info_notify_register_t Reply_task_dyld_process_info_notify_register; __Reply__task_create_identity_token_t Reply_task_create_identity_token; __Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port; __Reply__task_dyld_process_info_notify_deregister_t Reply_task_dyld_process_info_notify_deregister; __Reply__task_get_exception_ports_info_t Reply_task_get_exception_ports_info; __Reply__task_test_sync_upcall_t Reply_task_test_sync_upcall; __Reply__task_set_corpse_forking_behavior_t Reply_task_set_corpse_forking_behavior; }; extern "C" { extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_terminate ( thread_act_t target_act ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t act_get_state ( thread_read_t target_act, int flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t act_set_state ( thread_act_t target_act, int flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt ); extern __attribute__((availability(watchos,unavailable))) kern_return_t thread_get_state ( thread_read_t target_act, thread_state_flavor_t flavor, thread_state_t old_state, mach_msg_type_number_t *old_stateCnt ); extern __attribute__((availability(watchos,unavailable))) kern_return_t thread_set_state ( thread_act_t target_act, thread_state_flavor_t flavor, thread_state_t new_state, mach_msg_type_number_t new_stateCnt ); extern __attribute__((availability(watchos,unavailable))) kern_return_t thread_suspend ( thread_read_t target_act ); extern __attribute__((availability(watchos,unavailable))) kern_return_t thread_resume ( thread_read_t target_act ); extern __attribute__((availability(watchos,unavailable))) kern_return_t thread_abort ( thread_act_t target_act ); extern __attribute__((availability(watchos,unavailable))) kern_return_t thread_abort_safely ( thread_act_t target_act ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_depress_abort ( thread_act_t thread ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_get_special_port ( thread_inspect_t thr_act, int which_port, mach_port_t *special_port ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_set_special_port ( thread_act_t thr_act, int which_port, mach_port_t special_port ); extern kern_return_t thread_info ( thread_inspect_t target_act, thread_flavor_t flavor, thread_info_t thread_info_out, mach_msg_type_number_t *thread_info_outCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_set_exception_ports ( thread_act_t thread, exception_mask_t exception_mask, mach_port_t new_port, exception_behavior_t behavior, thread_state_flavor_t new_flavor ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_get_exception_ports ( thread_act_t thread, exception_mask_t exception_mask, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_array_t old_handlers, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_swap_exception_ports ( thread_act_t thread, exception_mask_t exception_mask, mach_port_t new_port, exception_behavior_t behavior, thread_state_flavor_t new_flavor, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_array_t old_handlers, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); extern kern_return_t thread_policy ( thread_act_t thr_act, policy_t policy, policy_base_t base, mach_msg_type_number_t baseCnt, boolean_t set_limit ); extern kern_return_t thread_policy_set ( thread_act_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t policy_infoCnt ); extern kern_return_t thread_policy_get ( thread_inspect_t thread, thread_policy_flavor_t flavor, thread_policy_t policy_info, mach_msg_type_number_t *policy_infoCnt, boolean_t *get_default ); extern kern_return_t thread_sample ( thread_act_t thread, mach_port_t reply ); extern kern_return_t etap_trace_thread ( thread_act_t target_act, boolean_t trace_status ); extern kern_return_t thread_assign ( thread_act_t thread, processor_set_t new_set ); extern kern_return_t thread_assign_default ( thread_act_t thread ); extern kern_return_t thread_get_assignment ( thread_inspect_t thread, processor_set_name_t *assigned_set ); extern kern_return_t thread_set_policy ( thread_act_t thr_act, processor_set_t pset, policy_t policy, policy_base_t base, mach_msg_type_number_t baseCnt, policy_limit_t limit, mach_msg_type_number_t limitCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_get_mach_voucher ( thread_read_t thr_act, mach_voucher_selector_t which, ipc_voucher_t *voucher ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_set_mach_voucher ( thread_act_t thr_act, ipc_voucher_t voucher ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t thread_swap_mach_voucher ( thread_act_t thr_act, ipc_voucher_t new_voucher, ipc_voucher_t *old_voucher ); extern kern_return_t thread_convert_thread_state ( thread_act_t thread, int direction, thread_state_flavor_t flavor, thread_state_t in_state, mach_msg_type_number_t in_stateCnt, thread_state_t out_state, mach_msg_type_number_t *out_stateCnt ); extern kern_return_t thread_get_exception_ports_info ( mach_port_t port, exception_mask_t exception_mask, exception_mask_array_t masks, mach_msg_type_number_t *masksCnt, exception_handler_info_array_t old_handlers_info, exception_behavior_array_t old_behaviors, exception_flavor_array_t old_flavors ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_terminate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int flavor; mach_msg_type_number_t old_stateCnt; } __Request__act_get_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int flavor; mach_msg_type_number_t new_stateCnt; natural_t new_state[1296]; } __Request__act_set_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_state_flavor_t flavor; mach_msg_type_number_t old_stateCnt; } __Request__thread_get_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_state_flavor_t flavor; mach_msg_type_number_t new_stateCnt; natural_t new_state[1296]; } __Request__thread_set_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_suspend_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_resume_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_abort_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_abort_safely_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_depress_abort_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int which_port; } __Request__thread_get_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t special_port; NDR_record_t NDR; int which_port; } __Request__thread_set_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_flavor_t flavor; mach_msg_type_number_t thread_info_outCnt; } __Request__thread_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_port; NDR_record_t NDR; exception_mask_t exception_mask; exception_behavior_t behavior; thread_state_flavor_t new_flavor; } __Request__thread_set_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; exception_mask_t exception_mask; } __Request__thread_get_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_port; NDR_record_t NDR; exception_mask_t exception_mask; exception_behavior_t behavior; thread_state_flavor_t new_flavor; } __Request__thread_swap_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; policy_t policy; mach_msg_type_number_t baseCnt; integer_t base[5]; boolean_t set_limit; } __Request__thread_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_policy_flavor_t flavor; mach_msg_type_number_t policy_infoCnt; integer_t policy_info[16]; } __Request__thread_policy_set_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; thread_policy_flavor_t flavor; mach_msg_type_number_t policy_infoCnt; boolean_t get_default; } __Request__thread_policy_get_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t reply; } __Request__thread_sample_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; boolean_t trace_status; } __Request__etap_trace_thread_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_set; } __Request__thread_assign_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_assign_default_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__thread_get_assignment_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t pset; NDR_record_t NDR; policy_t policy; mach_msg_type_number_t baseCnt; integer_t base[5]; mach_msg_type_number_t limitCnt; integer_t limit[1]; } __Request__thread_set_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_voucher_selector_t which; } __Request__thread_get_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t voucher; } __Request__thread_set_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_voucher; mach_msg_port_descriptor_t old_voucher; } __Request__thread_swap_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int direction; thread_state_flavor_t flavor; mach_msg_type_number_t in_stateCnt; natural_t in_state[1296]; mach_msg_type_number_t out_stateCnt; } __Request__thread_convert_thread_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; exception_mask_t exception_mask; } __Request__thread_get_exception_ports_info_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__thread_act_subsystem { __Request__thread_terminate_t Request_thread_terminate; __Request__act_get_state_t Request_act_get_state; __Request__act_set_state_t Request_act_set_state; __Request__thread_get_state_t Request_thread_get_state; __Request__thread_set_state_t Request_thread_set_state; __Request__thread_suspend_t Request_thread_suspend; __Request__thread_resume_t Request_thread_resume; __Request__thread_abort_t Request_thread_abort; __Request__thread_abort_safely_t Request_thread_abort_safely; __Request__thread_depress_abort_t Request_thread_depress_abort; __Request__thread_get_special_port_t Request_thread_get_special_port; __Request__thread_set_special_port_t Request_thread_set_special_port; __Request__thread_info_t Request_thread_info; __Request__thread_set_exception_ports_t Request_thread_set_exception_ports; __Request__thread_get_exception_ports_t Request_thread_get_exception_ports; __Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; __Request__thread_policy_t Request_thread_policy; __Request__thread_policy_set_t Request_thread_policy_set; __Request__thread_policy_get_t Request_thread_policy_get; __Request__thread_sample_t Request_thread_sample; __Request__etap_trace_thread_t Request_etap_trace_thread; __Request__thread_assign_t Request_thread_assign; __Request__thread_assign_default_t Request_thread_assign_default; __Request__thread_get_assignment_t Request_thread_get_assignment; __Request__thread_set_policy_t Request_thread_set_policy; __Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher; __Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher; __Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher; __Request__thread_convert_thread_state_t Request_thread_convert_thread_state; __Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_terminate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t old_stateCnt; natural_t old_state[1296]; } __Reply__act_get_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__act_set_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t old_stateCnt; natural_t old_state[1296]; } __Reply__thread_get_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_set_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_suspend_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_resume_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_abort_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_abort_safely_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_depress_abort_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t special_port; } __Reply__thread_get_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_set_special_port_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t thread_info_outCnt; integer_t thread_info_out[32]; } __Reply__thread_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_set_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_handlers[32]; NDR_record_t NDR; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__thread_get_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_handlers[32]; NDR_record_t NDR; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__thread_swap_exception_ports_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_policy_set_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t policy_infoCnt; integer_t policy_info[16]; boolean_t get_default; } __Reply__thread_policy_get_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_sample_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__etap_trace_thread_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_assign_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_assign_default_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t assigned_set; } __Reply__thread_get_assignment_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_set_policy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t voucher; } __Reply__thread_get_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__thread_set_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t old_voucher; } __Reply__thread_swap_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t out_stateCnt; natural_t out_state[1296]; } __Reply__thread_convert_thread_state_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t masksCnt; exception_mask_t masks[32]; exception_handler_info_t old_handlers_info[32]; exception_behavior_t old_behaviors[32]; thread_state_flavor_t old_flavors[32]; } __Reply__thread_get_exception_ports_info_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__thread_act_subsystem { __Reply__thread_terminate_t Reply_thread_terminate; __Reply__act_get_state_t Reply_act_get_state; __Reply__act_set_state_t Reply_act_set_state; __Reply__thread_get_state_t Reply_thread_get_state; __Reply__thread_set_state_t Reply_thread_set_state; __Reply__thread_suspend_t Reply_thread_suspend; __Reply__thread_resume_t Reply_thread_resume; __Reply__thread_abort_t Reply_thread_abort; __Reply__thread_abort_safely_t Reply_thread_abort_safely; __Reply__thread_depress_abort_t Reply_thread_depress_abort; __Reply__thread_get_special_port_t Reply_thread_get_special_port; __Reply__thread_set_special_port_t Reply_thread_set_special_port; __Reply__thread_info_t Reply_thread_info; __Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; __Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; __Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; __Reply__thread_policy_t Reply_thread_policy; __Reply__thread_policy_set_t Reply_thread_policy_set; __Reply__thread_policy_get_t Reply_thread_policy_get; __Reply__thread_sample_t Reply_thread_sample; __Reply__etap_trace_thread_t Reply_etap_trace_thread; __Reply__thread_assign_t Reply_thread_assign; __Reply__thread_assign_default_t Reply_thread_assign_default; __Reply__thread_get_assignment_t Reply_thread_get_assignment; __Reply__thread_set_policy_t Reply_thread_set_policy; __Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher; __Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher; __Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher; __Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state; __Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info; }; extern "C" { extern kern_return_t vm_region ( vm_map_read_t target_task, vm_address_t *address, vm_size_t *size, vm_region_flavor_t flavor, vm_region_info_t info, mach_msg_type_number_t *infoCnt, mach_port_t *object_name ); extern kern_return_t vm_allocate ( vm_map_t target_task, vm_address_t *address, vm_size_t size, int flags ); extern kern_return_t vm_deallocate ( vm_map_t target_task, vm_address_t address, vm_size_t size ); extern kern_return_t vm_protect ( vm_map_t target_task, vm_address_t address, vm_size_t size, boolean_t set_maximum, vm_prot_t new_protection ); extern kern_return_t vm_inherit ( vm_map_t target_task, vm_address_t address, vm_size_t size, vm_inherit_t new_inheritance ); extern kern_return_t vm_read ( vm_map_read_t target_task, vm_address_t address, vm_size_t size, vm_offset_t *data, mach_msg_type_number_t *dataCnt ); extern kern_return_t vm_read_list ( vm_map_read_t target_task, vm_read_entry_t data_list, natural_t count ); extern kern_return_t vm_write ( vm_map_t target_task, vm_address_t address, vm_offset_t data, mach_msg_type_number_t dataCnt ); extern kern_return_t vm_copy ( vm_map_t target_task, vm_address_t source_address, vm_size_t size, vm_address_t dest_address ); extern kern_return_t vm_read_overwrite ( vm_map_read_t target_task, vm_address_t address, vm_size_t size, vm_address_t data, vm_size_t *outsize ); extern kern_return_t vm_msync ( vm_map_t target_task, vm_address_t address, vm_size_t size, vm_sync_t sync_flags ); extern kern_return_t vm_behavior_set ( vm_map_t target_task, vm_address_t address, vm_size_t size, vm_behavior_t new_behavior ); extern kern_return_t vm_map ( vm_map_t target_task, vm_address_t *address, vm_size_t size, vm_address_t mask, int flags, mem_entry_name_port_t object, vm_offset_t offset, boolean_t copy, vm_prot_t cur_protection, vm_prot_t max_protection, vm_inherit_t inheritance ); extern kern_return_t vm_machine_attribute ( vm_map_t target_task, vm_address_t address, vm_size_t size, vm_machine_attribute_t attribute, vm_machine_attribute_val_t *value ); extern kern_return_t vm_remap ( vm_map_t target_task, vm_address_t *target_address, vm_size_t size, vm_address_t mask, int flags, vm_map_t src_task, vm_address_t src_address, boolean_t copy, vm_prot_t *cur_protection, vm_prot_t *max_protection, vm_inherit_t inheritance ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_wire ( vm_map_t target_task, boolean_t must_wire ); extern kern_return_t mach_make_memory_entry ( vm_map_t target_task, vm_size_t *size, vm_offset_t offset, vm_prot_t permission, mem_entry_name_port_t *object_handle, mem_entry_name_port_t parent_entry ); extern kern_return_t vm_map_page_query ( vm_map_read_t target_map, vm_offset_t offset, integer_t *disposition, integer_t *ref_count ); extern kern_return_t mach_vm_region_info ( vm_map_read_t task, vm_address_t address, vm_info_region_t *region, vm_info_object_array_t *objects, mach_msg_type_number_t *objectsCnt ); extern kern_return_t vm_mapped_pages_info ( vm_map_read_t task, page_address_array_t *pages, mach_msg_type_number_t *pagesCnt ); extern kern_return_t vm_region_recurse ( vm_map_read_t target_task, vm_address_t *address, vm_size_t *size, natural_t *nesting_depth, vm_region_recurse_info_t info, mach_msg_type_number_t *infoCnt ); extern kern_return_t vm_region_recurse_64 ( vm_map_read_t target_task, vm_address_t *address, vm_size_t *size, natural_t *nesting_depth, vm_region_recurse_info_t info, mach_msg_type_number_t *infoCnt ); extern kern_return_t mach_vm_region_info_64 ( vm_map_read_t task, vm_address_t address, vm_info_region_64_t *region, vm_info_object_array_t *objects, mach_msg_type_number_t *objectsCnt ); extern kern_return_t vm_region_64 ( vm_map_read_t target_task, vm_address_t *address, vm_size_t *size, vm_region_flavor_t flavor, vm_region_info_t info, mach_msg_type_number_t *infoCnt, mach_port_t *object_name ); extern kern_return_t mach_make_memory_entry_64 ( vm_map_t target_task, memory_object_size_t *size, memory_object_offset_t offset, vm_prot_t permission, mach_port_t *object_handle, mem_entry_name_port_t parent_entry ); extern kern_return_t vm_map_64 ( vm_map_t target_task, vm_address_t *address, vm_size_t size, vm_address_t mask, int flags, mem_entry_name_port_t object, memory_object_offset_t offset, boolean_t copy, vm_prot_t cur_protection, vm_prot_t max_protection, vm_inherit_t inheritance ); extern kern_return_t vm_purgable_control ( vm_map_t target_task, vm_address_t address, vm_purgable_t control, int *state ); extern kern_return_t vm_map_exec_lockdown ( vm_map_t target_task ); extern kern_return_t vm_remap_new ( vm_map_t target_task, vm_address_t *target_address, vm_size_t size, vm_address_t mask, int flags, vm_map_read_t src_task, vm_address_t src_address, boolean_t copy, vm_prot_t *cur_protection, vm_prot_t *max_protection, vm_inherit_t inheritance ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_region_flavor_t flavor; mach_msg_type_number_t infoCnt; } __Request__vm_region_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; int flags; } __Request__vm_allocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; } __Request__vm_deallocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; boolean_t set_maximum; vm_prot_t new_protection; } __Request__vm_protect_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_inherit_t new_inheritance; } __Request__vm_inherit_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; } __Request__vm_read_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_read_entry_t data_list; natural_t count; } __Request__vm_read_list_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t data; NDR_record_t NDR; vm_address_t address; mach_msg_type_number_t dataCnt; } __Request__vm_write_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t source_address; vm_size_t size; vm_address_t dest_address; } __Request__vm_copy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_address_t data; } __Request__vm_read_overwrite_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_sync_t sync_flags; } __Request__vm_msync_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_behavior_t new_behavior; } __Request__vm_behavior_set_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t object; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_address_t mask; int flags; vm_offset_t offset; boolean_t copy; vm_prot_t cur_protection; vm_prot_t max_protection; vm_inherit_t inheritance; } __Request__vm_map_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_machine_attribute_t attribute; vm_machine_attribute_val_t value; } __Request__vm_machine_attribute_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t src_task; NDR_record_t NDR; vm_address_t target_address; vm_size_t size; vm_address_t mask; int flags; vm_address_t src_address; boolean_t copy; vm_inherit_t inheritance; } __Request__vm_remap_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; boolean_t must_wire; } __Request__task_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t parent_entry; NDR_record_t NDR; vm_size_t size; vm_offset_t offset; vm_prot_t permission; } __Request__mach_make_memory_entry_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_offset_t offset; } __Request__vm_map_page_query_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; } __Request__mach_vm_region_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__vm_mapped_pages_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; natural_t nesting_depth; mach_msg_type_number_t infoCnt; } __Request__vm_region_recurse_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; natural_t nesting_depth; mach_msg_type_number_t infoCnt; } __Request__vm_region_recurse_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; } __Request__mach_vm_region_info_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_region_flavor_t flavor; mach_msg_type_number_t infoCnt; } __Request__vm_region_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t parent_entry; NDR_record_t NDR; memory_object_size_t size; memory_object_offset_t offset; vm_prot_t permission; } __Request__mach_make_memory_entry_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t object; NDR_record_t NDR; vm_address_t address; vm_size_t size; vm_address_t mask; int flags; memory_object_offset_t offset; boolean_t copy; vm_prot_t cur_protection; vm_prot_t max_protection; vm_inherit_t inheritance; } __Request__vm_map_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; vm_address_t address; vm_purgable_t control; int state; } __Request__vm_purgable_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__vm_map_exec_lockdown_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t src_task; NDR_record_t NDR; vm_address_t target_address; vm_size_t size; vm_address_t mask; int flags; vm_address_t src_address; boolean_t copy; vm_prot_t cur_protection; vm_prot_t max_protection; vm_inherit_t inheritance; } __Request__vm_remap_new_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__vm_map_subsystem { __Request__vm_region_t Request_vm_region; __Request__vm_allocate_t Request_vm_allocate; __Request__vm_deallocate_t Request_vm_deallocate; __Request__vm_protect_t Request_vm_protect; __Request__vm_inherit_t Request_vm_inherit; __Request__vm_read_t Request_vm_read; __Request__vm_read_list_t Request_vm_read_list; __Request__vm_write_t Request_vm_write; __Request__vm_copy_t Request_vm_copy; __Request__vm_read_overwrite_t Request_vm_read_overwrite; __Request__vm_msync_t Request_vm_msync; __Request__vm_behavior_set_t Request_vm_behavior_set; __Request__vm_map_t Request_vm_map; __Request__vm_machine_attribute_t Request_vm_machine_attribute; __Request__vm_remap_t Request_vm_remap; __Request__task_wire_t Request_task_wire; __Request__mach_make_memory_entry_t Request_mach_make_memory_entry; __Request__vm_map_page_query_t Request_vm_map_page_query; __Request__mach_vm_region_info_t Request_mach_vm_region_info; __Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; __Request__vm_region_recurse_t Request_vm_region_recurse; __Request__vm_region_recurse_64_t Request_vm_region_recurse_64; __Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; __Request__vm_region_64_t Request_vm_region_64; __Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; __Request__vm_map_64_t Request_vm_map_64; __Request__vm_purgable_control_t Request_vm_purgable_control; __Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown; __Request__vm_remap_new_t Request_vm_remap_new; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t object_name; NDR_record_t NDR; vm_address_t address; vm_size_t size; mach_msg_type_number_t infoCnt; int info[10]; } __Reply__vm_region_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t address; } __Reply__vm_allocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_deallocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_protect_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_inherit_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t data; NDR_record_t NDR; mach_msg_type_number_t dataCnt; } __Reply__vm_read_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_read_entry_t data_list; } __Reply__vm_read_list_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_write_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_copy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_size_t outsize; } __Reply__vm_read_overwrite_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_msync_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_behavior_set_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t address; } __Reply__vm_map_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_machine_attribute_val_t value; } __Reply__vm_machine_attribute_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t target_address; vm_prot_t cur_protection; vm_prot_t max_protection; } __Reply__vm_remap_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_wire_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t object_handle; NDR_record_t NDR; vm_size_t size; } __Reply__mach_make_memory_entry_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; integer_t disposition; integer_t ref_count; } __Reply__vm_map_page_query_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t objects; NDR_record_t NDR; vm_info_region_t region; mach_msg_type_number_t objectsCnt; } __Reply__mach_vm_region_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t pages; NDR_record_t NDR; mach_msg_type_number_t pagesCnt; } __Reply__vm_mapped_pages_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t address; vm_size_t size; natural_t nesting_depth; mach_msg_type_number_t infoCnt; int info[19]; } __Reply__vm_region_recurse_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t address; vm_size_t size; natural_t nesting_depth; mach_msg_type_number_t infoCnt; int info[19]; } __Reply__vm_region_recurse_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t objects; NDR_record_t NDR; vm_info_region_64_t region; mach_msg_type_number_t objectsCnt; } __Reply__mach_vm_region_info_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t object_name; NDR_record_t NDR; vm_address_t address; vm_size_t size; mach_msg_type_number_t infoCnt; int info[10]; } __Reply__vm_region_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t object_handle; NDR_record_t NDR; memory_object_size_t size; } __Reply__mach_make_memory_entry_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t address; } __Reply__vm_map_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; int state; } __Reply__vm_purgable_control_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__vm_map_exec_lockdown_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_address_t target_address; vm_prot_t cur_protection; vm_prot_t max_protection; } __Reply__vm_remap_new_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__vm_map_subsystem { __Reply__vm_region_t Reply_vm_region; __Reply__vm_allocate_t Reply_vm_allocate; __Reply__vm_deallocate_t Reply_vm_deallocate; __Reply__vm_protect_t Reply_vm_protect; __Reply__vm_inherit_t Reply_vm_inherit; __Reply__vm_read_t Reply_vm_read; __Reply__vm_read_list_t Reply_vm_read_list; __Reply__vm_write_t Reply_vm_write; __Reply__vm_copy_t Reply_vm_copy; __Reply__vm_read_overwrite_t Reply_vm_read_overwrite; __Reply__vm_msync_t Reply_vm_msync; __Reply__vm_behavior_set_t Reply_vm_behavior_set; __Reply__vm_map_t Reply_vm_map; __Reply__vm_machine_attribute_t Reply_vm_machine_attribute; __Reply__vm_remap_t Reply_vm_remap; __Reply__task_wire_t Reply_task_wire; __Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; __Reply__vm_map_page_query_t Reply_vm_map_page_query; __Reply__mach_vm_region_info_t Reply_mach_vm_region_info; __Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; __Reply__vm_region_recurse_t Reply_vm_region_recurse; __Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; __Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; __Reply__vm_region_64_t Reply_vm_region_64; __Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; __Reply__vm_map_64_t Reply_vm_map_64; __Reply__vm_purgable_control_t Reply_vm_purgable_control; __Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown; __Reply__vm_remap_new_t Reply_vm_remap_new; }; extern "C" { extern kern_return_t mach_port_names ( ipc_space_t task, mach_port_name_array_t *names, mach_msg_type_number_t *namesCnt, mach_port_type_array_t *types, mach_msg_type_number_t *typesCnt ); extern kern_return_t mach_port_type ( ipc_space_t task, mach_port_name_t name, mach_port_type_t *ptype ); extern kern_return_t mach_port_rename ( ipc_space_t task, mach_port_name_t old_name, mach_port_name_t new_name ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t mach_port_allocate_name ( ipc_space_t task, mach_port_right_t right, mach_port_name_t name ); extern kern_return_t mach_port_allocate ( ipc_space_t task, mach_port_right_t right, mach_port_name_t *name ); extern __attribute__((availability(macos,introduced=10.0,deprecated=12.0,message="Inherently unsafe API: instead manage rights with " "mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()"))) __attribute__((availability(ios,introduced=2.0,deprecated=15.0,message="Inherently unsafe API: instead manage rights with " "mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()"))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Inherently unsafe API: instead manage rights with " "mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()"))) __attribute__((availability(watchos,introduced=2.0,deprecated=8.0,message="Inherently unsafe API: instead manage rights with " "mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()"))) kern_return_t mach_port_destroy ( ipc_space_t task, mach_port_name_t name ); extern kern_return_t mach_port_deallocate ( ipc_space_t task, mach_port_name_t name ); extern kern_return_t mach_port_get_refs ( ipc_space_t task, mach_port_name_t name, mach_port_right_t right, mach_port_urefs_t *refs ); extern kern_return_t mach_port_mod_refs ( ipc_space_t task, mach_port_name_t name, mach_port_right_t right, mach_port_delta_t delta ); extern kern_return_t mach_port_peek ( ipc_space_t task, mach_port_name_t name, mach_msg_trailer_type_t trailer_type, mach_port_seqno_t *request_seqnop, mach_msg_size_t *msg_sizep, mach_msg_id_t *msg_idp, mach_msg_trailer_info_t trailer_infop, mach_msg_type_number_t *trailer_infopCnt ); extern kern_return_t mach_port_set_mscount ( ipc_space_t task, mach_port_name_t name, mach_port_mscount_t mscount ); extern kern_return_t mach_port_get_set_status ( ipc_space_read_t task, mach_port_name_t name, mach_port_name_array_t *members, mach_msg_type_number_t *membersCnt ); extern kern_return_t mach_port_move_member ( ipc_space_t task, mach_port_name_t member, mach_port_name_t after ); extern kern_return_t mach_port_request_notification ( ipc_space_t task, mach_port_name_t name, mach_msg_id_t msgid, mach_port_mscount_t sync, mach_port_t notify, mach_msg_type_name_t notifyPoly, mach_port_t *previous ); extern kern_return_t mach_port_insert_right ( ipc_space_t task, mach_port_name_t name, mach_port_t poly, mach_msg_type_name_t polyPoly ); extern kern_return_t mach_port_extract_right ( ipc_space_t task, mach_port_name_t name, mach_msg_type_name_t msgt_name, mach_port_t *poly, mach_msg_type_name_t *polyPoly ); extern kern_return_t mach_port_set_seqno ( ipc_space_t task, mach_port_name_t name, mach_port_seqno_t seqno ); extern kern_return_t mach_port_get_attributes ( ipc_space_read_t task, mach_port_name_t name, mach_port_flavor_t flavor, mach_port_info_t port_info_out, mach_msg_type_number_t *port_info_outCnt ); extern kern_return_t mach_port_set_attributes ( ipc_space_t task, mach_port_name_t name, mach_port_flavor_t flavor, mach_port_info_t port_info, mach_msg_type_number_t port_infoCnt ); extern kern_return_t mach_port_allocate_qos ( ipc_space_t task, mach_port_right_t right, mach_port_qos_t *qos, mach_port_name_t *name ); extern kern_return_t mach_port_allocate_full ( ipc_space_t task, mach_port_right_t right, mach_port_t proto, mach_port_qos_t *qos, mach_port_name_t *name ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t task_set_port_space ( ipc_space_t task, int table_entries ); extern kern_return_t mach_port_get_srights ( ipc_space_t task, mach_port_name_t name, mach_port_rights_t *srights ); extern kern_return_t mach_port_space_info ( ipc_space_read_t space, ipc_info_space_t *space_info, ipc_info_name_array_t *table_info, mach_msg_type_number_t *table_infoCnt, ipc_info_tree_name_array_t *tree_info, mach_msg_type_number_t *tree_infoCnt ); extern kern_return_t mach_port_dnrequest_info ( ipc_space_t task, mach_port_name_t name, unsigned *dnr_total, unsigned *dnr_used ); extern kern_return_t mach_port_kernel_object ( ipc_space_read_t task, mach_port_name_t name, unsigned *object_type, unsigned *object_addr ); extern kern_return_t mach_port_insert_member ( ipc_space_t task, mach_port_name_t name, mach_port_name_t pset ); extern kern_return_t mach_port_extract_member ( ipc_space_t task, mach_port_name_t name, mach_port_name_t pset ); extern kern_return_t mach_port_get_context ( ipc_space_read_t task, mach_port_name_t name, mach_port_context_t *context ); extern kern_return_t mach_port_set_context ( ipc_space_t task, mach_port_name_t name, mach_port_context_t context ); extern kern_return_t mach_port_kobject ( ipc_space_read_t task, mach_port_name_t name, natural_t *object_type, mach_vm_address_t *object_addr ); extern kern_return_t mach_port_construct ( ipc_space_t task, mach_port_options_ptr_t options, mach_port_context_t context, mach_port_name_t *name ); extern kern_return_t mach_port_destruct ( ipc_space_t task, mach_port_name_t name, mach_port_delta_t srdelta, mach_port_context_t guard ); extern kern_return_t mach_port_guard ( ipc_space_t task, mach_port_name_t name, mach_port_context_t guard, boolean_t strict ); extern kern_return_t mach_port_unguard ( ipc_space_t task, mach_port_name_t name, mach_port_context_t guard ); extern kern_return_t mach_port_space_basic_info ( ipc_space_inspect_t task, ipc_info_space_basic_t *basic_info ); extern kern_return_t mach_port_guard_with_flags ( ipc_space_t task, mach_port_name_t name, mach_port_context_t guard, uint64_t flags ); extern kern_return_t mach_port_swap_guard ( ipc_space_t task, mach_port_name_t name, mach_port_context_t old_guard, mach_port_context_t new_guard ); extern kern_return_t mach_port_kobject_description ( ipc_space_read_t task, mach_port_name_t name, natural_t *object_type, mach_vm_address_t *object_addr, kobject_description_t description ); extern kern_return_t mach_port_is_connection_for_service ( ipc_space_t task, mach_port_name_t connection_port, mach_port_name_t service_port, uint64_t *filter_policy_id ); extern kern_return_t mach_port_get_service_port_info ( ipc_space_read_t task, mach_port_name_t name, mach_service_port_info_data_t *sp_info_out ); extern kern_return_t mach_port_assert_attributes ( ipc_space_t task, mach_port_name_t name, mach_port_flavor_t flavor, mach_port_info_t info, mach_msg_type_number_t infoCnt ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__mach_port_names_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_type_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t old_name; mach_port_name_t new_name; } __Request__mach_port_rename_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_right_t right; mach_port_name_t name; } __Request__mach_port_allocate_name_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_right_t right; } __Request__mach_port_allocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_deallocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_right_t right; } __Request__mach_port_get_refs_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_right_t right; mach_port_delta_t delta; } __Request__mach_port_mod_refs_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_msg_trailer_type_t trailer_type; mach_port_seqno_t request_seqnop; mach_msg_type_number_t trailer_infopCnt; } __Request__mach_port_peek_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_mscount_t mscount; } __Request__mach_port_set_mscount_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_get_set_status_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t member; mach_port_name_t after; } __Request__mach_port_move_member_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t notify; NDR_record_t NDR; mach_port_name_t name; mach_msg_id_t msgid; mach_port_mscount_t sync; } __Request__mach_port_request_notification_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t poly; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_insert_right_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_msg_type_name_t msgt_name; } __Request__mach_port_extract_right_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_seqno_t seqno; } __Request__mach_port_set_seqno_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_flavor_t flavor; mach_msg_type_number_t port_info_outCnt; } __Request__mach_port_get_attributes_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_flavor_t flavor; mach_msg_type_number_t port_infoCnt; integer_t port_info[17]; } __Request__mach_port_set_attributes_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_right_t right; mach_port_qos_t qos; } __Request__mach_port_allocate_qos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t proto; NDR_record_t NDR; mach_port_right_t right; mach_port_qos_t qos; mach_port_name_t name; } __Request__mach_port_allocate_full_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; int table_entries; } __Request__task_set_port_space_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_get_srights_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__mach_port_space_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_dnrequest_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_kernel_object_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_name_t pset; } __Request__mach_port_insert_member_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_name_t pset; } __Request__mach_port_extract_member_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_get_context_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_context_t context; } __Request__mach_port_set_context_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_kobject_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t options; NDR_record_t NDR; mach_port_context_t context; } __Request__mach_port_construct_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_delta_t srdelta; mach_port_context_t guard; } __Request__mach_port_destruct_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_context_t guard; boolean_t strict; } __Request__mach_port_guard_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_context_t guard; } __Request__mach_port_unguard_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__mach_port_space_basic_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_context_t guard; uint64_t flags; } __Request__mach_port_guard_with_flags_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_context_t old_guard; mach_port_context_t new_guard; } __Request__mach_port_swap_guard_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_kobject_description_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t connection_port; mach_port_name_t service_port; } __Request__mach_port_is_connection_for_service_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; } __Request__mach_port_get_service_port_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_port_name_t name; mach_port_flavor_t flavor; mach_msg_type_number_t infoCnt; integer_t info[17]; } __Request__mach_port_assert_attributes_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__mach_port_subsystem { __Request__mach_port_names_t Request_mach_port_names; __Request__mach_port_type_t Request_mach_port_type; __Request__mach_port_rename_t Request_mach_port_rename; __Request__mach_port_allocate_name_t Request_mach_port_allocate_name; __Request__mach_port_allocate_t Request_mach_port_allocate; __Request__mach_port_destroy_t Request_mach_port_destroy; __Request__mach_port_deallocate_t Request_mach_port_deallocate; __Request__mach_port_get_refs_t Request_mach_port_get_refs; __Request__mach_port_mod_refs_t Request_mach_port_mod_refs; __Request__mach_port_peek_t Request_mach_port_peek; __Request__mach_port_set_mscount_t Request_mach_port_set_mscount; __Request__mach_port_get_set_status_t Request_mach_port_get_set_status; __Request__mach_port_move_member_t Request_mach_port_move_member; __Request__mach_port_request_notification_t Request_mach_port_request_notification; __Request__mach_port_insert_right_t Request_mach_port_insert_right; __Request__mach_port_extract_right_t Request_mach_port_extract_right; __Request__mach_port_set_seqno_t Request_mach_port_set_seqno; __Request__mach_port_get_attributes_t Request_mach_port_get_attributes; __Request__mach_port_set_attributes_t Request_mach_port_set_attributes; __Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos; __Request__mach_port_allocate_full_t Request_mach_port_allocate_full; __Request__task_set_port_space_t Request_task_set_port_space; __Request__mach_port_get_srights_t Request_mach_port_get_srights; __Request__mach_port_space_info_t Request_mach_port_space_info; __Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info; __Request__mach_port_kernel_object_t Request_mach_port_kernel_object; __Request__mach_port_insert_member_t Request_mach_port_insert_member; __Request__mach_port_extract_member_t Request_mach_port_extract_member; __Request__mach_port_get_context_t Request_mach_port_get_context; __Request__mach_port_set_context_t Request_mach_port_set_context; __Request__mach_port_kobject_t Request_mach_port_kobject; __Request__mach_port_construct_t Request_mach_port_construct; __Request__mach_port_destruct_t Request_mach_port_destruct; __Request__mach_port_guard_t Request_mach_port_guard; __Request__mach_port_unguard_t Request_mach_port_unguard; __Request__mach_port_space_basic_info_t Request_mach_port_space_basic_info; __Request__mach_port_guard_with_flags_t Request_mach_port_guard_with_flags; __Request__mach_port_swap_guard_t Request_mach_port_swap_guard; __Request__mach_port_kobject_description_t Request_mach_port_kobject_description; __Request__mach_port_is_connection_for_service_t Request_mach_port_is_connection_for_service; __Request__mach_port_get_service_port_info_t Request_mach_port_get_service_port_info; __Request__mach_port_assert_attributes_t Request_mach_port_assert_attributes; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t names; mach_msg_ool_descriptor_t types; NDR_record_t NDR; mach_msg_type_number_t namesCnt; mach_msg_type_number_t typesCnt; } __Reply__mach_port_names_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_type_t ptype; } __Reply__mach_port_type_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_rename_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_allocate_name_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_name_t name; } __Reply__mach_port_allocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_destroy_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_deallocate_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_urefs_t refs; } __Reply__mach_port_get_refs_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_mod_refs_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_seqno_t request_seqnop; mach_msg_size_t msg_sizep; mach_msg_id_t msg_idp; mach_msg_type_number_t trailer_infopCnt; char trailer_infop[68]; } __Reply__mach_port_peek_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_set_mscount_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t members; NDR_record_t NDR; mach_msg_type_number_t membersCnt; } __Reply__mach_port_get_set_status_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_move_member_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t previous; } __Reply__mach_port_request_notification_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_insert_right_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t poly; } __Reply__mach_port_extract_right_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_set_seqno_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t port_info_outCnt; integer_t port_info_out[17]; } __Reply__mach_port_get_attributes_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_set_attributes_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_qos_t qos; mach_port_name_t name; } __Reply__mach_port_allocate_qos_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_qos_t qos; mach_port_name_t name; } __Reply__mach_port_allocate_full_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__task_set_port_space_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_rights_t srights; } __Reply__mach_port_get_srights_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t table_info; mach_msg_ool_descriptor_t tree_info; NDR_record_t NDR; ipc_info_space_t space_info; mach_msg_type_number_t table_infoCnt; mach_msg_type_number_t tree_infoCnt; } __Reply__mach_port_space_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; unsigned dnr_total; unsigned dnr_used; } __Reply__mach_port_dnrequest_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; unsigned object_type; unsigned object_addr; } __Reply__mach_port_kernel_object_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_insert_member_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_extract_member_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_context_t context; } __Reply__mach_port_get_context_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_set_context_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; natural_t object_type; mach_vm_address_t object_addr; } __Reply__mach_port_kobject_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_port_name_t name; } __Reply__mach_port_construct_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_destruct_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_guard_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_unguard_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; ipc_info_space_basic_t basic_info; } __Reply__mach_port_space_basic_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_guard_with_flags_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_swap_guard_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; natural_t object_type; mach_vm_address_t object_addr; mach_msg_type_number_t descriptionOffset; mach_msg_type_number_t descriptionCnt; char description[512]; } __Reply__mach_port_kobject_description_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; uint64_t filter_policy_id; } __Reply__mach_port_is_connection_for_service_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_service_port_info_data_t sp_info_out; } __Reply__mach_port_get_service_port_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__mach_port_assert_attributes_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__mach_port_subsystem { __Reply__mach_port_names_t Reply_mach_port_names; __Reply__mach_port_type_t Reply_mach_port_type; __Reply__mach_port_rename_t Reply_mach_port_rename; __Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name; __Reply__mach_port_allocate_t Reply_mach_port_allocate; __Reply__mach_port_destroy_t Reply_mach_port_destroy; __Reply__mach_port_deallocate_t Reply_mach_port_deallocate; __Reply__mach_port_get_refs_t Reply_mach_port_get_refs; __Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs; __Reply__mach_port_peek_t Reply_mach_port_peek; __Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount; __Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status; __Reply__mach_port_move_member_t Reply_mach_port_move_member; __Reply__mach_port_request_notification_t Reply_mach_port_request_notification; __Reply__mach_port_insert_right_t Reply_mach_port_insert_right; __Reply__mach_port_extract_right_t Reply_mach_port_extract_right; __Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno; __Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes; __Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes; __Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos; __Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full; __Reply__task_set_port_space_t Reply_task_set_port_space; __Reply__mach_port_get_srights_t Reply_mach_port_get_srights; __Reply__mach_port_space_info_t Reply_mach_port_space_info; __Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info; __Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object; __Reply__mach_port_insert_member_t Reply_mach_port_insert_member; __Reply__mach_port_extract_member_t Reply_mach_port_extract_member; __Reply__mach_port_get_context_t Reply_mach_port_get_context; __Reply__mach_port_set_context_t Reply_mach_port_set_context; __Reply__mach_port_kobject_t Reply_mach_port_kobject; __Reply__mach_port_construct_t Reply_mach_port_construct; __Reply__mach_port_destruct_t Reply_mach_port_destruct; __Reply__mach_port_guard_t Reply_mach_port_guard; __Reply__mach_port_unguard_t Reply_mach_port_unguard; __Reply__mach_port_space_basic_info_t Reply_mach_port_space_basic_info; __Reply__mach_port_guard_with_flags_t Reply_mach_port_guard_with_flags; __Reply__mach_port_swap_guard_t Reply_mach_port_swap_guard; __Reply__mach_port_kobject_description_t Reply_mach_port_kobject_description; __Reply__mach_port_is_connection_for_service_t Reply_mach_port_is_connection_for_service; __Reply__mach_port_get_service_port_info_t Reply_mach_port_get_service_port_info; __Reply__mach_port_assert_attributes_t Reply_mach_port_assert_attributes; }; extern "C" { extern mach_port_t mach_host_self(void); extern mach_port_t mach_thread_self(void); __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(tvos,introduced=14.5))) __attribute__((availability(watchos,introduced=7.3))) extern boolean_t mach_task_is_self(task_name_t task); extern kern_return_t host_page_size(host_t, vm_size_t *); extern mach_port_t mach_task_self_; } extern "C" { extern kern_return_t clock_sleep_trap( mach_port_name_t clock_name, sleep_type_t sleep_type, int sleep_sec, int sleep_nsec, mach_timespec_t *wakeup_time); extern kern_return_t _kernelrpc_mach_vm_allocate_trap( mach_port_name_t target, mach_vm_offset_t *addr, mach_vm_size_t size, int flags); extern kern_return_t _kernelrpc_mach_vm_deallocate_trap( mach_port_name_t target, mach_vm_address_t address, mach_vm_size_t size ); extern kern_return_t task_dyld_process_info_notify_get( mach_port_name_array_t names_addr, natural_t *names_count_addr ); extern kern_return_t _kernelrpc_mach_vm_protect_trap( mach_port_name_t target, mach_vm_address_t address, mach_vm_size_t size, boolean_t set_maximum, vm_prot_t new_protection ); extern kern_return_t _kernelrpc_mach_vm_map_trap( mach_port_name_t target, mach_vm_offset_t *address, mach_vm_size_t size, mach_vm_offset_t mask, int flags, vm_prot_t cur_protection ); extern kern_return_t _kernelrpc_mach_vm_purgable_control_trap( mach_port_name_t target, mach_vm_offset_t address, vm_purgable_t control, int *state); extern kern_return_t _kernelrpc_mach_port_allocate_trap( mach_port_name_t target, mach_port_right_t right, mach_port_name_t *name ); extern kern_return_t _kernelrpc_mach_port_deallocate_trap( mach_port_name_t target, mach_port_name_t name ); extern kern_return_t _kernelrpc_mach_port_mod_refs_trap( mach_port_name_t target, mach_port_name_t name, mach_port_right_t right, mach_port_delta_t delta ); extern kern_return_t _kernelrpc_mach_port_move_member_trap( mach_port_name_t target, mach_port_name_t member, mach_port_name_t after ); extern kern_return_t _kernelrpc_mach_port_insert_right_trap( mach_port_name_t target, mach_port_name_t name, mach_port_name_t poly, mach_msg_type_name_t polyPoly ); extern kern_return_t _kernelrpc_mach_port_get_attributes_trap( mach_port_name_t target, mach_port_name_t name, mach_port_flavor_t flavor, mach_port_info_t port_info_out, mach_msg_type_number_t *port_info_outCnt ); extern kern_return_t _kernelrpc_mach_port_insert_member_trap( mach_port_name_t target, mach_port_name_t name, mach_port_name_t pset ); extern kern_return_t _kernelrpc_mach_port_extract_member_trap( mach_port_name_t target, mach_port_name_t name, mach_port_name_t pset ); extern kern_return_t _kernelrpc_mach_port_construct_trap( mach_port_name_t target, mach_port_options_t *options, uint64_t context, mach_port_name_t *name ); extern kern_return_t _kernelrpc_mach_port_destruct_trap( mach_port_name_t target, mach_port_name_t name, mach_port_delta_t srdelta, uint64_t guard ); extern kern_return_t _kernelrpc_mach_port_guard_trap( mach_port_name_t target, mach_port_name_t name, uint64_t guard, boolean_t strict ); extern kern_return_t _kernelrpc_mach_port_unguard_trap( mach_port_name_t target, mach_port_name_t name, uint64_t guard ); extern kern_return_t mach_generate_activity_id( mach_port_name_t target, int count, uint64_t *activity_id ); extern kern_return_t macx_swapon( uint64_t filename, int flags, int size, int priority); extern kern_return_t macx_swapoff( uint64_t filename, int flags); extern kern_return_t macx_triggers( int hi_water, int low_water, int flags, mach_port_t alert_port); extern kern_return_t macx_backing_store_suspend( boolean_t suspend); extern kern_return_t macx_backing_store_recovery( int pid); extern boolean_t swtch_pri(int pri); extern boolean_t swtch(void); extern kern_return_t thread_switch( mach_port_name_t thread_name, int option, mach_msg_timeout_t option_time); extern mach_port_name_t task_self_trap(void); extern kern_return_t host_create_mach_voucher_trap( mach_port_name_t host, mach_voucher_attr_raw_recipe_array_t recipes, int recipes_size, mach_port_name_t *voucher); extern kern_return_t mach_voucher_extract_attr_recipe_trap( mach_port_name_t voucher_name, mach_voucher_attr_key_t key, mach_voucher_attr_raw_recipe_t recipe, mach_msg_type_number_t *recipe_size); extern kern_return_t _kernelrpc_mach_port_type_trap( ipc_space_t task, mach_port_name_t name, mach_port_type_t *ptype); extern kern_return_t _kernelrpc_mach_port_request_notification_trap( ipc_space_t task, mach_port_name_t name, mach_msg_id_t msgid, mach_port_mscount_t sync, mach_port_name_t notify, mach_msg_type_name_t notifyPoly, mach_port_name_t *previous); extern kern_return_t task_for_pid( mach_port_name_t target_tport, int pid, mach_port_name_t *t); extern kern_return_t task_name_for_pid( mach_port_name_t target_tport, int pid, mach_port_name_t *tn); extern kern_return_t pid_for_task( mach_port_name_t t, int *x); extern kern_return_t debug_control_port_for_pid( mach_port_name_t target_tport, int pid, mach_port_name_t *t); } extern "C" { extern mach_port_t bootstrap_port; extern int (*vprintf_stderr_func)(const char *format, va_list ap); } extern "C" { extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_info ( host_t host, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt ); extern kern_return_t host_kernel_version ( host_t host, kernel_version_t kernel_version ); extern kern_return_t _host_page_size ( host_t host, vm_size_t *out_page_size ); extern kern_return_t mach_memory_object_memory_entry ( host_t host, boolean_t internal, vm_size_t size, vm_prot_t permission, memory_object_t pager, mach_port_t *entry_handle ); extern kern_return_t host_processor_info ( host_t host, processor_flavor_t flavor, natural_t *out_processor_count, processor_info_array_t *out_processor_info, mach_msg_type_number_t *out_processor_infoCnt ); extern kern_return_t host_get_io_master ( host_t host, io_master_t *io_master ); extern kern_return_t host_get_clock_service ( host_t host, clock_id_t clock_id, clock_serv_t *clock_serv ); extern kern_return_t kmod_get_info ( host_t host, kmod_args_t *modules, mach_msg_type_number_t *modulesCnt ); extern kern_return_t host_virtual_physical_table_info ( host_t host, hash_info_bucket_array_t *info, mach_msg_type_number_t *infoCnt ); extern kern_return_t processor_set_default ( host_t host, processor_set_name_t *default_set ); extern kern_return_t processor_set_create ( host_t host, processor_set_t *new_set, processor_set_name_t *new_name ); extern kern_return_t mach_memory_object_memory_entry_64 ( host_t host, boolean_t internal, memory_object_size_t size, vm_prot_t permission, memory_object_t pager, mach_port_t *entry_handle ); extern kern_return_t host_statistics ( host_t host_priv, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_request_notification ( host_t host, host_flavor_t notify_type, mach_port_t notify_port ); extern kern_return_t host_lockgroup_info ( host_t host, lockgroup_info_array_t *lockgroup_info, mach_msg_type_number_t *lockgroup_infoCnt ); extern kern_return_t host_statistics64 ( host_t host_priv, host_flavor_t flavor, host_info64_t host_info64_out, mach_msg_type_number_t *host_info64_outCnt ); extern kern_return_t mach_zone_info ( host_priv_t host, mach_zone_name_array_t *names, mach_msg_type_number_t *namesCnt, mach_zone_info_array_t *info, mach_msg_type_number_t *infoCnt ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_create_mach_voucher ( host_t host, mach_voucher_attr_raw_recipe_array_t recipes, mach_msg_type_number_t recipesCnt, ipc_voucher_t *voucher ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_register_mach_voucher_attr_manager ( host_t host, mach_voucher_attr_manager_t attr_manager, mach_voucher_attr_value_handle_t default_value, mach_voucher_attr_key_t *new_key, ipc_voucher_attr_control_t *new_attr_control ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_register_well_known_mach_voucher_attr_manager ( host_t host, mach_voucher_attr_manager_t attr_manager, mach_voucher_attr_value_handle_t default_value, mach_voucher_attr_key_t key, ipc_voucher_attr_control_t *new_attr_control ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_set_atm_diagnostic_flag ( host_t host, uint32_t diagnostic_flag ); extern __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) kern_return_t host_get_atm_diagnostic_flag ( host_t host, uint32_t *diagnostic_flag ); extern kern_return_t mach_memory_info ( host_priv_t host, mach_zone_name_array_t *names, mach_msg_type_number_t *namesCnt, mach_zone_info_array_t *info, mach_msg_type_number_t *infoCnt, mach_memory_info_array_t *memory_info, mach_msg_type_number_t *memory_infoCnt ); extern kern_return_t host_set_multiuser_config_flags ( host_priv_t host_priv, uint32_t multiuser_flags ); extern kern_return_t host_get_multiuser_config_flags ( host_t host, uint32_t *multiuser_flags ); extern kern_return_t host_check_multiuser_mode ( host_t host, uint32_t *multiuser_mode ); extern kern_return_t mach_zone_info_for_zone ( host_priv_t host, mach_zone_name_t name, mach_zone_info_t *info ); } #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; host_flavor_t flavor; mach_msg_type_number_t host_info_outCnt; } __Request__host_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_kernel_version_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request___host_page_size_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t pager; NDR_record_t NDR; boolean_t internal; vm_size_t size; vm_prot_t permission; } __Request__mach_memory_object_memory_entry_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; processor_flavor_t flavor; } __Request__host_processor_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_get_io_master_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; clock_id_t clock_id; } __Request__host_get_clock_service_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__kmod_get_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_virtual_physical_table_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_set_default_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__processor_set_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t pager; NDR_record_t NDR; boolean_t internal; memory_object_size_t size; vm_prot_t permission; } __Request__mach_memory_object_memory_entry_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; host_flavor_t flavor; mach_msg_type_number_t host_info_outCnt; } __Request__host_statistics_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t notify_port; NDR_record_t NDR; host_flavor_t notify_type; } __Request__host_request_notification_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_lockgroup_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; host_flavor_t flavor; mach_msg_type_number_t host_info64_outCnt; } __Request__host_statistics64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__mach_zone_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_msg_type_number_t recipesCnt; uint8_t recipes[5120]; } __Request__host_create_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t attr_manager; NDR_record_t NDR; mach_voucher_attr_value_handle_t default_value; } __Request__host_register_mach_voucher_attr_manager_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t attr_manager; NDR_record_t NDR; mach_voucher_attr_value_handle_t default_value; mach_voucher_attr_key_t key; } __Request__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; uint32_t diagnostic_flag; } __Request__host_set_atm_diagnostic_flag_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_get_atm_diagnostic_flag_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__mach_memory_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; uint32_t multiuser_flags; } __Request__host_set_multiuser_config_flags_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_get_multiuser_config_flags_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; } __Request__host_check_multiuser_mode_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; mach_zone_name_t name; } __Request__mach_zone_info_for_zone_t __attribute__((unused)); #pragma pack(pop) union __RequestUnion__mach_host_subsystem { __Request__host_info_t Request_host_info; __Request__host_kernel_version_t Request_host_kernel_version; __Request___host_page_size_t Request__host_page_size; __Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; __Request__host_processor_info_t Request_host_processor_info; __Request__host_get_io_master_t Request_host_get_io_master; __Request__host_get_clock_service_t Request_host_get_clock_service; __Request__kmod_get_info_t Request_kmod_get_info; __Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; __Request__processor_set_default_t Request_processor_set_default; __Request__processor_set_create_t Request_processor_set_create; __Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; __Request__host_statistics_t Request_host_statistics; __Request__host_request_notification_t Request_host_request_notification; __Request__host_lockgroup_info_t Request_host_lockgroup_info; __Request__host_statistics64_t Request_host_statistics64; __Request__mach_zone_info_t Request_mach_zone_info; __Request__host_create_mach_voucher_t Request_host_create_mach_voucher; __Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager; __Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager; __Request__host_set_atm_diagnostic_flag_t Request_host_set_atm_diagnostic_flag; __Request__host_get_atm_diagnostic_flag_t Request_host_get_atm_diagnostic_flag; __Request__mach_memory_info_t Request_mach_memory_info; __Request__host_set_multiuser_config_flags_t Request_host_set_multiuser_config_flags; __Request__host_get_multiuser_config_flags_t Request_host_get_multiuser_config_flags; __Request__host_check_multiuser_mode_t Request_host_check_multiuser_mode; __Request__mach_zone_info_for_zone_t Request_mach_zone_info_for_zone; }; #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t host_info_outCnt; integer_t host_info_out[68]; } __Reply__host_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t kernel_versionOffset; mach_msg_type_number_t kernel_versionCnt; char kernel_version[512]; } __Reply__host_kernel_version_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; vm_size_t out_page_size; } __Reply___host_page_size_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t entry_handle; } __Reply__mach_memory_object_memory_entry_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t out_processor_info; NDR_record_t NDR; natural_t out_processor_count; mach_msg_type_number_t out_processor_infoCnt; } __Reply__host_processor_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t io_master; } __Reply__host_get_io_master_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t clock_serv; } __Reply__host_get_clock_service_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t modules; NDR_record_t NDR; mach_msg_type_number_t modulesCnt; } __Reply__kmod_get_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t info; NDR_record_t NDR; mach_msg_type_number_t infoCnt; } __Reply__host_virtual_physical_table_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t default_set; } __Reply__processor_set_default_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_set; mach_msg_port_descriptor_t new_name; } __Reply__processor_set_create_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t entry_handle; } __Reply__mach_memory_object_memory_entry_64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t host_info_outCnt; integer_t host_info_out[68]; } __Reply__host_statistics_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_request_notification_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t lockgroup_info; NDR_record_t NDR; mach_msg_type_number_t lockgroup_infoCnt; } __Reply__host_lockgroup_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_msg_type_number_t host_info64_outCnt; integer_t host_info64_out[256]; } __Reply__host_statistics64_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t names; mach_msg_ool_descriptor_t info; NDR_record_t NDR; mach_msg_type_number_t namesCnt; mach_msg_type_number_t infoCnt; } __Reply__mach_zone_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t voucher; } __Reply__host_create_mach_voucher_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_attr_control; NDR_record_t NDR; mach_voucher_attr_key_t new_key; } __Reply__host_register_mach_voucher_attr_manager_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_port_descriptor_t new_attr_control; } __Reply__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_set_atm_diagnostic_flag_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; uint32_t diagnostic_flag; } __Reply__host_get_atm_diagnostic_flag_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; mach_msg_body_t msgh_body; mach_msg_ool_descriptor_t names; mach_msg_ool_descriptor_t info; mach_msg_ool_descriptor_t memory_info; NDR_record_t NDR; mach_msg_type_number_t namesCnt; mach_msg_type_number_t infoCnt; mach_msg_type_number_t memory_infoCnt; } __Reply__mach_memory_info_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; } __Reply__host_set_multiuser_config_flags_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; uint32_t multiuser_flags; } __Reply__host_get_multiuser_config_flags_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; uint32_t multiuser_mode; } __Reply__host_check_multiuser_mode_t __attribute__((unused)); #pragma pack(pop) #pragma pack(push, 4) typedef struct { mach_msg_header_t Head; NDR_record_t NDR; kern_return_t RetCode; mach_zone_info_t info; } __Reply__mach_zone_info_for_zone_t __attribute__((unused)); #pragma pack(pop) union __ReplyUnion__mach_host_subsystem { __Reply__host_info_t Reply_host_info; __Reply__host_kernel_version_t Reply_host_kernel_version; __Reply___host_page_size_t Reply__host_page_size; __Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; __Reply__host_processor_info_t Reply_host_processor_info; __Reply__host_get_io_master_t Reply_host_get_io_master; __Reply__host_get_clock_service_t Reply_host_get_clock_service; __Reply__kmod_get_info_t Reply_kmod_get_info; __Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; __Reply__processor_set_default_t Reply_processor_set_default; __Reply__processor_set_create_t Reply_processor_set_create; __Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; __Reply__host_statistics_t Reply_host_statistics; __Reply__host_request_notification_t Reply_host_request_notification; __Reply__host_lockgroup_info_t Reply_host_lockgroup_info; __Reply__host_statistics64_t Reply_host_statistics64; __Reply__mach_zone_info_t Reply_mach_zone_info; __Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher; __Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager; __Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager; __Reply__host_set_atm_diagnostic_flag_t Reply_host_set_atm_diagnostic_flag; __Reply__host_get_atm_diagnostic_flag_t Reply_host_get_atm_diagnostic_flag; __Reply__mach_memory_info_t Reply_mach_memory_info; __Reply__host_set_multiuser_config_flags_t Reply_host_set_multiuser_config_flags; __Reply__host_get_multiuser_config_flags_t Reply_host_get_multiuser_config_flags; __Reply__host_check_multiuser_mode_t Reply_host_check_multiuser_mode; __Reply__mach_zone_info_for_zone_t Reply_mach_zone_info_for_zone; }; typedef unsigned int routine_arg_type; typedef unsigned int routine_arg_offset; typedef unsigned int routine_arg_size; struct rpc_routine_arg_descriptor { routine_arg_type type; routine_arg_size size; routine_arg_size count; routine_arg_offset offset; }; typedef struct rpc_routine_arg_descriptor *rpc_routine_arg_descriptor_t; struct rpc_routine_descriptor { mig_impl_routine_t impl_routine; mig_stub_routine_t stub_routine; unsigned int argc; unsigned int descr_count; rpc_routine_arg_descriptor_t arg_descr; unsigned int max_reply_msg; }; typedef struct rpc_routine_descriptor *rpc_routine_descriptor_t; struct rpc_signature { struct rpc_routine_descriptor rd; struct rpc_routine_arg_descriptor rad[1]; }; struct rpc_subsystem { void *reserved; mach_msg_id_t start; mach_msg_id_t end; unsigned int maxsize; vm_address_t base_addr; struct rpc_routine_descriptor routine[1 ]; struct rpc_routine_arg_descriptor arg_descriptor[1 ]; }; typedef struct rpc_subsystem *rpc_subsystem_t; typedef kern_return_t mach_error_t; typedef mach_error_t (* mach_error_fn_t)( void ); extern "C" { char *mach_error_string( mach_error_t error_value ); void mach_error( const char *str, mach_error_t error_value ); char *mach_error_type( mach_error_t error_value ); } extern "C" { extern void panic_init(mach_port_t); extern void panic(const char *, ...); extern void slot_name(cpu_type_t, cpu_subtype_t, char **, char **); extern void mig_reply_setup(mach_msg_header_t *, mach_msg_header_t *); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern void mach_msg_destroy(mach_msg_header_t *); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg_send(mach_msg_header_t *); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg_server_once(boolean_t (*) (mach_msg_header_t *, mach_msg_header_t *), mach_msg_size_t, mach_port_t, mach_msg_options_t); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg_server(boolean_t (*) (mach_msg_header_t *, mach_msg_header_t *), mach_msg_size_t, mach_port_t, mach_msg_options_t); __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) extern mach_msg_return_t mach_msg_server_importance(boolean_t (*) (mach_msg_header_t *, mach_msg_header_t *), mach_msg_size_t, mach_port_t, mach_msg_options_t); extern kern_return_t clock_get_res(mach_port_t, clock_res_t *); extern kern_return_t clock_set_res(mach_port_t, clock_res_t); extern kern_return_t clock_sleep(mach_port_t, int, mach_timespec_t, mach_timespec_t *); typedef struct voucher_mach_msg_state_s *voucher_mach_msg_state_t; extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg); extern void voucher_mach_msg_clear(mach_msg_header_t *msg); extern voucher_mach_msg_state_t voucher_mach_msg_adopt(mach_msg_header_t *msg); extern void voucher_mach_msg_revert(voucher_mach_msg_state_t state); } #pragma clang assume_nonnull begin extern "C" { __attribute__((availability(macosx,introduced=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) int launch_activate_socket(const char *name, int * _Nonnull * _Nullable fds, size_t *cnt); typedef struct _launch_data *launch_data_t; typedef void (*launch_data_dict_iterator_t)(const launch_data_t lval, const char *key, void * _Nullable ctx); typedef enum { LAUNCH_DATA_DICTIONARY = 1, LAUNCH_DATA_ARRAY, LAUNCH_DATA_FD, LAUNCH_DATA_INTEGER, LAUNCH_DATA_REAL, LAUNCH_DATA_BOOL, LAUNCH_DATA_STRING, LAUNCH_DATA_OPAQUE, LAUNCH_DATA_ERRNO, LAUNCH_DATA_MACHPORT, } launch_data_type_t; __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_alloc(launch_data_type_t type); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) launch_data_t launch_data_copy(launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) launch_data_type_t launch_data_get_type(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) void launch_data_free(launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) bool launch_data_dict_insert(launch_data_t ldict, const launch_data_t lval, const char *key); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) launch_data_t _Nullable launch_data_dict_lookup(const launch_data_t ldict, const char *key); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) bool launch_data_dict_remove(launch_data_t ldict, const char *key); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void launch_data_dict_iterate(const launch_data_t ldict, launch_data_dict_iterator_t iterator, void * _Nullable ctx); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) size_t launch_data_dict_get_count(const launch_data_t ldict); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) bool launch_data_array_set_index(launch_data_t larray, const launch_data_t lval, size_t idx); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) launch_data_t launch_data_array_get_index(const launch_data_t larray, size_t idx); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) size_t launch_data_array_get_count(const launch_data_t larray); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_fd(int fd); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_machport(mach_port_t val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_integer(long long val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_bool(bool val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_real(double val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_string(const char *val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) launch_data_t launch_data_new_opaque(const void *bytes, size_t sz); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_fd(launch_data_t ld, int fd); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_machport(launch_data_t ld, mach_port_t mp); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_integer(launch_data_t ld, long long val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_bool(launch_data_t ld, bool val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_real(launch_data_t ld, double val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_string(launch_data_t ld, const char *val); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__nonnull__(1))) bool launch_data_set_opaque(launch_data_t ld, const void *bytes, size_t sz); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int launch_data_get_fd(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) mach_port_t launch_data_get_machport(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) long long launch_data_get_integer(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) bool launch_data_get_bool(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) double launch_data_get_real(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const char * launch_data_get_string(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) void * launch_data_get_opaque(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) size_t launch_data_get_opaque_size(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int launch_data_get_errno(const launch_data_t ld); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__warn_unused_result__)) int launch_get_fd(void); __attribute__((availability(macosx,introduced=10.4,deprecated=10.10))) extern __attribute__((__visibility__("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) launch_data_t launch_msg(const launch_data_t request); } #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) xpc_object_t xpc_retain(xpc_object_t object); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_release(xpc_object_t object); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) xpc_type_t xpc_get_type(xpc_object_t object); __attribute__((availability(macosx,introduced=10.15))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) const char * xpc_type_get_name(xpc_type_t type); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) __attribute__((__warn_unused_result__)) __attribute__((__ns_returns_retained__)) xpc_object_t _Nullable xpc_copy(xpc_object_t object); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__warn_unused_result__)) bool xpc_equal(xpc_object_t object1, xpc_object_t object2); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__warn_unused_result__)) size_t xpc_hash(xpc_object_t object); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) char * xpc_copy_description(xpc_object_t object); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_null_create(void); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_bool_create(bool value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) bool xpc_bool_get_value(xpc_object_t xbool); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_int64_create(int64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int64_t xpc_int64_get_value(xpc_object_t xint); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_uint64_create(uint64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) uint64_t xpc_uint64_get_value(xpc_object_t xuint); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_double_create(double value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) double xpc_double_get_value(xpc_object_t xdouble); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_date_create(int64_t interval); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_date_create_from_current(void); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int64_t xpc_date_get_value(xpc_object_t xdate); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_data_create(const void * _Nullable bytes, size_t length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_object_t xpc_data_create_with_dispatch_data(dispatch_data_t ddata); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) size_t xpc_data_get_length(xpc_object_t xdata); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const void * _Nullable xpc_data_get_bytes_ptr(xpc_object_t xdata); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) size_t xpc_data_get_bytes(xpc_object_t xdata, void *buffer, size_t off, size_t length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_object_t xpc_string_create(const char *string); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((format(printf, 1, 2))) xpc_object_t xpc_string_create_with_format(const char *fmt, ...); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((format(printf, 1, 0))) xpc_object_t xpc_string_create_with_format_and_arguments(const char *fmt, va_list ap); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) size_t xpc_string_get_length(xpc_object_t xstring); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const char * _Nullable xpc_string_get_string_ptr(xpc_object_t xstring); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_object_t xpc_uuid_create(const uuid_t _Nonnull uuid); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) const uint8_t * _Nullable xpc_uuid_get_bytes(xpc_object_t xuuid); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t _Nullable xpc_fd_create(int fd); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int xpc_fd_dup(xpc_object_t xfd); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_object_t xpc_shmem_create(void *region, size_t length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) size_t xpc_shmem_map(xpc_object_t xshmem, void * _Nullable * _Nonnull region); typedef bool (*xpc_array_applier_t)(size_t index, xpc_object_t _Nonnull value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_array_create(const xpc_object_t _Nonnull * _Nullable objects, size_t count); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_array_create_empty(void); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) void xpc_array_set_value(xpc_object_t xarray, size_t index, xpc_object_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_array_append_value(xpc_object_t xarray, xpc_object_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) size_t xpc_array_get_count(xpc_object_t xarray); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) xpc_object_t xpc_array_get_value(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) bool xpc_array_apply(xpc_object_t xarray, __attribute__((__noescape__)) xpc_array_applier_t applier); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_array_set_bool(xpc_object_t xarray, size_t index, bool value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_array_set_int64(xpc_object_t xarray, size_t index, int64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_array_set_uint64(xpc_object_t xarray, size_t index, uint64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_array_set_double(xpc_object_t xarray, size_t index, double value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_array_set_date(xpc_object_t xarray, size_t index, int64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) void xpc_array_set_data(xpc_object_t xarray, size_t index, const void *bytes, size_t length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) void xpc_array_set_string(xpc_object_t xarray, size_t index, const char *string); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) void xpc_array_set_uuid(xpc_object_t xarray, size_t index, const uuid_t _Nonnull uuid); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) void xpc_array_set_fd(xpc_object_t xarray, size_t index, int fd); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) void xpc_array_set_connection(xpc_object_t xarray, size_t index, xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) bool xpc_array_get_bool(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int64_t xpc_array_get_int64(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) uint64_t xpc_array_get_uint64(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) double xpc_array_get_double(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int64_t xpc_array_get_date(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const void * _Nullable xpc_array_get_data(xpc_object_t xarray, size_t index, size_t * _Nullable length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const char * _Nullable xpc_array_get_string(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const uint8_t * _Nullable xpc_array_get_uuid(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) int xpc_array_dup_fd(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) xpc_connection_t _Nullable xpc_array_create_connection(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.11))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_object_t _Nullable xpc_array_get_dictionary(xpc_object_t xarray, size_t index); __attribute__((availability(macosx,introduced=10.11))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_object_t _Nullable xpc_array_get_array(xpc_object_t xarray, size_t index); typedef bool (*xpc_dictionary_applier_t)(const char * _Nonnull key, xpc_object_t _Nonnull value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_dictionary_create(const char * _Nonnull const * _Nullable keys, const xpc_object_t _Nullable * _Nullable values, size_t count); __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) xpc_object_t xpc_dictionary_create_empty(void); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_object_t _Nullable xpc_dictionary_create_reply(xpc_object_t original); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_value(xpc_object_t xdict, const char *key, xpc_object_t _Nullable value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) xpc_object_t _Nullable xpc_dictionary_get_value(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) size_t xpc_dictionary_get_count(xpc_object_t xdict); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__)) bool xpc_dictionary_apply(xpc_object_t xdict, __attribute__((__noescape__)) xpc_dictionary_applier_t applier); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_connection_t _Nullable xpc_dictionary_get_remote_connection(xpc_object_t xdict); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_bool(xpc_object_t xdict, const char *key, bool value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_int64(xpc_object_t xdict, const char *key, int64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_uint64(xpc_object_t xdict, const char *key, uint64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_double(xpc_object_t xdict, const char *key, double value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_date(xpc_object_t xdict, const char *key, int64_t value); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) void xpc_dictionary_set_data(xpc_object_t xdict, const char *key, const void *bytes, size_t length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) void xpc_dictionary_set_string(xpc_object_t xdict, const char *key, const char *string); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) void xpc_dictionary_set_uuid(xpc_object_t xdict, const char *key, const uuid_t _Nonnull uuid); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) void xpc_dictionary_set_fd(xpc_object_t xdict, const char *key, int fd); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) __attribute__((__nonnull__(3))) void xpc_dictionary_set_connection(xpc_object_t xdict, const char *key, xpc_connection_t connection); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) bool xpc_dictionary_get_bool(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) int64_t xpc_dictionary_get_int64(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) uint64_t xpc_dictionary_get_uint64(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) double xpc_dictionary_get_double(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) int64_t xpc_dictionary_get_date(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) const void * _Nullable xpc_dictionary_get_data(xpc_object_t xdict, const char *key, size_t * _Nullable length); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) const char * _Nullable xpc_dictionary_get_string(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(2))) const uint8_t * _Nullable xpc_dictionary_get_uuid(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) int xpc_dictionary_dup_fd(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__malloc__)) __attribute__((__ns_returns_retained__)) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_connection_t _Nullable xpc_dictionary_create_connection(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.11))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_object_t _Nullable xpc_dictionary_get_dictionary(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.11))) extern __attribute__((visibility("default"))) __attribute__((__warn_unused_result__)) __attribute__((__nonnull__)) xpc_object_t _Nullable xpc_dictionary_get_array(xpc_object_t xdict, const char *key); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__noreturn__)) __attribute__((__nonnull__(1))) void xpc_main(xpc_connection_handler_t handler); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) void xpc_transaction_begin(void); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) void xpc_transaction_end(void); __attribute__((availability(macosx,introduced=10.7))) extern __attribute__((visibility("default"))) __attribute__((__nonnull__(1))) __attribute__((__nonnull__(3))) void xpc_set_event_stream_handler(const char *stream, dispatch_queue_t _Nullable targetq, xpc_handler_t handler); } #pragma clang assume_nonnull end extern "C" { #pragma clang assume_nonnull begin CFTypeID SecCodeGetTypeID(void); OSStatus SecCodeCopySelf(SecCSFlags flags, SecCodeRef * _Nonnull __attribute__((cf_returns_retained)) self); enum { kSecCSUseAllArchitectures = 1 << 0, }; OSStatus SecCodeCopyStaticCode(SecCodeRef code, SecCSFlags flags, SecStaticCodeRef * _Nonnull __attribute__((cf_returns_retained)) staticCode); OSStatus SecCodeCopyHost(SecCodeRef guest, SecCSFlags flags, SecCodeRef * _Nonnull __attribute__((cf_returns_retained)) host); extern const CFStringRef kSecGuestAttributeCanonical; extern const CFStringRef kSecGuestAttributeHash; extern const CFStringRef kSecGuestAttributeMachPort; extern const CFStringRef kSecGuestAttributePid; extern const CFStringRef kSecGuestAttributeAudit; extern const CFStringRef kSecGuestAttributeDynamicCode; extern const CFStringRef kSecGuestAttributeDynamicCodeInfoPlist; extern const CFStringRef kSecGuestAttributeArchitecture; extern const CFStringRef kSecGuestAttributeSubarchitecture; OSStatus SecCodeCopyGuestWithAttributes(SecCodeRef _Nullable host, CFDictionaryRef _Nullable attributes, SecCSFlags flags, SecCodeRef * _Nonnull __attribute__((cf_returns_retained)) guest); OSStatus SecCodeCreateWithXPCMessage(xpc_object_t message, SecCSFlags flags, SecCodeRef * _Nonnull __attribute__((cf_returns_retained)) target); OSStatus SecCodeCheckValidity(SecCodeRef code, SecCSFlags flags, SecRequirementRef _Nullable requirement); OSStatus SecCodeCheckValidityWithErrors(SecCodeRef code, SecCSFlags flags, SecRequirementRef _Nullable requirement, CFErrorRef *errors); OSStatus SecCodeCopyPath(SecStaticCodeRef staticCode, SecCSFlags flags, CFURLRef * _Nonnull __attribute__((cf_returns_retained)) path); OSStatus SecCodeCopyDesignatedRequirement(SecStaticCodeRef code, SecCSFlags flags, SecRequirementRef * _Nonnull __attribute__((cf_returns_retained)) requirement); enum { kSecCSInternalInformation = 1 << 0, kSecCSSigningInformation = 1 << 1, kSecCSRequirementInformation = 1 << 2, kSecCSDynamicInformation = 1 << 3, kSecCSContentInformation = 1 << 4, kSecCSSkipResourceDirectory = 1 << 5, kSecCSCalculateCMSDigest = 1 << 6, }; extern const CFStringRef kSecCodeInfoCertificates; extern const CFStringRef kSecCodeInfoChangedFiles; extern const CFStringRef kSecCodeInfoCMS; extern const CFStringRef kSecCodeInfoDesignatedRequirement; extern const CFStringRef kSecCodeInfoEntitlements; extern const CFStringRef kSecCodeInfoEntitlementsDict; extern const CFStringRef kSecCodeInfoFlags; extern const CFStringRef kSecCodeInfoFormat; extern const CFStringRef kSecCodeInfoDigestAlgorithm; extern const CFStringRef kSecCodeInfoDigestAlgorithms; extern const CFStringRef kSecCodeInfoPlatformIdentifier; extern const CFStringRef kSecCodeInfoIdentifier; extern const CFStringRef kSecCodeInfoImplicitDesignatedRequirement; extern const CFStringRef kSecCodeInfoMainExecutable; extern const CFStringRef kSecCodeInfoPList; extern const CFStringRef kSecCodeInfoRequirements; extern const CFStringRef kSecCodeInfoRequirementData; extern const CFStringRef kSecCodeInfoSource; extern const CFStringRef kSecCodeInfoStatus; extern const CFStringRef kSecCodeInfoTeamIdentifier; extern const CFStringRef kSecCodeInfoTime; extern const CFStringRef kSecCodeInfoTimestamp; extern const CFStringRef kSecCodeInfoTrust; extern const CFStringRef kSecCodeInfoUnique; extern const CFStringRef kSecCodeInfoCdHashes; extern const CFStringRef kSecCodeInfoRuntimeVersion; OSStatus SecCodeCopySigningInformation(SecStaticCodeRef code, SecCSFlags flags, CFDictionaryRef * _Nonnull __attribute__((cf_returns_retained)) information); OSStatus SecCodeMapMemory(SecStaticCodeRef code, SecCSFlags flags); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin enum { kSecCSDedicatedHost = 1 << 0, kSecCSGenerateGuestHash = 1 << 1, }; OSStatus SecHostCreateGuest(SecGuestRef host, uint32_t status, CFURLRef path, CFDictionaryRef _Nullable attributes, SecCSFlags flags, SecGuestRef * _Nonnull newGuest) __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))); OSStatus SecHostRemoveGuest(SecGuestRef host, SecGuestRef guest, SecCSFlags flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))); OSStatus SecHostSelectGuest(SecGuestRef guestRef, SecCSFlags flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))); OSStatus SecHostSelectedGuest(SecCSFlags flags, SecGuestRef * _Nonnull guestRef) __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))); OSStatus SecHostSetGuestStatus(SecGuestRef guestRef, uint32_t status, CFDictionaryRef _Nullable attributes, SecCSFlags flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))); OSStatus SecHostSetHostingPort(mach_port_t hostingPort, SecCSFlags flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.6))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin CFTypeID SecRequirementGetTypeID(void); OSStatus SecRequirementCreateWithData(CFDataRef data, SecCSFlags flags, SecRequirementRef * _Nonnull __attribute__((cf_returns_retained)) requirement); OSStatus SecRequirementCreateWithString(CFStringRef text, SecCSFlags flags, SecRequirementRef * _Nonnull __attribute__((cf_returns_retained)) requirement); OSStatus SecRequirementCreateWithStringAndErrors(CFStringRef text, SecCSFlags flags, CFErrorRef *errors, SecRequirementRef * _Nonnull __attribute__((cf_returns_retained)) requirement); OSStatus SecRequirementCopyData(SecRequirementRef requirement, SecCSFlags flags, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) data); OSStatus SecRequirementCopyString(SecRequirementRef requirement, SecCSFlags flags, CFStringRef * _Nonnull __attribute__((cf_returns_retained)) text); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) __SecTask *SecTaskRef; CFTypeID SecTaskGetTypeID(void); _Nullable SecTaskRef SecTaskCreateWithAuditToken(CFAllocatorRef _Nullable allocator, audit_token_t token); _Nullable SecTaskRef SecTaskCreateFromSelf(CFAllocatorRef _Nullable allocator); _Nullable CFTypeRef SecTaskCopyValueForEntitlement(SecTaskRef task, CFStringRef entitlement, CFErrorRef *error); _Nullable CFDictionaryRef SecTaskCopyValuesForEntitlements(SecTaskRef task, CFArrayRef entitlements, CFErrorRef *error); _Nullable CFStringRef SecTaskCopySigningIdentifier(SecTaskRef task, CFErrorRef *error); uint32_t SecTaskGetCodeSignStatus(SecTaskRef task) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) __attribute__((availability(macCatalyst,introduced=11.0))) __attribute__((availability(macos,unavailable))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin OSStatus AuthorizationRightGet(const char *rightName, CFDictionaryRef * _Nullable __attribute__((cf_returns_retained)) rightDefinition); OSStatus AuthorizationRightSet(AuthorizationRef authRef, const char *rightName, CFTypeRef rightDefinition, CFStringRef _Nullable descriptionKey, CFBundleRef _Nullable bundle, CFStringRef _Nullable localeTableName); OSStatus AuthorizationRightRemove(AuthorizationRef authRef, const char *rightName); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) _CMSDecoder *CMSDecoderRef; CFTypeID CMSDecoderGetTypeID(void); typedef uint32_t CMSSignerStatus; enum { kCMSSignerUnsigned = 0, kCMSSignerValid, kCMSSignerNeedsDetachedContent, kCMSSignerInvalidSignature, kCMSSignerInvalidCert, kCMSSignerInvalidIndex }; OSStatus CMSDecoderCreate(CMSDecoderRef * _Nonnull __attribute__((cf_returns_retained)) cmsDecoderOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderUpdateMessage( CMSDecoderRef cmsDecoder, const void *msgBytes, size_t msgBytesLen) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderFinalizeMessage(CMSDecoderRef cmsDecoder) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderSetDetachedContent( CMSDecoderRef cmsDecoder, CFDataRef detachedContent) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopyDetachedContent( CMSDecoderRef cmsDecoder, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) detachedContentOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderSetSearchKeychain( CMSDecoderRef cmsDecoder, CFTypeRef keychainOrArray) __attribute__((availability(macos,introduced=10.5,deprecated=10.13,replacement="SecKeychainSetSearchList"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderGetNumSigners( CMSDecoderRef cmsDecoder, size_t *numSignersOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerStatus( CMSDecoderRef cmsDecoder, size_t signerIndex, CFTypeRef policyOrArray, Boolean evaluateSecTrust, CMSSignerStatus * _Nullable signerStatusOut, SecTrustRef * _Nullable __attribute__((cf_returns_retained)) secTrustOut, OSStatus * _Nullable certVerifyResultCodeOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerEmailAddress( CMSDecoderRef cmsDecoder, size_t signerIndex, CFStringRef * _Nonnull __attribute__((cf_returns_retained)) signerEmailAddressOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerCert( CMSDecoderRef cmsDecoder, size_t signerIndex, SecCertificateRef * _Nonnull __attribute__((cf_returns_retained)) signerCertOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderIsContentEncrypted( CMSDecoderRef cmsDecoder, Boolean *isEncryptedOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopyEncapsulatedContentType( CMSDecoderRef cmsDecoder, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) eContentTypeOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopyAllCerts( CMSDecoderRef cmsDecoder, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) certsOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopyContent( CMSDecoderRef cmsDecoder, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) contentOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerSigningTime( CMSDecoderRef cmsDecoder, size_t signerIndex, CFAbsoluteTime *signingTime) __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerTimestamp( CMSDecoderRef cmsDecoder, size_t signerIndex, CFAbsoluteTime *timestamp) __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerTimestampWithPolicy( CMSDecoderRef cmsDecoder, CFTypeRef _Nullable timeStampPolicy, size_t signerIndex, CFAbsoluteTime *timestamp) __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSDecoderCopySignerTimestampCertificates( CMSDecoderRef cmsDecoder, size_t signerIndex, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) certificateRefs) __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) _CMSEncoder *CMSEncoderRef; CFTypeID CMSEncoderGetTypeID(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCreate(CMSEncoderRef * _Nonnull __attribute__((cf_returns_retained)) cmsEncoderOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kCMSEncoderDigestAlgorithmSHA1; extern const CFStringRef kCMSEncoderDigestAlgorithmSHA256; OSStatus CMSEncoderSetSignerAlgorithm( CMSEncoderRef cmsEncoder, CFStringRef digestAlgorithm) __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderAddSigners( CMSEncoderRef cmsEncoder, CFTypeRef signerOrArray) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopySigners( CMSEncoderRef cmsEncoder, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) signersOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderAddRecipients( CMSEncoderRef cmsEncoder, CFTypeRef recipientOrArray) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopyRecipients( CMSEncoderRef cmsEncoder, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) recipientsOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderSetHasDetachedContent( CMSEncoderRef cmsEncoder, Boolean detachedContent) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderGetHasDetachedContent( CMSEncoderRef cmsEncoder, Boolean *detachedContentOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderSetEncapsulatedContentType( CMSEncoderRef cmsEncoder, const SecAsn1Oid *eContentType) __attribute__((availability(macos,introduced=10.5,deprecated=10.7,replacement="CMSEncoderSetEncapsulatedContentTypeOID"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderSetEncapsulatedContentTypeOID( CMSEncoderRef cmsEncoder, CFTypeRef eContentTypeOID) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopyEncapsulatedContentType( CMSEncoderRef cmsEncoder, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) eContentTypeOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderAddSupportingCerts( CMSEncoderRef cmsEncoder, CFTypeRef certOrArray) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopySupportingCerts( CMSEncoderRef cmsEncoder, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) certsOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef uint32_t CMSSignedAttributes; enum { kCMSAttrNone = 0x0000, kCMSAttrSmimeCapabilities = 0x0001, kCMSAttrSmimeEncryptionKeyPrefs = 0x0002, kCMSAttrSmimeMSEncryptionKeyPrefs = 0x0004, kCMSAttrSigningTime = 0x0008, kCMSAttrAppleCodesigningHashAgility = 0x0010, kCMSAttrAppleCodesigningHashAgilityV2 = 0x0020, kCMSAttrAppleExpirationTime = 0x0040, }; OSStatus CMSEncoderAddSignedAttributes( CMSEncoderRef cmsEncoder, CMSSignedAttributes signedAttributes) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); typedef uint32_t CMSCertificateChainMode; enum { kCMSCertificateNone = 0, kCMSCertificateSignerOnly, kCMSCertificateChain, kCMSCertificateChainWithRoot, kCMSCertificateChainWithRootOrFail, }; OSStatus CMSEncoderSetCertificateChainMode( CMSEncoderRef cmsEncoder, CMSCertificateChainMode chainMode) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderGetCertificateChainMode( CMSEncoderRef cmsEncoder, CMSCertificateChainMode *chainModeOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderUpdateContent( CMSEncoderRef cmsEncoder, const void *content, size_t contentLen) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopyEncodedContent( CMSEncoderRef cmsEncoder, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) encodedContentOut) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncode( CFTypeRef _Nullable signers, CFTypeRef _Nullable recipients, const SecAsn1Oid * _Nullable eContentType, Boolean detachedContent, CMSSignedAttributes signedAttributes, const void * content, size_t contentLen, CFDataRef * _Nonnull __attribute__((cf_returns_retained)) encodedContentOut) __attribute__((availability(macos,introduced=10.5,deprecated=10.7,replacement="CMSEncodeContent"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncodeContent( CFTypeRef _Nullable signers, CFTypeRef _Nullable recipients, CFTypeRef _Nullable eContentTypeOID, Boolean detachedContent, CMSSignedAttributes signedAttributes, const void *content, size_t contentLen, CFDataRef * _Nullable __attribute__((cf_returns_retained)) encodedContentOut) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopySignerTimestamp( CMSEncoderRef cmsEncoder, size_t signerIndex, CFAbsoluteTime *timestamp) __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); OSStatus CMSEncoderCopySignerTimestampWithPolicy( CMSEncoderRef cmsEncoder, CFTypeRef _Nullable timeStampPolicy, size_t signerIndex, CFAbsoluteTime *timestamp) __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(macCatalyst,unavailable))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin struct SSLContext; typedef struct __attribute__((objc_bridge(id))) SSLContext *SSLContextRef; typedef const void *SSLConnectionRef; typedef int SSLSessionOption; enum { kSSLSessionOptionBreakOnServerAuth __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 0, kSSLSessionOptionBreakOnCertRequested __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 1, kSSLSessionOptionBreakOnClientAuth __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 2, kSSLSessionOptionFalseStart __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 3, kSSLSessionOptionSendOneByteRecord __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 4, kSSLSessionOptionAllowServerIdentityChange __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 5, kSSLSessionOptionFallback __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 6, kSSLSessionOptionBreakOnClientHello __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 7, kSSLSessionOptionAllowRenegotiation __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 8, kSSLSessionOptionEnableSessionTickets __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) = 9, }; typedef int SSLSessionState; enum { kSSLIdle __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLHandshake __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLConnected __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLClosed __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLAborted __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) }; typedef int SSLClientCertificateState; enum { kSSLClientCertNone __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLClientCertRequested __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLClientCertSent __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLClientCertRejected __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) }; typedef OSStatus (*SSLReadFunc) (SSLConnectionRef connection, void *data, size_t *dataLength); typedef OSStatus (*SSLWriteFunc) (SSLConnectionRef connection, const void *data, size_t *dataLength); typedef int SSLProtocolSide; enum { kSSLServerSide __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLClientSide __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) }; typedef int SSLConnectionType; enum { kSSLStreamType __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))), kSSLDatagramType __attribute__((availability(macosx,introduced=10_2,deprecated=10_15,message="" ))) }; extern const CFStringRef kSSLSessionConfig_default __attribute__((availability(macos,introduced=10.2,deprecated=10.13,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=11.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_ATSv1 __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_ATSv1_noPFS __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_standard __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_RC4_fallback __attribute__((availability(macos,introduced=10.2,deprecated=10.13,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=11.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_TLSv1_fallback __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_TLSv1_RC4_fallback __attribute__((availability(macos,introduced=10.2,deprecated=10.13,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=11.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_legacy __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_legacy_DHE __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_anonymous __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_3DES_fallback __attribute__((availability(macos,introduced=10.2,deprecated=10.13,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=11.0,message="No longer supported. Use Network.framework."))); extern const CFStringRef kSSLSessionConfig_TLSv1_3DES_fallback __attribute__((availability(macos,introduced=10.2,deprecated=10.13,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=11.0,message="No longer supported. Use Network.framework."))); CFTypeID SSLContextGetTypeID(void) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); _Nullable SSLContextRef SSLCreateContext(CFAllocatorRef _Nullable alloc, SSLProtocolSide protocolSide, SSLConnectionType connectionType) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLNewContext (Boolean isServer, SSLContextRef * _Nonnull __attribute__((cf_returns_retained)) contextPtr) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLDisposeContext (SSLContextRef context) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetSessionState (SSLContextRef context, SSLSessionState *state) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetSessionOption (SSLContextRef context, SSLSessionOption option, Boolean value) __attribute__((availability(macos,introduced=10.6,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetSessionOption (SSLContextRef context, SSLSessionOption option, Boolean *value) __attribute__((availability(macos,introduced=10.6,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetIOFuncs (SSLContextRef context, SSLReadFunc readFunc, SSLWriteFunc writeFunc) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetSessionConfig(SSLContextRef context, CFStringRef config) __attribute__((availability(macos,introduced=10.12,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=10.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetProtocolVersionMin (SSLContextRef context, SSLProtocol minVersion) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetProtocolVersionMin (SSLContextRef context, SSLProtocol *minVersion) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetProtocolVersionMax (SSLContextRef context, SSLProtocol maxVersion) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetProtocolVersionMax (SSLContextRef context, SSLProtocol *maxVersion) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetProtocolVersionEnabled (SSLContextRef context, SSLProtocol protocol, Boolean enable) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetProtocolVersionEnabled(SSLContextRef context, SSLProtocol protocol, Boolean *enable) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLSetProtocolVersion (SSLContextRef context, SSLProtocol version) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported. Use Network.framework."))); OSStatus SSLGetProtocolVersion (SSLContextRef context, SSLProtocol *protocol) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported. Use Network.framework."))); OSStatus SSLSetCertificate (SSLContextRef context, CFArrayRef _Nullable certRefs) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetConnection (SSLContextRef context, SSLConnectionRef _Nullable connection) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetConnection (SSLContextRef context, SSLConnectionRef * _Nonnull __attribute__((cf_returns_not_retained)) connection) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetPeerDomainName (SSLContextRef context, const char * _Nullable peerName, size_t peerNameLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetPeerDomainNameLength (SSLContextRef context, size_t *peerNameLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetPeerDomainName (SSLContextRef context, char *peerName, size_t *peerNameLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyRequestedPeerNameLength (SSLContextRef ctx, size_t *peerNameLen) __attribute__((availability(macos,introduced=10.11,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=9.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyRequestedPeerName (SSLContextRef context, char *peerName, size_t *peerNameLen) __attribute__((availability(macos,introduced=10.11,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=9.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetDatagramHelloCookie (SSLContextRef dtlsContext, const void * _Nullable cookie, size_t cookieLen) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetMaxDatagramRecordSize (SSLContextRef dtlsContext, size_t maxSize) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetMaxDatagramRecordSize (SSLContextRef dtlsContext, size_t *maxSize) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetNegotiatedProtocolVersion (SSLContextRef context, SSLProtocol *protocol) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetNumberSupportedCiphers (SSLContextRef context, size_t *numCiphers) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetSupportedCiphers (SSLContextRef context, SSLCipherSuite *ciphers, size_t *numCiphers) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetNumberEnabledCiphers (SSLContextRef context, size_t *numCiphers) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetEnabledCiphers (SSLContextRef context, const SSLCipherSuite *ciphers, size_t numCiphers) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetEnabledCiphers (SSLContextRef context, SSLCipherSuite *ciphers, size_t *numCiphers) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetSessionTicketsEnabled (SSLContextRef context, Boolean enabled) __attribute__((availability(macos,introduced=10.13,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=11.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetEnableCertVerify (SSLContextRef context, Boolean enableVerify) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetEnableCertVerify (SSLContextRef context, Boolean *enableVerify) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLSetAllowsExpiredCerts (SSLContextRef context, Boolean allowsExpired) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetAllowsExpiredCerts (SSLContextRef context, Boolean *allowsExpired) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLSetAllowsExpiredRoots (SSLContextRef context, Boolean allowsExpired) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetAllowsExpiredRoots (SSLContextRef context, Boolean *allowsExpired) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLSetAllowsAnyRoot (SSLContextRef context, Boolean anyRoot) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetAllowsAnyRoot (SSLContextRef context, Boolean *anyRoot) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLSetTrustedRoots (SSLContextRef context, CFArrayRef trustedRoots, Boolean replaceExisting) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyTrustedRoots (SSLContextRef context, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) trustedRoots) __attribute__((availability(macos,introduced=10.5,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyPeerCertificates (SSLContextRef context, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) certs) __attribute__((availability(macos,introduced=10.5,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyPeerTrust (SSLContextRef context, SecTrustRef * _Nonnull __attribute__((cf_returns_retained)) trust) __attribute__((availability(macos,introduced=10.6,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetPeerID (SSLContextRef context, const void * _Nullable peerID, size_t peerIDLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetPeerID (SSLContextRef context, const void * _Nullable * _Nonnull peerID, size_t *peerIDLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetNegotiatedCipher (SSLContextRef context, SSLCipherSuite *cipherSuite) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetALPNProtocols (SSLContextRef context, CFArrayRef protocols) __attribute__((availability(macos,introduced=10.13,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=11.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyALPNProtocols (SSLContextRef context, CFArrayRef _Nullable * _Nonnull protocols) __attribute__((availability(macos,introduced=10.13,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=11.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetOCSPResponse (SSLContextRef context, CFDataRef _Nonnull response) __attribute__((availability(macos,introduced=10.13,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=11.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetEncryptionCertificate (SSLContextRef context, CFArrayRef certRefs) __attribute__((availability(macos,introduced=10.2,deprecated=10.11,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=9.0,message="No longer supported. Use Network.framework."))); typedef int SSLAuthenticate; enum { kNeverAuthenticate, kAlwaysAuthenticate, kTryAuthenticate }; OSStatus SSLSetClientSideAuthenticate (SSLContextRef context, SSLAuthenticate auth) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLAddDistinguishedName (SSLContextRef context, const void * _Nullable derDN, size_t derDNLen) __attribute__((availability(macos,introduced=10.4,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetCertificateAuthorities(SSLContextRef context, CFTypeRef certificateOrArray, Boolean replaceExisting) __attribute__((availability(macos,introduced=10.5,deprecated=10.15,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyCertificateAuthorities(SSLContextRef context, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) certificates) __attribute__((availability(macos,introduced=10.5,deprecated=10.15,message="No longer supported. Use Network.framework."))); OSStatus SSLCopyDistinguishedNames (SSLContextRef context, CFArrayRef * _Nonnull __attribute__((cf_returns_retained)) names) __attribute__((availability(macos,introduced=10.5,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetClientCertificateState (SSLContextRef context, SSLClientCertificateState *clientState) __attribute__((availability(macos,introduced=10.3,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetDiffieHellmanParams (SSLContextRef context, const void * _Nullable dhParams, size_t dhParamsLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))); OSStatus SSLGetDiffieHellmanParams (SSLContextRef context, const void * _Nullable * _Nonnull dhParams, size_t *dhParamsLen) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))); OSStatus SSLSetRsaBlinding (SSLContextRef context, Boolean blinding) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLGetRsaBlinding (SSLContextRef context, Boolean *blinding) __attribute__((availability(macos,introduced=10.2,deprecated=10.9,message="No longer supported. Use Network.framework."))); OSStatus SSLHandshake (SSLContextRef context) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLReHandshake (SSLContextRef context) __attribute__((availability(macos,introduced=10.12,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=10.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLWrite (SSLContextRef context, const void * _Nullable data, size_t dataLength, size_t *processed) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLRead (SSLContextRef context, void * data, size_t dataLength, size_t *processed) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetBufferedReadSize (SSLContextRef context, size_t *bufferSize) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLGetDatagramWriteSize (SSLContextRef dtlsContext, size_t *bufSize) __attribute__((availability(macos,introduced=10.8,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLClose (SSLContextRef context) __attribute__((availability(macos,introduced=10.2,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=5.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); OSStatus SSLSetError (SSLContextRef context, OSStatus status) __attribute__((availability(macos,introduced=10.13,deprecated=10.15,message="No longer supported. Use Network.framework."))) __attribute__((availability(ios,introduced=11.0,deprecated=13.0,message="No longer supported. Use Network.framework."))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecTransformErrorDomain; extern const CFStringRef kSecTransformPreviousErrorKey; extern const CFStringRef kSecTransformAbortOriginatorKey; enum { kSecTransformErrorAttributeNotFound = 1, kSecTransformErrorInvalidOperation = 2, kSecTransformErrorNotInitializedCorrectly = 3, kSecTransformErrorMoreThanOneOutput = 4, kSecTransformErrorInvalidInputDictionary = 5, kSecTransformErrorInvalidAlgorithm = 6, kSecTransformErrorInvalidLength = 7, kSecTransformErrorInvalidType = 8, kSecTransformErrorInvalidInput = 10, kSecTransformErrorNameAlreadyRegistered = 11, kSecTransformErrorUnsupportedAttribute = 12, kSecTransformOperationNotSupportedOnGroup = 13, kSecTransformErrorMissingParameter = 14, kSecTransformErrorInvalidConnection = 15, kSecTransformTransformIsExecuting = 16, kSecTransformInvalidOverride = 17, kSecTransformTransformIsNotRegistered = 18, kSecTransformErrorAbortInProgress = 19, kSecTransformErrorAborted = 20, kSecTransformInvalidArgument = 21 }; typedef CFTypeRef SecTransformRef; typedef CFTypeRef SecGroupTransformRef; extern CFTypeID SecTransformGetTypeID(void) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern CFTypeID SecGroupTransformGetTypeID(void) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern const CFStringRef kSecTransformInputAttributeName __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern const CFStringRef kSecTransformOutputAttributeName __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern const CFStringRef kSecTransformDebugAttributeName __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern const CFStringRef kSecTransformTransformName __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern const CFStringRef kSecTransformAbortAttributeName __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern _Nullable SecTransformRef SecTransformCreateFromExternalRepresentation( CFDictionaryRef dictionary, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern CFDictionaryRef SecTransformCopyExternalRepresentation( SecTransformRef transformRef) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern SecGroupTransformRef SecTransformCreateGroupTransform(void) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern _Nullable SecGroupTransformRef SecTransformConnectTransforms(SecTransformRef sourceTransformRef, CFStringRef sourceAttributeName, SecTransformRef destinationTransformRef, CFStringRef destinationAttributeName, SecGroupTransformRef group, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern Boolean SecTransformSetAttribute(SecTransformRef transformRef, CFStringRef key, CFTypeRef value, CFErrorRef *error) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern _Nullable CFTypeRef SecTransformGetAttribute(SecTransformRef transformRef, CFStringRef key) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern _Nullable SecTransformRef SecTransformFindByName(SecGroupTransformRef transform, CFStringRef name) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); extern __attribute__((cf_returns_retained)) CFTypeRef SecTransformExecute(SecTransformRef transformRef, CFErrorRef* errorRef) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); typedef void (*SecMessageBlock)(CFTypeRef _Nullable message, CFErrorRef _Nullable error, Boolean isFinal); extern void SecTransformExecuteAsync(SecTransformRef transformRef, dispatch_queue_t deliveryQueue, SecMessageBlock deliveryBlock) __attribute__((availability(macos,introduced=10.7,deprecated=12.0,message="SecTransform is no longer supported"))) __attribute__((availability(ios,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(tvos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(watchos,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))) __attribute__((availability(macCatalyst,introduced=NA,deprecated=NA,message="SecTransform is no longer supported"))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef CFIndex SecTransformMetaAttributeType; enum { kSecTransformMetaAttributeValue, kSecTransformMetaAttributeName, kSecTransformMetaAttributeRef, kSecTransformMetaAttributeRequired, kSecTransformMetaAttributeRequiresOutboundConnection, kSecTransformMetaAttributeDeferred, kSecTransformMetaAttributeStream, kSecTransformMetaAttributeCanCycle, kSecTransformMetaAttributeExternalize, kSecTransformMetaAttributeHasOutboundConnections, kSecTransformMetaAttributeHasInboundConnection }; typedef CFTypeRef SecTransformAttributeRef; typedef CFTypeRef SecTransformStringOrAttributeRef; typedef CFTypeRef _Nullable (*SecTransformActionBlock)(void); typedef CFTypeRef _Nullable (*SecTransformAttributeActionBlock)( SecTransformAttributeRef attribute, CFTypeRef value); typedef CFTypeRef _Nullable (*SecTransformDataBlock)(CFTypeRef data); typedef CFErrorRef _Nullable (*SecTransformInstanceBlock)(void); typedef const struct OpaqueSecTransformImplementation* SecTransformImplementationRef; extern _Nullable CFErrorRef SecTransformSetAttributeAction(SecTransformImplementationRef ref, CFStringRef action, SecTransformStringOrAttributeRef _Nullable attribute, SecTransformAttributeActionBlock newAction); extern _Nullable CFErrorRef SecTransformSetDataAction(SecTransformImplementationRef ref, CFStringRef action, SecTransformDataBlock newAction); extern _Nullable CFErrorRef SecTransformSetTransformAction(SecTransformImplementationRef ref, CFStringRef action, SecTransformActionBlock newAction); extern _Nullable CFTypeRef SecTranformCustomGetAttribute(SecTransformImplementationRef ref, SecTransformStringOrAttributeRef attribute, SecTransformMetaAttributeType type) __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); extern _Nullable CFTypeRef SecTransformCustomGetAttribute(SecTransformImplementationRef ref, SecTransformStringOrAttributeRef attribute, SecTransformMetaAttributeType type) __asm__("_SecTranformCustomGetAttribute"); extern _Nullable CFTypeRef SecTransformCustomSetAttribute(SecTransformImplementationRef ref, SecTransformStringOrAttributeRef attribute, SecTransformMetaAttributeType type, CFTypeRef _Nullable value); extern _Nullable CFTypeRef SecTransformPushbackAttribute(SecTransformImplementationRef ref, SecTransformStringOrAttributeRef attribute, CFTypeRef value); typedef SecTransformInstanceBlock _Nonnull (*SecTransformCreateFP)(CFStringRef name, SecTransformRef newTransform, SecTransformImplementationRef ref); extern const CFStringRef kSecTransformActionCanExecute; extern const CFStringRef kSecTransformActionStartingExecution; extern const CFStringRef kSecTransformActionFinalize; extern const CFStringRef kSecTransformActionExternalizeExtraData; extern const CFStringRef kSecTransformActionProcessData; extern const CFStringRef kSecTransformActionInternalizeExtraData; extern const CFStringRef kSecTransformActionAttributeNotification; extern const CFStringRef kSecTransformActionAttributeValidation; extern Boolean SecTransformRegister(CFStringRef uniqueName, SecTransformCreateFP createTransformFunction, CFErrorRef* error) __attribute__((availability(macosx,introduced=10.7))); extern _Nullable SecTransformRef SecTransformCreate(CFStringRef name, CFErrorRef *error) __attribute__((availability(macosx,introduced=10.7))); extern CFTypeRef SecTransformNoData(void); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecBase64Encoding; extern const CFStringRef kSecBase32Encoding; extern const CFStringRef kSecZLibEncoding; extern const CFStringRef kSecEncodeTypeAttribute; extern const CFStringRef kSecLineLength64; extern const CFStringRef kSecLineLength76; extern const CFStringRef kSecEncodeLineLengthAttribute; extern const CFStringRef kSecCompressionRatio; _Nullable SecTransformRef SecEncodeTransformCreate(CFTypeRef encodeType, CFErrorRef* error ) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecDecodeTypeAttribute; _Nullable SecTransformRef SecDecodeTransformCreate(CFTypeRef DecodeType, CFErrorRef* error ) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecDigestMD2; extern const CFStringRef kSecDigestMD4; extern const CFStringRef kSecDigestMD5; extern const CFStringRef kSecDigestSHA1; extern const CFStringRef kSecDigestSHA2; extern const CFStringRef kSecDigestHMACMD5; extern const CFStringRef kSecDigestHMACSHA1; extern const CFStringRef kSecDigestHMACSHA2; extern const CFStringRef kSecDigestTypeAttribute; extern const CFStringRef kSecDigestLengthAttribute; extern const CFStringRef kSecDigestHMACKeyAttribute; SecTransformRef SecDigestTransformCreate(CFTypeRef _Nullable digestType, CFIndex digestLength, CFErrorRef* error ) __attribute__((availability(macosx,introduced=10.7))); CFTypeID SecDigestTransformGetTypeID(void) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end }; extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecPaddingNoneKey; extern const CFStringRef kSecPaddingPKCS1Key; extern const CFStringRef kSecPaddingPKCS5Key; extern const CFStringRef kSecPaddingPKCS7Key; extern const CFStringRef kSecPaddingOAEPKey __attribute__((availability(macosx,introduced=10.8))); extern const CFStringRef kSecModeNoneKey; extern const CFStringRef kSecModeECBKey; extern const CFStringRef kSecModeCBCKey; extern const CFStringRef kSecModeCFBKey; extern const CFStringRef kSecModeOFBKey; extern const CFStringRef kSecEncryptKey; extern const CFStringRef kSecPaddingKey; extern const CFStringRef kSecIVKey; extern const CFStringRef kSecEncryptionMode; extern const CFStringRef kSecOAEPMessageLengthAttributeName __attribute__((availability(macosx,introduced=10.8))); extern const CFStringRef kSecOAEPEncodingParametersAttributeName __attribute__((availability(macosx,introduced=10.8))); extern const CFStringRef kSecOAEPMGF1DigestAlgorithmAttributeName __attribute__((availability(macosx,introduced=10.8))); SecTransformRef SecEncryptTransformCreate(SecKeyRef keyRef, CFErrorRef* error) __attribute__((availability(macosx,introduced=10.7))); SecTransformRef SecDecryptTransformCreate(SecKeyRef keyRef, CFErrorRef* error) __attribute__((availability(macosx,introduced=10.7))); CFTypeID SecDecryptTransformGetTypeID(void) __attribute__((availability(macosx,introduced=10.7))); CFTypeID SecEncryptTransformGetTypeID(void) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end }; extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kSecKeyAttributeName, kSecSignatureAttributeName, kSecInputIsAttributeName; extern const CFStringRef kSecInputIsPlainText, kSecInputIsDigest, kSecInputIsRaw; _Nullable SecTransformRef SecSignTransformCreate(SecKeyRef key, CFErrorRef* error ) __attribute__((availability(macosx,introduced=10.7))); _Nullable SecTransformRef SecVerifyTransformCreate(SecKeyRef key, CFDataRef _Nullable signature, CFErrorRef* error ) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end }; extern "C" { #pragma clang assume_nonnull begin SecTransformRef SecTransformCreateReadTransformWithReadStream(CFReadStreamRef inputStream) __attribute__((availability(macosx,introduced=10.7))); #pragma clang assume_nonnull end }; extern "C" { typedef uint8_t DERByte; typedef uint16_t DERShort; typedef uint32_t DERInt; typedef uint64_t DERLong; typedef size_t DERSize; typedef bool DERBool; typedef DERLong DERTag; } extern "C" { typedef struct { DERByte * data; DERSize length; } DERItem; } extern "C" { extern const DERItem oidRsa, oidMd2Rsa, oidMd4Rsa, oidMd5Rsa, oidSha1Rsa, oidSha256Rsa, oidSha384Rsa, oidSha512Rsa, oidSha224Rsa, oidEcPubKey, oidSha1Ecdsa, oidSha224Ecdsa, oidSha256Ecdsa, oidSha384Ecdsa, oidSha512Ecdsa, oidSha1Dsa, oidMd2, oidMd4, oidMd5, oidSha1, oidSha1DsaOIW, oidSha1DsaCommonOIW, oidSha1RsaOIW, oidSha256, oidSha384, oidSha512, oidSha224, oidFee, oidMd5Fee, oidSha1Fee, oidEcPrime192v1, oidEcPrime256v1, oidAnsip384r1, oidAnsip521r1; extern const DERItem oidSubjectKeyIdentifier, oidKeyUsage, oidPrivateKeyUsagePeriod, oidSubjectAltName, oidIssuerAltName, oidBasicConstraints, oidNameConstraints, oidCrlDistributionPoints, oidCertificatePolicies, oidAnyPolicy, oidPolicyMappings, oidAuthorityKeyIdentifier, oidPolicyConstraints, oidExtendedKeyUsage, oidAnyExtendedKeyUsage, oidInhibitAnyPolicy, oidAuthorityInfoAccess, oidSubjectInfoAccess, oidAdOCSP, oidAdCAIssuer, oidNetscapeCertType, oidEntrustVersInfo, oidMSNTPrincipalName; extern const DERItem oidQtCps, oidQtUNotice; extern const DERItem oidCommonName, oidCountryName, oidLocalityName, oidStateOrProvinceName, oidOrganizationName, oidOrganizationalUnitName, oidDescription, oidEmailAddress, oidFriendlyName, oidLocalKeyId; extern const DERItem oidExtendedKeyUsageServerAuth, oidExtendedKeyUsageClientAuth, oidExtendedKeyUsageCodeSigning, oidExtendedKeyUsageEmailProtection, oidExtendedKeyUsageTimeStamping, oidExtendedKeyUsageOCSPSigning, oidExtendedKeyUsageIPSec, oidExtendedKeyUsageMicrosoftSGC, oidExtendedKeyUsageNetscapeSGC; extern const DERItem oidGoogleEmbeddedSignedCertificateTimestamp, oidGoogleOCSPSignedCertificateTimestamp; } // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSURLCredentialPersistence; enum { NSURLCredentialPersistenceNone, NSURLCredentialPersistenceForSession, NSURLCredentialPersistencePermanent, NSURLCredentialPersistenceSynchronizable __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) }; // @class NSURLCredentialInternal; #ifndef _REWRITER_typedef_NSURLCredentialInternal #define _REWRITER_typedef_NSURLCredentialInternal typedef struct objc_object NSURLCredentialInternal; typedef struct {} _objc_exc_NSURLCredentialInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLCredential #define _REWRITER_typedef_NSURLCredential typedef struct objc_object NSURLCredential; typedef struct {} _objc_exc_NSURLCredential; #endif struct NSURLCredential_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLCredentialInternal *_internal; }; // @property (readonly) NSURLCredentialPersistence persistence; /* @end */ // @interface NSURLCredential(NSInternetPassword) // - (instancetype)initWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence; // + (NSURLCredential *)credentialWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence; // @property (nullable, readonly, copy) NSString *user; // @property (nullable, readonly, copy) NSString *password; // @property (readonly) BOOL hasPassword; /* @end */ // @interface NSURLCredential(NSClientCertificate) // - (instancetype)initWithIdentity:(SecIdentityRef)identity certificates:(nullable NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSURLCredential *)credentialWithIdentity:(SecIdentityRef)identity certificates:(nullable NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly) SecIdentityRef identity; // @property (readonly, copy) NSArray *certificates __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSURLCredential(NSServerTrust) // - (instancetype)initWithTrust:(SecTrustRef)trust __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSURLCredential *)credentialForTrust:(SecTrustRef)trust __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #pragma clang assume_nonnull begin extern "C" NSString * const NSURLProtectionSpaceHTTP __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLProtectionSpaceHTTPS __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLProtectionSpaceFTP __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLProtectionSpaceHTTPProxy __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLProtectionSpaceHTTPSProxy __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLProtectionSpaceFTPProxy __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLProtectionSpaceSOCKSProxy __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodDefault __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodHTTPBasic __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodHTTPDigest __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodHTMLForm __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodNTLM __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodNegotiate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodClientCertificate __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLAuthenticationMethodServerTrust __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @class NSURLProtectionSpaceInternal; #ifndef _REWRITER_typedef_NSURLProtectionSpaceInternal #define _REWRITER_typedef_NSURLProtectionSpaceInternal typedef struct objc_object NSURLProtectionSpaceInternal; typedef struct {} _objc_exc_NSURLProtectionSpaceInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLProtectionSpace #define _REWRITER_typedef_NSURLProtectionSpace typedef struct objc_object NSURLProtectionSpace; typedef struct {} _objc_exc_NSURLProtectionSpace; #endif struct NSURLProtectionSpace_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLProtectionSpaceInternal *_internal; }; // - (instancetype)initWithHost:(NSString *)host port:(NSInteger)port protocol:(nullable NSString *)protocol realm:(nullable NSString *)realm authenticationMethod:(nullable NSString *)authenticationMethod; // - (instancetype)initWithProxyHost:(NSString *)host port:(NSInteger)port type:(nullable NSString *)type realm:(nullable NSString *)realm authenticationMethod:(nullable NSString *)authenticationMethod; // @property (nullable, readonly, copy) NSString *realm; // @property (readonly) BOOL receivesCredentialSecurely; // @property (readonly) BOOL isProxy; // @property (readonly, copy) NSString *host; // @property (readonly) NSInteger port; // @property (nullable, readonly, copy) NSString *proxyType; // @property (nullable, readonly, copy) NSString *protocol; // @property (readonly, copy) NSString *authenticationMethod; /* @end */ // @interface NSURLProtectionSpace(NSClientCertificateSpace) // @property (nullable, readonly, copy) NSArray<NSData *> *distinguishedNames __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSURLProtectionSpace(NSServerTrustValidationSpace) // @property (nullable, readonly) SecTrustRef serverTrust __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSURLCredential; #ifndef _REWRITER_typedef_NSURLCredential #define _REWRITER_typedef_NSURLCredential typedef struct objc_object NSURLCredential; typedef struct {} _objc_exc_NSURLCredential; #endif // @class NSURLSessionTask; #ifndef _REWRITER_typedef_NSURLSessionTask #define _REWRITER_typedef_NSURLSessionTask typedef struct objc_object NSURLSessionTask; typedef struct {} _objc_exc_NSURLSessionTask; #endif // @class NSURLCredentialStorageInternal; #ifndef _REWRITER_typedef_NSURLCredentialStorageInternal #define _REWRITER_typedef_NSURLCredentialStorageInternal typedef struct objc_object NSURLCredentialStorageInternal; typedef struct {} _objc_exc_NSURLCredentialStorageInternal; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLCredentialStorage #define _REWRITER_typedef_NSURLCredentialStorage typedef struct objc_object NSURLCredentialStorage; typedef struct {} _objc_exc_NSURLCredentialStorage; #endif struct NSURLCredentialStorage_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLCredentialStorageInternal *_internal; }; @property (class, readonly, strong) NSURLCredentialStorage *sharedCredentialStorage; // - (nullable NSDictionary<NSString *, NSURLCredential *> *)credentialsForProtectionSpace:(NSURLProtectionSpace *)space; // @property (readonly, copy) NSDictionary<NSURLProtectionSpace *, NSDictionary<NSString *, NSURLCredential *> *> *allCredentials; // - (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space; // - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space; // - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space options:(nullable NSDictionary<NSString *, id> *)options __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURLCredential *)defaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space; // - (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space; /* @end */ // @interface NSURLCredentialStorage (NSURLSessionTaskAdditions) // - (void)getCredentialsForProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task completionHandler:(void (^) (NSDictionary<NSString *, NSURLCredential *> * _Nullable credentials))completionHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((swift_async_name("credentials(for:task:)"))); // - (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace options:(nullable NSDictionary<NSString *, id> *)options task:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)getDefaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space task:(NSURLSessionTask *)task completionHandler:(void (^) (NSURLCredential * _Nullable credential))completionHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSNotificationName const NSURLCredentialStorageChangedNotification __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString *const NSURLCredentialStorageRemoveSynchronizableCredentials __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end #pragma pack(push, 2) enum { kClippingCreator = 'drag', kClippingPictureType = 'clpp', kClippingTextType = 'clpt', kClippingSoundType = 'clps', kClippingUnknownType = 'clpu' }; enum { kInternetLocationCreator = 'drag', kInternetLocationHTTP = 'ilht', kInternetLocationFTP = 'ilft', kInternetLocationFile = 'ilfi', kInternetLocationMail = 'ilma', kInternetLocationNNTP = 'ilnw', kInternetLocationAFP = 'ilaf', kInternetLocationAppleTalk = 'ilat', kInternetLocationNSL = 'ilns', kInternetLocationGeneric = 'ilge' }; enum { kCustomIconResource = -16455 }; enum { kCustomBadgeResourceType = 'badg', kCustomBadgeResourceID = kCustomIconResource, kCustomBadgeResourceVersion = 0 }; struct CustomBadgeResource { SInt16 version; SInt16 customBadgeResourceID; OSType customBadgeType; OSType customBadgeCreator; OSType windowBadgeType; OSType windowBadgeCreator; OSType overrideType; OSType overrideCreator; }; typedef struct CustomBadgeResource CustomBadgeResource; typedef CustomBadgeResource * CustomBadgeResourcePtr; typedef CustomBadgeResourcePtr * CustomBadgeResourceHandle; enum { kRoutingResourceType = 'rout', kRoutingResourceID = 0 }; struct RoutingResourceEntry { OSType creator; OSType fileType; OSType targetFolder; OSType destinationFolder; OSType reservedField; }; typedef struct RoutingResourceEntry RoutingResourceEntry; typedef RoutingResourceEntry * RoutingResourcePtr; typedef RoutingResourcePtr * RoutingResourceHandle; enum { kContainerFolderAliasType = 'fdrp', kContainerTrashAliasType = 'trsh', kContainerHardDiskAliasType = 'hdsk', kContainerFloppyAliasType = 'flpy', kContainerServerAliasType = 'srvr', kApplicationAliasType = 'adrp', kContainerAliasType = 'drop', kDesktopPrinterAliasType = 'dtpa', kContainerCDROMAliasType = 'cddr', kApplicationCPAliasType = 'acdp', kApplicationDAAliasType = 'addp', kPackageAliasType = 'fpka', kAppPackageAliasType = 'fapa' }; enum { kSystemFolderAliasType = 'fasy', kAppleMenuFolderAliasType = 'faam', kStartupFolderAliasType = 'fast', kPrintMonitorDocsFolderAliasType = 'fapn', kPreferencesFolderAliasType = 'fapf', kControlPanelFolderAliasType = 'fact', kExtensionFolderAliasType = 'faex' }; enum { kExportedFolderAliasType = 'faet', kDropFolderAliasType = 'fadr', kSharedFolderAliasType = 'fash', kMountedFolderAliasType = 'famn' }; enum { kIsOnDesk = 0x0001, kColor = 0x000E, kIsShared = 0x0040, kHasNoINITs = 0x0080, kHasBeenInited = 0x0100, kHasCustomIcon = 0x0400, kIsStationery = 0x0800, kNameLocked = 0x1000, kHasBundle = 0x2000, kIsInvisible = 0x4000, kIsAlias = 0x8000 }; enum { fOnDesk = kIsOnDesk, fHasBundle = kHasBundle, fInvisible = kIsInvisible }; enum { fTrash = -3, fDesktop = -2, fDisk = 0 }; enum { kExtendedFlagsAreInvalid = 0x8000, kExtendedFlagHasCustomBadge = 0x0100, kExtendedFlagObjectIsBusy = 0x0080, kExtendedFlagHasRoutingInfo = 0x0004 }; enum { kFirstMagicBusyFiletype = 'bzy ', kLastMagicBusyFiletype = 'bzy?' }; enum { kMagicBusyCreationDate = 0x4F3AFDB0 }; struct FileInfo { OSType fileType; OSType fileCreator; UInt16 finderFlags; Point location; UInt16 reservedField; }; typedef struct FileInfo FileInfo; struct FolderInfo { Rect windowBounds; UInt16 finderFlags; Point location; UInt16 reservedField; }; typedef struct FolderInfo FolderInfo; struct ExtendedFileInfo { SInt16 reserved1[4]; UInt16 extendedFinderFlags; SInt16 reserved2; SInt32 putAwayFolderID; }; typedef struct ExtendedFileInfo ExtendedFileInfo; struct ExtendedFolderInfo { Point scrollPosition; SInt32 reserved1; UInt16 extendedFinderFlags; SInt16 reserved2; SInt32 putAwayFolderID; }; typedef struct ExtendedFolderInfo ExtendedFolderInfo; struct FInfo { OSType fdType; OSType fdCreator; UInt16 fdFlags; Point fdLocation; SInt16 fdFldr; }; typedef struct FInfo FInfo; struct FXInfo { SInt16 fdIconID; SInt16 fdReserved[3]; SInt8 fdScript; SInt8 fdXFlags; SInt16 fdComment; SInt32 fdPutAway; }; typedef struct FXInfo FXInfo; struct DInfo { Rect frRect; UInt16 frFlags; Point frLocation; SInt16 frView; }; typedef struct DInfo DInfo; struct DXInfo { Point frScroll; SInt32 frOpenChain; SInt8 frScript; SInt8 frXFlags; SInt16 frComment; SInt32 frPutAway; }; typedef struct DXInfo DXInfo; #pragma pack(pop) extern "C" { extern Fixed FixRatio( short numer, short denom) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fixed FixMul( Fixed a, Fixed b) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern short FixRound(Fixed x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract Fix2Frac(Fixed x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 Fix2Long(Fixed x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fixed Long2Fix(SInt32 x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fixed Frac2Fix(Fract x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract FracMul( Fract x, Fract y) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fixed FixDiv( Fixed x, Fixed y) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract FracDiv( Fract x, Fract y) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract FracSqrt(Fract x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract FracSin(Fixed x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract FracCos(Fixed x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fixed FixATan2( SInt32 x, SInt32 y) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern double Frac2X(Fract x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern double Fix2X(Fixed x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fixed X2Fix(double x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Fract X2Frac(double x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern short WideCompare( const wide * target, const wide * source) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideAdd( wide * target, const wide * source) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideSubtract( wide * target, const wide * source) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideNegate(wide * target) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideShift( wide * target, SInt32 shift) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt32 WideSquareRoot(const wide * source) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideMultiply( SInt32 multiplicand, SInt32 multiplier, wide * target) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 WideDivide( const wide * dividend, SInt32 divisor, SInt32 * remainder) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideWideDivide( wide * dividend, SInt32 divisor, SInt32 * remainder) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern wide * WideBitShift( wide * target, SInt32 shift) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UnsignedFixed UnsignedFixedMulDiv( UnsignedFixed value, UnsignedFixed multiplier, UnsignedFixed divisor) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); } #pragma pack(push, 2) enum { itlcShowIcon = 7, itlcDualCaret = 6, itlcSysDirection = 15 }; enum { itlcDisableKeyScriptSync = 3 }; enum { itlcDisableKeyScriptSyncMask = 1 << itlcDisableKeyScriptSync }; enum { tokLeftQuote = 1, tokRightQuote = 2, tokLeadPlacer = 3, tokLeader = 4, tokNonLeader = 5, tokZeroLead = 6, tokPercent = 7, tokPlusSign = 8, tokMinusSign = 9, tokThousands = 10, tokReserved = 11, tokSeparator = 12, tokEscape = 13, tokDecPoint = 14, tokEPlus = 15, tokEMinus = 16, tokMaxSymbols = 31, curNumberPartsVersion = 1 }; enum { currSymLead = 16, currNegSym = 32, currTrailingZ = 64, currLeadingZ = 128 }; enum { mdy = 0, dmy = 1, ymd = 2, myd = 3, dym = 4, ydm = 5 }; typedef SInt8 DateOrders; enum { timeCycle24 = 0, timeCycleZero = 1, timeCycle12 = 255, zeroCycle = 1, longDay = 0, longWeek = 1, longMonth = 2, longYear = 3, supDay = 1, supWeek = 2, supMonth = 4, supYear = 8, dayLdingZ = 32, mntLdingZ = 64, century = 128, secLeadingZ = 32, minLeadingZ = 64, hrLeadingZ = 128 }; struct OffPair { short offFirst; short offSecond; }; typedef struct OffPair OffPair; typedef OffPair OffsetTable[3]; struct Intl0Rec { char decimalPt; char thousSep; char listSep; char currSym1; char currSym2; char currSym3; UInt8 currFmt; UInt8 dateOrder; UInt8 shrtDateFmt; char dateSep; UInt8 timeCycle; UInt8 timeFmt; char mornStr[4]; char eveStr[4]; char timeSep; char time1Suff; char time2Suff; char time3Suff; char time4Suff; char time5Suff; char time6Suff; char time7Suff; char time8Suff; UInt8 metricSys; short intl0Vers; }; typedef struct Intl0Rec Intl0Rec; typedef Intl0Rec * Intl0Ptr; typedef Intl0Ptr * Intl0Hndl; struct Intl1Rec { Str15 days[7]; Str15 months[12]; UInt8 suppressDay; UInt8 lngDateFmt; UInt8 dayLeading0; UInt8 abbrLen; char st0[4]; char st1[4]; char st2[4]; char st3[4]; char st4[4]; short intl1Vers; short localRtn[1]; }; typedef struct Intl1Rec Intl1Rec; typedef Intl1Rec * Intl1Ptr; typedef Intl1Ptr * Intl1Hndl; struct Itl1ExtRec { Intl1Rec base; short version; short format; short calendarCode; SInt32 extraDaysTableOffset; SInt32 extraDaysTableLength; SInt32 extraMonthsTableOffset; SInt32 extraMonthsTableLength; SInt32 abbrevDaysTableOffset; SInt32 abbrevDaysTableLength; SInt32 abbrevMonthsTableOffset; SInt32 abbrevMonthsTableLength; SInt32 extraSepsTableOffset; SInt32 extraSepsTableLength; short tables[1]; }; typedef struct Itl1ExtRec Itl1ExtRec; struct UntokenTable { short len; short lastToken; short index[256]; }; typedef struct UntokenTable UntokenTable; typedef UntokenTable * UntokenTablePtr; typedef UntokenTablePtr * UntokenTableHandle; union WideChar { struct { char lo; char hi; } a; short b; }; typedef union WideChar WideChar; struct WideCharArr { short size; WideChar data[10]; }; typedef struct WideCharArr WideCharArr; struct NumberParts { short version; WideChar data[31]; WideCharArr pePlus; WideCharArr peMinus; WideCharArr peMinusPlus; WideCharArr altNumTable; char reserved[20]; }; typedef struct NumberParts NumberParts; typedef NumberParts * NumberPartsPtr; struct Itl4Rec { short flags; SInt32 resourceType; short resourceNum; short version; SInt32 resHeader1; SInt32 resHeader2; short numTables; SInt32 mapOffset; SInt32 strOffset; SInt32 fetchOffset; SInt32 unTokenOffset; SInt32 defPartsOffset; SInt32 resOffset6; SInt32 resOffset7; SInt32 resOffset8; }; typedef struct Itl4Rec Itl4Rec; typedef Itl4Rec * Itl4Ptr; typedef Itl4Ptr * Itl4Handle; struct NItl4Rec { short flags; SInt32 resourceType; short resourceNum; short version; short format; short resHeader; SInt32 resHeader2; short numTables; SInt32 mapOffset; SInt32 strOffset; SInt32 fetchOffset; SInt32 unTokenOffset; SInt32 defPartsOffset; SInt32 whtSpListOffset; SInt32 resOffset7; SInt32 resOffset8; short resLength1; short resLength2; short resLength3; short unTokenLength; short defPartsLength; short whtSpListLength; short resLength7; short resLength8; }; typedef struct NItl4Rec NItl4Rec; typedef NItl4Rec * NItl4Ptr; typedef NItl4Ptr * NItl4Handle; struct TableDirectoryRecord { OSType tableSignature; UInt32 reserved; UInt32 tableStartOffset; UInt32 tableSize; }; typedef struct TableDirectoryRecord TableDirectoryRecord; struct Itl5Record { Fixed versionNumber; unsigned short numberOfTables; unsigned short reserved[3]; TableDirectoryRecord tableDirectory[1]; }; typedef struct Itl5Record Itl5Record; struct RuleBasedTrslRecord { short sourceType; short targetType; short formatNumber; short propertyFlag; short numberOfRules; }; typedef struct RuleBasedTrslRecord RuleBasedTrslRecord; struct ItlcRecord { short itlcSystem; short itlcReserved; SInt8 itlcFontForce; SInt8 itlcIntlForce; SInt8 itlcOldKybd; SInt8 itlcFlags; short itlcIconOffset; SInt8 itlcIconSide; SInt8 itlcIconRsvd; short itlcRegionCode; short itlcSysFlags; SInt8 itlcReserved4[32]; }; typedef struct ItlcRecord ItlcRecord; struct ItlbRecord { short itlbNumber; short itlbDate; short itlbSort; short itlbFlags; short itlbToken; short itlbEncoding; short itlbLang; SInt8 itlbNumRep; SInt8 itlbDateRep; short itlbKeys; short itlbIcon; }; typedef struct ItlbRecord ItlbRecord; struct ItlbExtRecord { ItlbRecord base; SInt32 itlbLocalSize; short itlbMonoFond; short itlbMonoSize; short itlbPrefFond; short itlbPrefSize; short itlbSmallFond; short itlbSmallSize; short itlbSysFond; short itlbSysSize; short itlbAppFond; short itlbAppSize; short itlbHelpFond; short itlbHelpSize; Style itlbValidStyles; Style itlbAliasStyle; }; typedef struct ItlbExtRecord ItlbExtRecord; #pragma pack(pop) extern "C" { #pragma pack(push, 2) enum { smSystemScript = -1, smCurrentScript = -2, smAllScripts = -3 }; enum { smRoman = 0, smJapanese = 1, smTradChinese = 2, smKorean = 3, smArabic = 4, smHebrew = 5, smGreek = 6, smCyrillic = 7, smRSymbol = 8, smDevanagari = 9, smGurmukhi = 10, smGujarati = 11, smOriya = 12, smBengali = 13, smTamil = 14, smTelugu = 15, smKannada = 16, smMalayalam = 17, smSinhalese = 18, smBurmese = 19, smKhmer = 20, smThai = 21, smLao = 22, smGeorgian = 23, smArmenian = 24, smSimpChinese = 25, smTibetan = 26, smMongolian = 27, smEthiopic = 28, smGeez = 28, smCentralEuroRoman = 29, smVietnamese = 30, smExtArabic = 31, smUninterp = 32 }; enum { smUnicodeScript = 0x7E }; enum { smChinese = 2, smRussian = 7, smLaotian = 22, smAmharic = 28, smSlavic = 29, smEastEurRoman = 29, smSindhi = 31, smKlingon = 32 }; enum { langEnglish = 0, langFrench = 1, langGerman = 2, langItalian = 3, langDutch = 4, langSwedish = 5, langSpanish = 6, langDanish = 7, langPortuguese = 8, langNorwegian = 9, langHebrew = 10, langJapanese = 11, langArabic = 12, langFinnish = 13, langGreek = 14, langIcelandic = 15, langMaltese = 16, langTurkish = 17, langCroatian = 18, langTradChinese = 19, langUrdu = 20, langHindi = 21, langThai = 22, langKorean = 23 }; enum { langLithuanian = 24, langPolish = 25, langHungarian = 26, langEstonian = 27, langLatvian = 28, langSami = 29, langFaroese = 30, langFarsi = 31, langPersian = 31, langRussian = 32, langSimpChinese = 33, langFlemish = 34, langIrishGaelic = 35, langAlbanian = 36, langRomanian = 37, langCzech = 38, langSlovak = 39, langSlovenian = 40, langYiddish = 41, langSerbian = 42, langMacedonian = 43, langBulgarian = 44, langUkrainian = 45, langByelorussian = 46, langBelorussian = 46 }; enum { langUzbek = 47, langKazakh = 48, langAzerbaijani = 49, langAzerbaijanAr = 50, langArmenian = 51, langGeorgian = 52, langMoldavian = 53, langKirghiz = 54, langTajiki = 55, langTurkmen = 56, langMongolian = 57, langMongolianCyr = 58, langPashto = 59, langKurdish = 60, langKashmiri = 61, langSindhi = 62, langTibetan = 63, langNepali = 64, langSanskrit = 65, langMarathi = 66, langBengali = 67, langAssamese = 68, langGujarati = 69, langPunjabi = 70 }; enum { langOriya = 71, langMalayalam = 72, langKannada = 73, langTamil = 74, langTelugu = 75, langSinhalese = 76, langBurmese = 77, langKhmer = 78, langLao = 79, langVietnamese = 80, langIndonesian = 81, langTagalog = 82, langMalayRoman = 83, langMalayArabic = 84, langAmharic = 85, langTigrinya = 86, langOromo = 87, langSomali = 88, langSwahili = 89, langKinyarwanda = 90, langRuanda = 90, langRundi = 91, langNyanja = 92, langChewa = 92, langMalagasy = 93, langEsperanto = 94 }; enum { langWelsh = 128, langBasque = 129, langCatalan = 130, langLatin = 131, langQuechua = 132, langGuarani = 133, langAymara = 134, langTatar = 135, langUighur = 136, langDzongkha = 137, langJavaneseRom = 138, langSundaneseRom = 139, langGalician = 140, langAfrikaans = 141 }; enum { langBreton = 142, langInuktitut = 143, langScottishGaelic = 144, langManxGaelic = 145, langIrishGaelicScript = 146, langTongan = 147, langGreekAncient = 148, langGreenlandic = 149, langAzerbaijanRoman = 150, langNynorsk = 151 }; enum { langUnspecified = 32767 }; enum { langPortugese = 8, langMalta = 16, langYugoslavian = 18, langChinese = 19, langLettish = 28, langLapponian = 29, langLappish = 29, langSaamisk = 29, langFaeroese = 30, langIrish = 35, langGalla = 87, langAfricaans = 141, langGreekPoly = 148 }; enum { verUS = 0, verFrance = 1, verBritain = 2, verGermany = 3, verItaly = 4, verNetherlands = 5, verFlemish = 6, verSweden = 7, verSpain = 8, verDenmark = 9, verPortugal = 10, verFrCanada = 11, verNorway = 12, verIsrael = 13, verJapan = 14, verAustralia = 15, verArabic = 16, verFinland = 17, verFrSwiss = 18, verGrSwiss = 19, verGreece = 20, verIceland = 21, verMalta = 22, verCyprus = 23, verTurkey = 24, verYugoCroatian = 25 }; enum { verNetherlandsComma = 26, verFlemishPoint = 27, verCanadaComma = 28, verCanadaPoint = 29, vervariantPortugal = 30, vervariantNorway = 31, vervariantDenmark = 32 }; enum { verIndiaHindi = 33, verPakistanUrdu = 34, verTurkishModified = 35, verItalianSwiss = 36, verInternational = 37, verRomania = 39, verGreekAncient = 40, verLithuania = 41, verPoland = 42, verHungary = 43, verEstonia = 44, verLatvia = 45, verSami = 46, verFaroeIsl = 47, verIran = 48, verRussia = 49, verIreland = 50, verKorea = 51, verChina = 52, verTaiwan = 53, verThailand = 54, verScriptGeneric = 55, verCzech = 56, verSlovak = 57, verEastAsiaGeneric = 58, verMagyar = 59, verBengali = 60, verBelarus = 61 }; enum { verUkraine = 62, verGreeceAlt = 64, verSerbian = 65, verSlovenian = 66, verMacedonian = 67, verCroatia = 68, verGermanReformed = 70, verBrazil = 71, verBulgaria = 72, verCatalonia = 73, verMultilingual = 74, verScottishGaelic = 75, verManxGaelic = 76, verBreton = 77, verNunavut = 78, verWelsh = 79, verIrishGaelicScript = 81, verEngCanada = 82, verBhutan = 83, verArmenian = 84, verGeorgian = 85, verSpLatinAmerica = 86, verTonga = 88, verFrenchUniversal = 91, verAustria = 92, verGujarati = 94, verPunjabi = 95, verIndiaUrdu = 96, verVietnam = 97 }; enum { verFrBelgium = 98, verUzbek = 99, verSingapore = 100, verNynorsk = 101, verAfrikaans = 102, verEsperanto = 103, verMarathi = 104, verTibetan = 105, verNepal = 106, verGreenland = 107, verIrelandEnglish = 108 }; enum { verFrBelgiumLux = 6, verBelgiumLux = 6, verArabia = 16, verYugoslavia = 25, verBelgiumLuxPoint = 27, verIndia = 33, verPakistan = 34, verRumania = 39, verGreecePoly = 40, verLapland = 46, verFaeroeIsl = 47, verGenericFE = 58, verFarEastGeneric = 58, verByeloRussian = 61, verUkrania = 62, verAlternateGr = 64, verSerbia = 65, verSlovenia = 66, verMacedonia = 67, verBrittany = 77, verWales = 79, verArmenia = 84, verGeorgia = 85, verAustriaGerman = 92, verTibet = 105 }; enum { minCountry = verUS, maxCountry = verIrelandEnglish }; enum { calGregorian = 0, calArabicCivil = 1, calArabicLunar = 2, calJapanese = 3, calJewish = 4, calCoptic = 5, calPersian = 6 }; enum { intWestern = 0, intArabic = 1, intRoman = 2, intJapanese = 3, intEuropean = 4, intOutputMask = 0x8000 }; enum { smSingleByte = 0, smFirstByte = -1, smLastByte = 1, smMiddleByte = 2 }; enum { smcTypeMask = 0x000F, smcReserved = 0x00F0, smcClassMask = 0x0F00, smcOrientationMask = 0x1000, smcRightMask = 0x2000, smcUpperMask = 0x4000, smcDoubleMask = 0x8000 }; enum { smCharPunct = 0x0000, smCharAscii = 0x0001, smCharEuro = 0x0007, smCharExtAscii = 0x0007, smCharKatakana = 0x0002, smCharHiragana = 0x0003, smCharIdeographic = 0x0004, smCharTwoByteGreek = 0x0005, smCharTwoByteRussian = 0x0006, smCharBidirect = 0x0008, smCharContextualLR = 0x0009, smCharNonContextualLR = 0x000A, smCharHangul = 0x000C, smCharJamo = 0x000D, smCharBopomofo = 0x000E, smCharGanaKana = 0x000F, smCharFISKana = 0x0002, smCharFISGana = 0x0003, smCharFISIdeo = 0x0004 }; enum { smCharFISGreek = 0x0005, smCharFISRussian = 0x0006, smPunctNormal = 0x0000, smPunctNumber = 0x0100, smPunctSymbol = 0x0200, smPunctBlank = 0x0300, smPunctRepeat = 0x0400, smPunctGraphic = 0x0500, smKanaSmall = 0x0100, smKanaHardOK = 0x0200, smKanaSoftOK = 0x0300, smIdeographicLevel1 = 0x0000, smIdeographicLevel2 = 0x0100, smIdeographicUser = 0x0200, smFISClassLvl1 = 0x0000, smFISClassLvl2 = 0x0100, smFISClassUser = 0x0200, smJamoJaeum = 0x0000, smJamoBogJaeum = 0x0100, smJamoMoeum = 0x0200, smJamoBogMoeum = 0x0300 }; enum { smCharHorizontal = 0x0000, smCharVertical = 0x1000, smCharLeft = 0x0000, smCharRight = 0x2000, smCharLower = 0x0000, smCharUpper = 0x4000, smChar1byte = 0x0000, smChar2byte = 0x8000 }; enum { smTransAscii = 0, smTransNative = 1, smTransCase = 0xFE, smTransSystem = 0xFF, smTransAscii1 = 2, smTransAscii2 = 3, smTransKana1 = 4, smTransKana2 = 5 }; enum { smTransGana2 = 7, smTransHangul2 = 8, smTransJamo2 = 9, smTransBopomofo2 = 10, smTransLower = 0x4000, smTransUpper = 0x8000, smTransRuleBaseFormat = 1, smTransHangulFormat = 2, smTransPreDoubleByting = 1, smTransPreLowerCasing = 2 }; enum { smMaskAll = (int)0xFFFFFFFF, smMaskAscii = 0x00000001, smMaskNative = 0x00000002, smMaskAscii1 = 0x00000004, smMaskAscii2 = 0x00000008, smMaskKana1 = 0x00000010, smMaskKana2 = 0x00000020, smMaskGana2 = 0x00000080, smMaskHangul2 = 0x00000100, smMaskJamo2 = 0x00000200, smMaskBopomofo2 = 0x00000400 }; enum { iuSystemScript = -1, iuCurrentScript = -2 }; enum { smKeyNextScript = -1, smKeySysScript = -2, smKeySwapScript = -3, smKeyNextKybd = -4, smKeySwapKybd = -5, smKeyDisableKybds = -6, smKeyEnableKybds = -7, smKeyToggleInline = -8, smKeyToggleDirection = -9, smKeyNextInputMethod = -10, smKeySwapInputMethod = -11, smKeyDisableKybdSwitch = -12, smKeySetDirLeftRight = -15, smKeySetDirRightLeft = -16, smKeyRoman = -17 }; enum { smKeyForceKeyScriptBit = 7, smKeyForceKeyScriptMask = 1 << smKeyForceKeyScriptBit }; enum { romanSysFond = 0x3FFF, romanAppFond = 3, romanFlags = 0x0007, smFondStart = 0x4000, smFondEnd = 0xC000, smUprHalfCharSet = 0x80 }; enum { diaeresisUprY = 0xD9, fraction = 0xDA, intlCurrency = 0xDB, leftSingGuillemet = 0xDC, rightSingGuillemet = 0xDD, fiLigature = 0xDE, flLigature = 0xDF, dblDagger = 0xE0, centeredDot = 0xE1, baseSingQuote = 0xE2, baseDblQuote = 0xE3, perThousand = 0xE4, circumflexUprA = 0xE5, circumflexUprE = 0xE6, acuteUprA = 0xE7, diaeresisUprE = 0xE8, graveUprE = 0xE9, acuteUprI = 0xEA, circumflexUprI = 0xEB, diaeresisUprI = 0xEC, graveUprI = 0xED, acuteUprO = 0xEE, circumflexUprO = 0xEF, appleLogo = 0xF0, graveUprO = 0xF1, acuteUprU = 0xF2, circumflexUprU = 0xF3, graveUprU = 0xF4, dotlessLwrI = 0xF5, circumflex = 0xF6, tilde = 0xF7, macron = 0xF8, breveMark = 0xF9, overDot = 0xFA, ringMark = 0xFB, cedilla = 0xFC, doubleAcute = 0xFD, ogonek = 0xFE, hachek = 0xFF }; enum { tokenIntl = 4, tokenEmpty = -1 }; enum { tokenUnknown = 0, tokenWhite = 1, tokenLeftLit = 2, tokenRightLit = 3, tokenAlpha = 4, tokenNumeric = 5, tokenNewLine = 6, tokenLeftComment = 7, tokenRightComment = 8, tokenLiteral = 9, tokenEscape = 10, tokenAltNum = 11, tokenRealNum = 12, tokenAltReal = 13, tokenReserve1 = 14, tokenReserve2 = 15, tokenLeftParen = 16, tokenRightParen = 17, tokenLeftBracket = 18, tokenRightBracket = 19 }; enum { tokenLeftCurly = 20, tokenRightCurly = 21, tokenLeftEnclose = 22, tokenRightEnclose = 23, tokenPlus = 24, tokenMinus = 25, tokenAsterisk = 26, tokenDivide = 27, tokenPlusMinus = 28, tokenSlash = 29, tokenBackSlash = 30, tokenLess = 31, tokenGreat = 32, tokenEqual = 33, tokenLessEqual2 = 34, tokenLessEqual1 = 35, tokenGreatEqual2 = 36, tokenGreatEqual1 = 37, token2Equal = 38, tokenColonEqual = 39 }; enum { tokenNotEqual = 40, tokenLessGreat = 41, tokenExclamEqual = 42, tokenExclam = 43, tokenTilde = 44, tokenComma = 45, tokenPeriod = 46, tokenLeft2Quote = 47, tokenRight2Quote = 48, tokenLeft1Quote = 49, tokenRight1Quote = 50, token2Quote = 51, token1Quote = 52, tokenSemicolon = 53, tokenPercent = 54, tokenCaret = 55, tokenUnderline = 56, tokenAmpersand = 57, tokenAtSign = 58, tokenBar = 59 }; enum { tokenQuestion = 60, tokenPi = 61, tokenRoot = 62, tokenSigma = 63, tokenIntegral = 64, tokenMicro = 65, tokenCapPi = 66, tokenInfinity = 67, tokenColon = 68, tokenHash = 69, tokenDollar = 70, tokenNoBreakSpace = 71, tokenFraction = 72, tokenIntlCurrency = 73, tokenLeftSingGuillemet = 74, tokenRightSingGuillemet = 75, tokenPerThousand = 76, tokenEllipsis = 77, tokenCenterDot = 78, tokenNil = 127 }; enum { delimPad = -2, tokenTilda = 44, tokenCarat = 55 }; enum { smWordSelectTable = 0, smWordWrapTable = 1, smNumberPartsTable = 2, smUnTokenTable = 3, smWhiteSpaceList = 4, iuWordSelectTable = 0, iuWordWrapTable = 1, iuNumberPartsTable = 2, iuUnTokenTable = 3, iuWhiteSpaceList = 4 }; enum { tokenOK = 0, tokenOverflow = 1, stringOverflow = 2, badDelim = 3, badEnding = 4, crash = 5 }; typedef SInt8 TokenResults; typedef char CharByteTable[256]; typedef short ScriptTokenType; typedef ScriptTokenType DelimType[2]; typedef ScriptTokenType CommentType[4]; struct TokenRec { ScriptTokenType theToken; Ptr position; long length; StringPtr stringPosition; }; typedef struct TokenRec TokenRec; typedef TokenRec * TokenRecPtr; struct TokenBlock { Ptr source; long sourceLength; Ptr tokenList; long tokenLength; long tokenCount; Ptr stringList; long stringLength; long stringCount; Boolean doString; Boolean doAppend; Boolean doAlphanumeric; Boolean doNest; ScriptTokenType leftDelims[2]; ScriptTokenType rightDelims[2]; ScriptTokenType leftComment[4]; ScriptTokenType rightComment[4]; ScriptTokenType escapeCode; ScriptTokenType decimalCode; Handle itlResource; long reserved[8]; }; typedef struct TokenBlock TokenBlock; typedef TokenBlock * TokenBlockPtr; enum { smNotInstalled = 0, smBadVerb = -1, smBadScript = -2 }; enum { smfShowIcon = 31, smfDualCaret = 30, smfNameTagEnab = 29, smfUseAssocFontInfo = 28, smfDisableKeyScriptSync = 27 }; enum { smfDisableKeyScriptSyncMask = 1L << smfDisableKeyScriptSync }; enum { smSysScript = 18, smKeyScript = 22, smKCHRCache = 38, smRegionCode = 40 }; extern long GetScriptManagerVariable(short selector) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern OSErr SetScriptManagerVariable( short selector, long param) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); enum { smsfIntellCP = 0, smsfSingByte = 1, smsfNatCase = 2, smsfContext = 3, smsfNoForceFont = 4, smsfB0Digits = 5, smsfAutoInit = 6, smsfUnivExt = 7, smsfSynchUnstyledTE = 8, smsfForms = 13, smsfLigatures = 14, smsfReverse = 15 }; #pragma pack(pop) } extern "C" { enum { paramErr = -50, noHardwareErr = -200, notEnoughHardwareErr = -201, userCanceledErr = -128, qErr = -1, vTypErr = -2, corErr = -3, unimpErr = -4, SlpTypeErr = -5, seNoDB = -8, controlErr = -17, statusErr = -18, readErr = -19, writErr = -20, badUnitErr = -21, unitEmptyErr = -22, openErr = -23, closErr = -24, dRemovErr = -25, dInstErr = -26 }; enum { abortErr = -27, iIOAbortErr = -27, notOpenErr = -28, unitTblFullErr = -29, dceExtErr = -30, slotNumErr = -360, gcrOnMFMErr = -400, dirFulErr = -33, dskFulErr = -34, nsvErr = -35, ioErr = -36, bdNamErr = -37, fnOpnErr = -38, eofErr = -39, posErr = -40, mFulErr = -41, tmfoErr = -42, fnfErr = -43, wPrErr = -44, fLckdErr = -45 }; enum { vLckdErr = -46, fBsyErr = -47, dupFNErr = -48, opWrErr = -49, rfNumErr = -51, gfpErr = -52, volOffLinErr = -53, permErr = -54, volOnLinErr = -55, nsDrvErr = -56, noMacDskErr = -57, extFSErr = -58, fsRnErr = -59, badMDBErr = -60, wrPermErr = -61, dirNFErr = -120, tmwdoErr = -121, badMovErr = -122, wrgVolTypErr = -123, volGoneErr = -124 }; enum { fidNotFound = -1300, fidExists = -1301, notAFileErr = -1302, diffVolErr = -1303, catChangedErr = -1304, desktopDamagedErr = -1305, sameFileErr = -1306, badFidErr = -1307, notARemountErr = -1308, fileBoundsErr = -1309, fsDataTooBigErr = -1310, volVMBusyErr = -1311, badFCBErr = -1327, errFSUnknownCall = -1400, errFSBadFSRef = -1401, errFSBadForkName = -1402, errFSBadBuffer = -1403, errFSBadForkRef = -1404, errFSBadInfoBitmap = -1405, errFSMissingCatInfo = -1406, errFSNotAFolder = -1407, errFSForkNotFound = -1409, errFSNameTooLong = -1410, errFSMissingName = -1411, errFSBadPosMode = -1412, errFSBadAllocFlags = -1413, errFSNoMoreItems = -1417, errFSBadItemCount = -1418, errFSBadSearchParams = -1419, errFSRefsDifferent = -1420, errFSForkExists = -1421, errFSBadIteratorFlags = -1422, errFSIteratorNotFound = -1423, errFSIteratorNotSupported = -1424, errFSQuotaExceeded = -1425, errFSOperationNotSupported = -1426, errFSAttributeNotFound = -1427, errFSPropertyNotValid = -1428, errFSNotEnoughSpaceForOperation = -1429, envNotPresent = -5500, envBadVers = -5501, envVersTooBig = -5502, fontDecError = -64, fontNotDeclared = -65, fontSubErr = -66, fontNotOutlineErr = -32615, firstDskErr = -84, lastDskErr = -64, noDriveErr = -64, offLinErr = -65, noNybErr = -66 }; enum { noAdrMkErr = -67, dataVerErr = -68, badCksmErr = -69, badBtSlpErr = -70, noDtaMkErr = -71, badDCksum = -72, badDBtSlp = -73, wrUnderrun = -74, cantStepErr = -75, tk0BadErr = -76, initIWMErr = -77, twoSideErr = -78, spdAdjErr = -79, seekErr = -80, sectNFErr = -81, fmt1Err = -82, fmt2Err = -83, verErr = -84, clkRdErr = -85, clkWrErr = -86, prWrErr = -87, prInitErr = -88, rcvrErr = -89, breakRecd = -90 }; enum { noScrapErr = -100, noTypeErr = -102 }; enum { eLenErr = -92, eMultiErr = -91 }; enum { ddpSktErr = -91, ddpLenErr = -92, noBridgeErr = -93, lapProtErr = -94, excessCollsns = -95, portNotPwr = -96, portInUse = -97, portNotCf = -98 }; enum { memROZWarn = -99, memROZError = -99, memROZErr = -99, memFullErr = -108, nilHandleErr = -109, memWZErr = -111, memPurErr = -112, memAdrErr = -110, memAZErr = -113, memPCErr = -114, memBCErr = -115, memSCErr = -116, memLockedErr = -117 }; enum { iMemFullErr = -108, iIOAbort = -27 }; enum { resourceInMemory = -188, writingPastEnd = -189, inputOutOfBounds = -190, resNotFound = -192, resFNotFound = -193, addResFailed = -194, addRefFailed = -195, rmvResFailed = -196, rmvRefFailed = -197, resAttrErr = -198, mapReadErr = -199, CantDecompress = -186, badExtResource = -185, noMemForPictPlaybackErr = -145, rgnOverflowErr = -147, rgnTooBigError = -147, pixMapTooDeepErr = -148, insufficientStackErr = -149, nsStackErr = -149 }; enum { evtNotEnb = 1 }; enum { cMatchErr = -150, cTempMemErr = -151, cNoMemErr = -152, cRangeErr = -153, cProtectErr = -154, cDevErr = -155, cResErr = -156, cDepthErr = -157, rgnTooBigErr = -500, updPixMemErr = -125, pictInfoVersionErr = -11000, pictInfoIDErr = -11001, pictInfoVerbErr = -11002, cantLoadPickMethodErr = -11003, colorsRequestedErr = -11004, pictureDataErr = -11005 }; enum { cmProfileError = -170, cmMethodError = -171, cmMethodNotFound = -175, cmProfileNotFound = -176, cmProfilesIdentical = -177, cmCantConcatenateError = -178, cmCantXYZ = -179, cmCantDeleteProfile = -180, cmUnsupportedDataType = -181, cmNoCurrentProfile = -182 }; enum { noHardware = noHardwareErr, notEnoughHardware = notEnoughHardwareErr, queueFull = -203, resProblem = -204, badChannel = -205, badFormat = -206, notEnoughBufferSpace = -207, badFileFormat = -208, channelBusy = -209, buffersTooSmall = -210, channelNotBusy = -211, noMoreRealTime = -212, siVBRCompressionNotSupported = -213, siNoSoundInHardware = -220, siBadSoundInDevice = -221, siNoBufferSpecified = -222, siInvalidCompression = -223, siHardDriveTooSlow = -224, siInvalidSampleRate = -225, siInvalidSampleSize = -226, siDeviceBusyErr = -227, siBadDeviceName = -228, siBadRefNum = -229, siInputDeviceErr = -230, siUnknownInfoType = -231, siUnknownQuality = -232 }; enum { noSynthFound = -240, synthOpenFailed = -241, synthNotReady = -242, bufTooSmall = -243, voiceNotFound = -244, incompatibleVoice = -245, badDictFormat = -246, badInputText = -247 }; enum { midiNoClientErr = -250, midiNoPortErr = -251, midiTooManyPortsErr = -252, midiTooManyConsErr = -253, midiVConnectErr = -254, midiVConnectMade = -255, midiVConnectRmvd = -256, midiNoConErr = -257, midiWriteErr = -258, midiNameLenErr = -259, midiDupIDErr = -260, midiInvalidCmdErr = -261 }; enum { nmTypErr = -299 }; enum { siInitSDTblErr = 1, siInitVBLQsErr = 2, siInitSPTblErr = 3, sdmJTInitErr = 10, sdmInitErr = 11, sdmSRTInitErr = 12, sdmPRAMInitErr = 13, sdmPriInitErr = 14 }; enum { smSDMInitErr = -290, smSRTInitErr = -291, smPRAMInitErr = -292, smPriInitErr = -293, smEmptySlot = -300, smCRCFail = -301, smFormatErr = -302, smRevisionErr = -303, smNoDir = -304, smDisabledSlot = -305, smNosInfoArray = -306 }; enum { smResrvErr = -307, smUnExBusErr = -308, smBLFieldBad = -309, smFHBlockRdErr = -310, smFHBlkDispErr = -311, smDisposePErr = -312, smNoBoardSRsrc = -313, smGetPRErr = -314, smNoBoardId = -315, smInitStatVErr = -316, smInitTblVErr = -317, smNoJmpTbl = -318, smReservedSlot = -318, smBadBoardId = -319, smBusErrTO = -320, svTempDisable = -32768L, svDisabled = -32640, smBadRefId = -330, smBadsList = -331, smReservedErr = -332, smCodeRevErr = -333 }; enum { smCPUErr = -334, smsPointerNil = -335, smNilsBlockErr = -336, smSlotOOBErr = -337, smSelOOBErr = -338, smNewPErr = -339, smBlkMoveErr = -340, smCkStatusErr = -341, smGetDrvrNamErr = -342, smDisDrvrNamErr = -343, smNoMoresRsrcs = -344, smsGetDrvrErr = -345, smBadsPtrErr = -346, smByteLanesErr = -347, smOffsetErr = -348, smNoGoodOpens = -349, smSRTOvrFlErr = -350, smRecNotFnd = -351 }; enum { notBTree = -410, btNoSpace = -413, btDupRecErr = -414, btRecNotFnd = -415, btKeyLenErr = -416, btKeyAttrErr = -417, unknownInsertModeErr = -20000, recordDataTooBigErr = -20001, invalidIndexErr = -20002 }; enum { fsmFFSNotFoundErr = -431, fsmBusyFFSErr = -432, fsmBadFFSNameErr = -433, fsmBadFSDLenErr = -434, fsmDuplicateFSIDErr = -435, fsmBadFSDVersionErr = -436, fsmNoAlternateStackErr = -437, fsmUnknownFSMMessageErr = -438 }; enum { editionMgrInitErr = -450, badSectionErr = -451, notRegisteredSectionErr = -452, badEditionFileErr = -453, badSubPartErr = -454, multiplePublisherWrn = -460, containerNotFoundWrn = -461, containerAlreadyOpenWrn = -462, notThePublisherWrn = -463 }; enum { teScrapSizeErr = -501, hwParamErr = -502, driverHardwareGoneErr = -503 }; enum { procNotFound = -600, memFragErr = -601, appModeErr = -602, protocolErr = -603, hardwareConfigErr = -604, appMemFullErr = -605, appIsDaemon = -606, bufferIsSmall = -607, noOutstandingHLE = -608, connectionInvalid = -609, noUserInteractionAllowed = -610 }; enum { wrongApplicationPlatform = -875, appVersionTooOld = -876, notAppropriateForClassic = -877 }; enum { threadTooManyReqsErr = -617, threadNotFoundErr = -618, threadProtocolErr = -619 }; enum { threadBadAppContextErr = -616 }; enum { notEnoughMemoryErr = -620, notHeldErr = -621, cannotMakeContiguousErr = -622, notLockedErr = -623, interruptsMaskedErr = -624, cannotDeferErr = -625, noMMUErr = -626 }; enum { vmMorePhysicalThanVirtualErr = -628, vmKernelMMUInitErr = -629, vmOffErr = -630, vmMemLckdErr = -631, vmBadDriver = -632, vmNoVectorErr = -633 }; enum { vmInvalidBackingFileIDErr = -640, vmMappingPrivilegesErr = -641, vmBusyBackingFileErr = -642, vmNoMoreBackingFilesErr = -643, vmInvalidFileViewIDErr = -644, vmFileViewAccessErr = -645, vmNoMoreFileViewsErr = -646, vmAddressNotInFileViewErr = -647, vmInvalidOwningProcessErr = -648 }; enum { rcDBNull = -800, rcDBValue = -801, rcDBError = -802, rcDBBadType = -803, rcDBBreak = -804, rcDBExec = -805, rcDBBadSessID = -806, rcDBBadSessNum = -807, rcDBBadDDEV = -808, rcDBAsyncNotSupp = -809, rcDBBadAsyncPB = -810, rcDBNoHandler = -811, rcDBWrongVersion = -812, rcDBPackNotInited = -813 }; enum { hmHelpDisabled = -850, hmBalloonAborted = -853, hmSameAsLastBalloon = -854, hmHelpManagerNotInited = -855, hmSkippedBalloon = -857, hmWrongVersion = -858, hmUnknownHelpType = -859, hmOperationUnsupported = -861, hmNoBalloonUp = -862, hmCloseViewActive = -863 }; enum { notInitErr = -900, nameTypeErr = -902, noPortErr = -903, noGlobalsErr = -904, localOnlyErr = -905, destPortErr = -906, sessTableErr = -907, noSessionErr = -908, badReqErr = -909, portNameExistsErr = -910, noUserNameErr = -911, userRejectErr = -912, noMachineNameErr = -913, noToolboxNameErr = -914, noResponseErr = -915, portClosedErr = -916, sessClosedErr = -917, badPortNameErr = -919, noDefaultUserErr = -922, notLoggedInErr = -923, noUserRefErr = -924, networkErr = -925, noInformErr = -926, authFailErr = -927, noUserRecErr = -928, badServiceMethodErr = -930, badLocNameErr = -931, guestNotAllowedErr = -932 }; enum { kFMIterationCompleted = -980L, kFMInvalidFontFamilyErr = -981L, kFMInvalidFontErr = -982L, kFMIterationScopeModifiedErr = -983L, kFMFontTableAccessErr = -984L, kFMFontContainerAccessErr = -985L }; enum { noMaskFoundErr = -1000 }; enum { nbpBuffOvr = -1024, nbpNoConfirm = -1025, nbpConfDiff = -1026, nbpDuplicate = -1027, nbpNotFound = -1028, nbpNISErr = -1029 }; enum { aspBadVersNum = -1066, aspBufTooSmall = -1067, aspNoMoreSess = -1068, aspNoServers = -1069, aspParamErr = -1070, aspServerBusy = -1071, aspSessClosed = -1072, aspSizeErr = -1073, aspTooMany = -1074, aspNoAck = -1075 }; enum { reqFailed = -1096, tooManyReqs = -1097, tooManySkts = -1098, badATPSkt = -1099, badBuffNum = -1100, noRelErr = -1101, cbNotFound = -1102, noSendResp = -1103, noDataArea = -1104, reqAborted = -1105 }; enum { errRefNum = -1280, errAborted = -1279, errState = -1278, errOpening = -1277, errAttention = -1276, errFwdReset = -1275, errDSPQueueSize = -1274, errOpenDenied = -1273 }; enum { errAECoercionFail = -1700, errAEDescNotFound = -1701, errAECorruptData = -1702, errAEWrongDataType = -1703, errAENotAEDesc = -1704, errAEBadListItem = -1705, errAENewerVersion = -1706, errAENotAppleEvent = -1707, errAEEventNotHandled = -1708, errAEReplyNotValid = -1709, errAEUnknownSendMode = -1710, errAEWaitCanceled = -1711, errAETimeout = -1712, errAENoUserInteraction = -1713, errAENotASpecialFunction = -1714, errAEParamMissed = -1715, errAEUnknownAddressType = -1716, errAEHandlerNotFound = -1717, errAEReplyNotArrived = -1718, errAEIllegalIndex = -1719, errAEImpossibleRange = -1720, errAEWrongNumberArgs = -1721, errAEAccessorNotFound = -1723, errAENoSuchLogical = -1725, errAEBadTestKey = -1726, errAENotAnObjSpec = -1727, errAENoSuchObject = -1728, errAENegativeCount = -1729, errAEEmptyListContainer = -1730, errAEUnknownObjectType = -1731, errAERecordingIsAlreadyOn = -1732, errAEReceiveTerminate = -1733, errAEReceiveEscapeCurrent = -1734, errAEEventFiltered = -1735, errAEDuplicateHandler = -1736, errAEStreamBadNesting = -1737, errAEStreamAlreadyConverted = -1738, errAEDescIsNull = -1739, errAEBuildSyntaxError = -1740, errAEBufferTooSmall = -1741 }; enum { errOSASystemError = -1750, errOSAInvalidID = -1751, errOSABadStorageType = -1752, errOSAScriptError = -1753, errOSABadSelector = -1754, errOSASourceNotAvailable = -1756, errOSANoSuchDialect = -1757, errOSADataFormatObsolete = -1758, errOSADataFormatTooNew = -1759, errOSACorruptData = errAECorruptData, errOSARecordingIsAlreadyOn = errAERecordingIsAlreadyOn, errOSAComponentMismatch = -1761, errOSACantOpenComponent = -1762, errOSACantStorePointers = -1763 }; enum { errOffsetInvalid = -1800, errOffsetIsOutsideOfView = -1801, errTopOfDocument = -1810, errTopOfBody = -1811, errEndOfDocument = -1812, errEndOfBody = -1813 }; enum { badDragRefErr = -1850, badDragItemErr = -1851, badDragFlavorErr = -1852, duplicateFlavorErr = -1853, cantGetFlavorErr = -1854, duplicateHandlerErr = -1855, handlerNotFoundErr = -1856, dragNotAcceptedErr = -1857, unsupportedForPlatformErr = -1858, noSuitableDisplaysErr = -1859, badImageRgnErr = -1860, badImageErr = -1861, nonDragOriginatorErr = -1862 }; enum { couldNotResolveDataRef = -2000, badImageDescription = -2001, badPublicMovieAtom = -2002, cantFindHandler = -2003, cantOpenHandler = -2004, badComponentType = -2005, noMediaHandler = -2006, noDataHandler = -2007, invalidMedia = -2008, invalidTrack = -2009, invalidMovie = -2010, invalidSampleTable = -2011, invalidDataRef = -2012, invalidHandler = -2013, invalidDuration = -2014, invalidTime = -2015, cantPutPublicMovieAtom = -2016, badEditList = -2017, mediaTypesDontMatch = -2018, progressProcAborted = -2019, movieToolboxUninitialized = -2020, noRecordOfApp = movieToolboxUninitialized, wfFileNotFound = -2021, cantCreateSingleForkFile = -2022, invalidEditState = -2023, nonMatchingEditState = -2024, staleEditState = -2025, userDataItemNotFound = -2026, maxSizeToGrowTooSmall = -2027, badTrackIndex = -2028, trackIDNotFound = -2029, trackNotInMovie = -2030, timeNotInTrack = -2031, timeNotInMedia = -2032, badEditIndex = -2033, internalQuickTimeError = -2034, cantEnableTrack = -2035, invalidRect = -2036, invalidSampleNum = -2037, invalidChunkNum = -2038, invalidSampleDescIndex = -2039, invalidChunkCache = -2040, invalidSampleDescription = -2041, dataNotOpenForRead = -2042, dataNotOpenForWrite = -2043, dataAlreadyOpenForWrite = -2044, dataAlreadyClosed = -2045, endOfDataReached = -2046, dataNoDataRef = -2047, noMovieFound = -2048, invalidDataRefContainer = -2049, badDataRefIndex = -2050, noDefaultDataRef = -2051, couldNotUseAnExistingSample = -2052, featureUnsupported = -2053, noVideoTrackInMovieErr = -2054, noSoundTrackInMovieErr = -2055, soundSupportNotAvailableErr = -2056, unsupportedAuxiliaryImportData = -2057, auxiliaryExportDataUnavailable = -2058, samplesAlreadyInMediaErr = -2059, noSourceTreeFoundErr = -2060, sourceNotFoundErr = -2061, movieTextNotFoundErr = -2062, missingRequiredParameterErr = -2063, invalidSpriteWorldPropertyErr = -2064, invalidSpritePropertyErr = -2065, gWorldsNotSameDepthAndSizeErr = -2066, invalidSpriteIndexErr = -2067, invalidImageIndexErr = -2068, invalidSpriteIDErr = -2069 }; enum { internalComponentErr = -2070, notImplementedMusicOSErr = -2071, cantSendToSynthesizerOSErr = -2072, cantReceiveFromSynthesizerOSErr = -2073, illegalVoiceAllocationOSErr = -2074, illegalPartOSErr = -2075, illegalChannelOSErr = -2076, illegalKnobOSErr = -2077, illegalKnobValueOSErr = -2078, illegalInstrumentOSErr = -2079, illegalControllerOSErr = -2080, midiManagerAbsentOSErr = -2081, synthesizerNotRespondingOSErr = -2082, synthesizerOSErr = -2083, illegalNoteChannelOSErr = -2084, noteChannelNotAllocatedOSErr = -2085, tunePlayerFullOSErr = -2086, tuneParseOSErr = -2087, noExportProcAvailableErr = -2089, videoOutputInUseErr = -2090 }; enum { componentDllLoadErr = -2091, componentDllEntryNotFoundErr = -2092, qtmlDllLoadErr = -2093, qtmlDllEntryNotFoundErr = -2094, qtmlUninitialized = -2095, unsupportedOSErr = -2096, unsupportedProcessorErr = -2097, componentNotThreadSafeErr = -2098 }; enum { cannotFindAtomErr = -2101, notLeafAtomErr = -2102, atomsNotOfSameTypeErr = -2103, atomIndexInvalidErr = -2104, duplicateAtomTypeAndIDErr = -2105, invalidAtomErr = -2106, invalidAtomContainerErr = -2107, invalidAtomTypeErr = -2108, cannotBeLeafAtomErr = -2109, pathTooLongErr = -2110, emptyPathErr = -2111, noPathMappingErr = -2112, pathNotVerifiedErr = -2113, unknownFormatErr = -2114, wackBadFileErr = -2115, wackForkNotFoundErr = -2116, wackBadMetaDataErr = -2117, qfcbNotFoundErr = -2118, qfcbNotCreatedErr = -2119, AAPNotCreatedErr = -2120, AAPNotFoundErr = -2121, ASDBadHeaderErr = -2122, ASDBadForkErr = -2123, ASDEntryNotFoundErr = -2124, fileOffsetTooBigErr = -2125, notAllowedToSaveMovieErr = -2126, qtNetworkAlreadyAllocatedErr = -2127, urlDataHHTTPProtocolErr = -2129, urlDataHHTTPNoNetDriverErr = -2130, urlDataHHTTPURLErr = -2131, urlDataHHTTPRedirectErr = -2132, urlDataHFTPProtocolErr = -2133, urlDataHFTPShutdownErr = -2134, urlDataHFTPBadUserErr = -2135, urlDataHFTPBadPasswordErr = -2136, urlDataHFTPServerErr = -2137, urlDataHFTPDataConnectionErr = -2138, urlDataHFTPNoDirectoryErr = -2139, urlDataHFTPQuotaErr = -2140, urlDataHFTPPermissionsErr = -2141, urlDataHFTPFilenameErr = -2142, urlDataHFTPNoNetDriverErr = -2143, urlDataHFTPBadNameListErr = -2144, urlDataHFTPNeedPasswordErr = -2145, urlDataHFTPNoPasswordErr = -2146, urlDataHFTPServerDisconnectedErr = -2147, urlDataHFTPURLErr = -2148, notEnoughDataErr = -2149, qtActionNotHandledErr = -2157, qtXMLParseErr = -2158, qtXMLApplicationErr = -2159 }; enum { digiUnimpErr = -2201, qtParamErr = -2202, matrixErr = -2203, notExactMatrixErr = -2204, noMoreKeyColorsErr = -2205, notExactSizeErr = -2206, badDepthErr = -2207, noDMAErr = -2208, badCallOrderErr = -2209 }; enum { kernelIncompleteErr = -2401, kernelCanceledErr = -2402, kernelOptionsErr = -2403, kernelPrivilegeErr = -2404, kernelUnsupportedErr = -2405, kernelObjectExistsErr = -2406, kernelWritePermissionErr = -2407, kernelReadPermissionErr = -2408, kernelExecutePermissionErr = -2409, kernelDeletePermissionErr = -2410, kernelExecutionLevelErr = -2411, kernelAttributeErr = -2412, kernelAsyncSendLimitErr = -2413, kernelAsyncReceiveLimitErr = -2414, kernelTimeoutErr = -2415, kernelInUseErr = -2416, kernelTerminatedErr = -2417, kernelExceptionErr = -2418, kernelIDErr = -2419, kernelAlreadyFreeErr = -2421, kernelReturnValueErr = -2422, kernelUnrecoverableErr = -2499 }; enum { tsmComponentNoErr = 0, tsmUnsupScriptLanguageErr = -2500, tsmInputMethodNotFoundErr = -2501, tsmNotAnAppErr = -2502, tsmAlreadyRegisteredErr = -2503, tsmNeverRegisteredErr = -2504, tsmInvalidDocIDErr = -2505, tsmTSMDocBusyErr = -2506, tsmDocNotActiveErr = -2507, tsmNoOpenTSErr = -2508, tsmCantOpenComponentErr = -2509, tsmTextServiceNotFoundErr = -2510, tsmDocumentOpenErr = -2511, tsmUseInputWindowErr = -2512, tsmTSHasNoMenuErr = -2513, tsmTSNotOpenErr = -2514, tsmComponentAlreadyOpenErr = -2515, tsmInputMethodIsOldErr = -2516, tsmScriptHasNoIMErr = -2517, tsmUnsupportedTypeErr = -2518, tsmUnknownErr = -2519, tsmInvalidContext = -2520, tsmNoHandler = -2521, tsmNoMoreTokens = -2522, tsmNoStem = -2523, tsmDefaultIsNotInputMethodErr = -2524, tsmDocPropertyNotFoundErr = -2528, tsmDocPropertyBufferTooSmallErr = -2529, tsmCantChangeForcedClassStateErr = -2530, tsmComponentPropertyUnsupportedErr = -2531, tsmComponentPropertyNotFoundErr = -2532, tsmInputModeChangeFailedErr = -2533 }; enum { mmInternalError = -2526 }; enum { nrLockedErr = -2536, nrNotEnoughMemoryErr = -2537, nrInvalidNodeErr = -2538, nrNotFoundErr = -2539, nrNotCreatedErr = -2540, nrNameErr = -2541, nrNotSlotDeviceErr = -2542, nrDataTruncatedErr = -2543, nrPowerErr = -2544, nrPowerSwitchAbortErr = -2545, nrTypeMismatchErr = -2546, nrNotModifiedErr = -2547, nrOverrunErr = -2548, nrResultCodeBase = -2549, nrPathNotFound = -2550, nrPathBufferTooSmall = -2551, nrInvalidEntryIterationOp = -2552, nrPropertyAlreadyExists = -2553, nrIterationDone = -2554, nrExitedIteratorScope = -2555, nrTransactionAborted = -2556, nrCallNotSupported = -2557 }; enum { invalidIconRefErr = -2580, noSuchIconErr = -2581, noIconDataAvailableErr = -2582 }; enum { errOSACantCoerce = errAECoercionFail, errOSACantAccess = errAENoSuchObject, errOSACantAssign = -10006, errOSAGeneralError = -2700, errOSADivideByZero = -2701, errOSANumericOverflow = -2702, errOSACantLaunch = -2703, errOSAAppNotHighLevelEventAware = -2704, errOSACorruptTerminology = -2705, errOSAStackOverflow = -2706, errOSAInternalTableOverflow = -2707, errOSADataBlockTooLarge = -2708, errOSACantGetTerminology = -2709, errOSACantCreate = -2710 }; enum { errOSATypeError = errAEWrongDataType, OSAMessageNotUnderstood = errAEEventNotHandled, OSAUndefinedHandler = errAEHandlerNotFound, OSAIllegalAccess = errAEAccessorNotFound, OSAIllegalIndex = errAEIllegalIndex, OSAIllegalRange = errAEImpossibleRange, OSAIllegalAssign = -10003, OSASyntaxError = -2740, OSASyntaxTypeError = -2741, OSATokenTooLong = -2742, OSAMissingParameter = errAEDescNotFound, OSAParameterMismatch = errAEWrongNumberArgs, OSADuplicateParameter = -2750, OSADuplicateProperty = -2751, OSADuplicateHandler = -2752, OSAUndefinedVariable = -2753, OSAInconsistentDeclarations = -2754, OSAControlFlowError = -2755 }; enum { errASCantConsiderAndIgnore = -2720, errASCantCompareMoreThan32k = -2721, errASTerminologyNestingTooDeep = -2760, errASIllegalFormalParameter = -2761, errASParameterNotForEvent = -2762, errASNoResultReturned = -2763, errASInconsistentNames = -2780 }; enum { cfragFirstErrCode = -2800, cfragContextIDErr = -2800, cfragConnectionIDErr = -2801, cfragNoSymbolErr = -2802, cfragNoSectionErr = -2803, cfragNoLibraryErr = -2804, cfragDupRegistrationErr = -2805, cfragFragmentFormatErr = -2806, cfragUnresolvedErr = -2807, cfragNoPositionErr = -2808, cfragNoPrivateMemErr = -2809, cfragNoClientMemErr = -2810, cfragNoIDsErr = -2811, cfragInitOrderErr = -2812, cfragImportTooOldErr = -2813, cfragImportTooNewErr = -2814, cfragInitLoopErr = -2815, cfragInitAtBootErr = -2816, cfragLibConnErr = -2817, cfragCFMStartupErr = -2818, cfragCFMInternalErr = -2819, cfragFragmentCorruptErr = -2820, cfragInitFunctionErr = -2821, cfragNoApplicationErr = -2822, cfragArchitectureErr = -2823, cfragFragmentUsageErr = -2824, cfragFileSizeErr = -2825, cfragNotClosureErr = -2826, cfragNoRegistrationErr = -2827, cfragContainerIDErr = -2828, cfragClosureIDErr = -2829, cfragAbortClosureErr = -2830, cfragOutputLengthErr = -2831, cfragMapFileErr = -2851, cfragExecFileRefErr = -2854, cfragStdFolderErr = -2855, cfragRsrcForkErr = -2856, cfragCFragRsrcErr = -2857, cfragLastErrCode = -2899 }; enum { cfragFirstReservedCode = -2897, cfragReservedCode_3 = -2897, cfragReservedCode_2 = -2898, cfragReservedCode_1 = -2899 }; enum { invalidComponentID = -3000, validInstancesExist = -3001, componentNotCaptured = -3002, componentDontRegister = -3003, unresolvedComponentDLLErr = -3004, retryComponentRegistrationErr = -3005 }; enum { invalidTranslationPathErr = -3025, couldNotParseSourceFileErr = -3026, noTranslationPathErr = -3030, badTranslationSpecErr = -3031, noPrefAppErr = -3032 }; enum { buf2SmallErr = -3101, noMPPErr = -3102, ckSumErr = -3103, extractErr = -3104, readQErr = -3105, atpLenErr = -3106, atpBadRsp = -3107, recNotFnd = -3108, sktClosedErr = -3109 }; enum { kOTNoError = 0, kOTOutOfMemoryErr = -3211, kOTNotFoundErr = -3201, kOTDuplicateFoundErr = -3216, kOTBadAddressErr = -3150, kOTBadOptionErr = -3151, kOTAccessErr = -3152, kOTBadReferenceErr = -3153, kOTNoAddressErr = -3154, kOTOutStateErr = -3155, kOTBadSequenceErr = -3156, kOTSysErrorErr = -3157, kOTLookErr = -3158, kOTBadDataErr = -3159, kOTBufferOverflowErr = -3160, kOTFlowErr = -3161, kOTNoDataErr = -3162, kOTNoDisconnectErr = -3163, kOTNoUDErrErr = -3164, kOTBadFlagErr = -3165, kOTNoReleaseErr = -3166, kOTNotSupportedErr = -3167, kOTStateChangeErr = -3168, kOTNoStructureTypeErr = -3169, kOTBadNameErr = -3170, kOTBadQLenErr = -3171, kOTAddressBusyErr = -3172, kOTIndOutErr = -3173, kOTProviderMismatchErr = -3174, kOTResQLenErr = -3175, kOTResAddressErr = -3176, kOTQFullErr = -3177, kOTProtocolErr = -3178, kOTBadSyncErr = -3179, kOTCanceledErr = -3180, kEPERMErr = -3200, kENOENTErr = -3201, kENORSRCErr = -3202, kEINTRErr = -3203, kEIOErr = -3204, kENXIOErr = -3205, kEBADFErr = -3208, kEAGAINErr = -3210, kENOMEMErr = -3211, kEACCESErr = -3212, kEFAULTErr = -3213, kEBUSYErr = -3215, kEEXISTErr = -3216, kENODEVErr = -3218, kEINVALErr = -3221, kENOTTYErr = -3224, kEPIPEErr = -3231, kERANGEErr = -3233, kEWOULDBLOCKErr = -3234, kEDEADLKErr = -3234, kEALREADYErr = -3236, kENOTSOCKErr = -3237, kEDESTADDRREQErr = -3238, kEMSGSIZEErr = -3239, kEPROTOTYPEErr = -3240, kENOPROTOOPTErr = -3241, kEPROTONOSUPPORTErr = -3242, kESOCKTNOSUPPORTErr = -3243, kEOPNOTSUPPErr = -3244, kEADDRINUSEErr = -3247, kEADDRNOTAVAILErr = -3248, kENETDOWNErr = -3249, kENETUNREACHErr = -3250, kENETRESETErr = -3251, kECONNABORTEDErr = -3252, kECONNRESETErr = -3253, kENOBUFSErr = -3254, kEISCONNErr = -3255, kENOTCONNErr = -3256, kESHUTDOWNErr = -3257, kETOOMANYREFSErr = -3258, kETIMEDOUTErr = -3259, kECONNREFUSEDErr = -3260, kEHOSTDOWNErr = -3263, kEHOSTUNREACHErr = -3264, kEPROTOErr = -3269, kETIMEErr = -3270, kENOSRErr = -3271, kEBADMSGErr = -3272, kECANCELErr = -3273, kENOSTRErr = -3274, kENODATAErr = -3275, kEINPROGRESSErr = -3276, kESRCHErr = -3277, kENOMSGErr = -3278, kOTClientNotInittedErr = -3279, kOTPortHasDiedErr = -3280, kOTPortWasEjectedErr = -3281, kOTBadConfigurationErr = -3282, kOTConfigurationChangedErr = -3283, kOTUserRequestedErr = -3284, kOTPortLostConnection = -3285 }; enum { kQDNoPalette = -3950, kQDNoColorHWCursorSupport = -3951, kQDCursorAlreadyRegistered = -3952, kQDCursorNotRegistered = -3953, kQDCorruptPICTDataErr = -3954 }; enum { firstPickerError = -4000, invalidPickerType = firstPickerError, requiredFlagsDontMatch = -4001, pickerResourceError = -4002, cantLoadPicker = -4003, cantCreatePickerWindow = -4004, cantLoadPackage = -4005, pickerCantLive = -4006, colorSyncNotInstalled = -4007, badProfileError = -4008, noHelpForItem = -4009 }; enum { kNSL68kContextNotSupported = -4170, kNSLSchedulerError = -4171, kNSLBadURLSyntax = -4172, kNSLNoCarbonLib = -4173, kNSLUILibraryNotAvailable = -4174, kNSLNotImplementedYet = -4175, kNSLErrNullPtrError = -4176, kNSLSomePluginsFailedToLoad = -4177, kNSLNullNeighborhoodPtr = -4178, kNSLNoPluginsForSearch = -4179, kNSLSearchAlreadyInProgress = -4180, kNSLNoPluginsFound = -4181, kNSLPluginLoadFailed = -4182, kNSLBadProtocolTypeErr = -4183, kNSLNullListPtr = -4184, kNSLBadClientInfoPtr = -4185, kNSLCannotContinueLookup = -4186, kNSLBufferTooSmallForData = -4187, kNSLNoContextAvailable = -4188, kNSLRequestBufferAlreadyInList = -4189, kNSLInvalidPluginSpec = -4190, kNSLNoSupportForService = -4191, kNSLBadNetConnection = -4192, kNSLBadDataTypeErr = -4193, kNSLBadServiceTypeErr = -4194, kNSLBadReferenceErr = -4195, kNSLNoElementsInList = -4196, kNSLInsufficientOTVer = -4197, kNSLInsufficientSysVer = -4198, kNSLNotInitialized = -4199, kNSLInitializationFailed = -4200 }; enum { kDTPHoldJobErr = -4200, kDTPStopQueueErr = -4201, kDTPTryAgainErr = -4202, kDTPAbortJobErr = 128 }; enum { cmElementTagNotFound = -4200, cmIndexRangeErr = -4201, cmCantDeleteElement = -4202, cmFatalProfileErr = -4203, cmInvalidProfile = -4204, cmInvalidProfileLocation = -4205, cmCantCopyModifiedV1Profile = -4215, cmInvalidSearch = -4206, cmSearchError = -4207, cmErrIncompatibleProfile = -4208, cmInvalidColorSpace = -4209, cmInvalidSrcMap = -4210, cmInvalidDstMap = -4211, cmNoGDevicesError = -4212, cmInvalidProfileComment = -4213, cmRangeOverFlow = -4214, cmNamedColorNotFound = -4216, cmCantGamutCheckError = -4217 }; enum { badFolderDescErr = -4270, duplicateFolderDescErr = -4271, noMoreFolderDescErr = -4272, invalidFolderTypeErr = -4273, duplicateRoutingErr = -4274, routingNotFoundErr = -4275, badRoutingSizeErr = -4276 }; enum { coreFoundationUnknownErr = -4960 }; enum { errCoreEndianDataTooShortForFormat = -4940, errCoreEndianDataTooLongForFormat = -4941, errCoreEndianDataDoesNotMatchFormat = -4942 }; enum { internalScrapErr = -4988, duplicateScrapFlavorErr = -4989, badScrapRefErr = -4990, processStateIncorrectErr = -4991, scrapPromiseNotKeptErr = -4992, noScrapPromiseKeeperErr = -4993, nilScrapFlavorDataErr = -4994, scrapFlavorFlagsMismatchErr = -4995, scrapFlavorSizeMismatchErr = -4996, illegalScrapFlavorFlagsErr = -4997, illegalScrapFlavorTypeErr = -4998, illegalScrapFlavorSizeErr = -4999, scrapFlavorNotFoundErr = -102, needClearScrapErr = -100 }; enum { afpAccessDenied = -5000, afpAuthContinue = -5001, afpBadUAM = -5002, afpBadVersNum = -5003, afpBitmapErr = -5004, afpCantMove = -5005, afpDenyConflict = -5006, afpDirNotEmpty = -5007, afpDiskFull = -5008, afpEofError = -5009, afpFileBusy = -5010, afpFlatVol = -5011, afpItemNotFound = -5012, afpLockErr = -5013, afpMiscErr = -5014, afpNoMoreLocks = -5015, afpNoServer = -5016, afpObjectExists = -5017, afpObjectNotFound = -5018, afpParmErr = -5019, afpRangeNotLocked = -5020, afpRangeOverlap = -5021, afpSessClosed = -5022, afpUserNotAuth = -5023, afpCallNotSupported = -5024, afpObjectTypeErr = -5025, afpTooManyFilesOpen = -5026, afpServerGoingDown = -5027, afpCantRename = -5028, afpDirNotFound = -5029, afpIconTypeError = -5030, afpVolLocked = -5031, afpObjectLocked = -5032, afpContainsSharedErr = -5033, afpIDNotFound = -5034, afpIDExists = -5035, afpDiffVolErr = -5036, afpCatalogChanged = -5037, afpSameObjectErr = -5038, afpBadIDErr = -5039, afpPwdSameErr = -5040, afpPwdTooShortErr = -5041, afpPwdExpiredErr = -5042, afpInsideSharedErr = -5043, afpInsideTrashErr = -5044, afpPwdNeedsChangeErr = -5045, afpPwdPolicyErr = -5046, afpAlreadyLoggedInErr = -5047, afpCallNotAllowed = -5048 }; enum { afpBadDirIDType = -5060, afpCantMountMoreSrvre = -5061, afpAlreadyMounted = -5062, afpSameNodeErr = -5063 }; enum { numberFormattingNotANumberErr = -5200, numberFormattingOverflowInDestinationErr = -5201, numberFormattingBadNumberFormattingObjectErr = -5202, numberFormattingSpuriousCharErr = -5203, numberFormattingLiteralMissingErr = -5204, numberFormattingDelimiterMissingErr = -5205, numberFormattingEmptyFormatErr = -5206, numberFormattingBadFormatErr = -5207, numberFormattingBadOptionsErr = -5208, numberFormattingBadTokenErr = -5209, numberFormattingUnOrderedCurrencyRangeErr = -5210, numberFormattingBadCurrencyPositionErr = -5211, numberFormattingNotADigitErr = -5212, numberFormattingUnOrdredCurrencyRangeErr = -5210, numberFortmattingNotADigitErr = -5212 }; enum { textParserBadParamErr = -5220, textParserObjectNotFoundErr = -5221, textParserBadTokenValueErr = -5222, textParserBadParserObjectErr = -5223, textParserParamErr = -5224, textParserNoMoreTextErr = -5225, textParserBadTextLanguageErr = -5226, textParserBadTextEncodingErr = -5227, textParserNoSuchTokenFoundErr = -5228, textParserNoMoreTokensErr = -5229 }; enum { errUnknownAttributeTag = -5240, errMarginWilllNotFit = -5241, errNotInImagingMode = -5242, errAlreadyInImagingMode = -5243, errEngineNotFound = -5244, errIteratorReachedEnd = -5245, errInvalidRange = -5246, errOffsetNotOnElementBounday = -5247, errNoHiliteText = -5248, errEmptyScrap = -5249, errReadOnlyText = -5250, errUnknownElement = -5251, errNonContiuousAttribute = -5252, errCannotUndo = -5253 }; enum { hrHTMLRenderingLibNotInstalledErr = -5360, hrMiscellaneousExceptionErr = -5361, hrUnableToResizeHandleErr = -5362, hrURLNotHandledErr = -5363 }; enum { errIANoErr = 0, errIAUnknownErr = -5380, errIAAllocationErr = -5381, errIAParamErr = -5382, errIANoMoreItems = -5383, errIABufferTooSmall = -5384, errIACanceled = -5385, errIAInvalidDocument = -5386, errIATextExtractionErr = -5387, errIAEndOfTextRun = -5388 }; enum { qtsBadSelectorErr = -5400, qtsBadStateErr = -5401, qtsBadDataErr = -5402, qtsUnsupportedDataTypeErr = -5403, qtsUnsupportedRateErr = -5404, qtsUnsupportedFeatureErr = -5405, qtsTooMuchDataErr = -5406, qtsUnknownValueErr = -5407, qtsTimeoutErr = -5408, qtsConnectionFailedErr = -5420, qtsAddressBusyErr = -5421 }; enum { gestaltUnknownErr = -5550, gestaltUndefSelectorErr = -5551, gestaltDupSelectorErr = -5552, gestaltLocationErr = -5553 }; enum { menuPropertyInvalidErr = -5603, menuPropertyInvalid = menuPropertyInvalidErr, menuPropertyNotFoundErr = -5604, menuNotFoundErr = -5620, menuUsesSystemDefErr = -5621, menuItemNotFoundErr = -5622, menuInvalidErr = -5623 }; enum { errInvalidWindowPtr = -5600, errInvalidWindowRef = -5600, errUnsupportedWindowAttributesForClass = -5601, errWindowDoesNotHaveProxy = -5602, errInvalidWindowProperty = -5603, errWindowPropertyNotFound = -5604, errUnrecognizedWindowClass = -5605, errCorruptWindowDescription = -5606, errUserWantsToDragWindow = -5607, errWindowsAlreadyInitialized = -5608, errFloatingWindowsNotInitialized = -5609, errWindowNotFound = -5610, errWindowDoesNotFitOnscreen = -5611, windowAttributeImmutableErr = -5612, windowAttributesConflictErr = -5613, windowManagerInternalErr = -5614, windowWrongStateErr = -5615, windowGroupInvalidErr = -5616, windowAppModalStateAlreadyExistsErr = -5617, windowNoAppModalStateErr = -5618, errWindowDoesntSupportFocus = -30583, errWindowRegionCodeInvalid = -30593 }; enum { dialogNoTimeoutErr = -5640 }; enum { kNavWrongDialogStateErr = -5694, kNavWrongDialogClassErr = -5695, kNavInvalidSystemConfigErr = -5696, kNavCustomControlMessageFailedErr = -5697, kNavInvalidCustomControlMessageErr = -5698, kNavMissingKindStringErr = -5699 }; enum { collectionItemLockedErr = -5750, collectionItemNotFoundErr = -5751, collectionIndexRangeErr = -5752, collectionVersionErr = -5753 }; enum { kQTSSUnknownErr = -6150 }; enum { kDMGenErr = -6220, kDMMirroringOnAlready = -6221, kDMWrongNumberOfDisplays = -6222, kDMMirroringBlocked = -6223, kDMCantBlock = -6224, kDMMirroringNotOn = -6225, kSysSWTooOld = -6226, kDMSWNotInitializedErr = -6227, kDMDriverNotDisplayMgrAwareErr = -6228, kDMDisplayNotFoundErr = -6229, kDMNotFoundErr = -6229, kDMDisplayAlreadyInstalledErr = -6230, kDMMainDisplayCannotMoveErr = -6231, kDMNoDeviceTableclothErr = -6231, kDMFoundErr = -6232 }; enum { laTooSmallBufferErr = -6984, laEnvironmentBusyErr = -6985, laEnvironmentNotFoundErr = -6986, laEnvironmentExistErr = -6987, laInvalidPathErr = -6988, laNoMoreMorphemeErr = -6989, laFailAnalysisErr = -6990, laTextOverFlowErr = -6991, laDictionaryNotOpenedErr = -6992, laDictionaryUnknownErr = -6993, laDictionaryTooManyErr = -6994, laPropertyValueErr = -6995, laPropertyUnknownErr = -6996, laPropertyIsReadOnlyErr = -6997, laPropertyNotFoundErr = -6998, laPropertyErr = -6999, laEngineNotFoundErr = -7000 }; enum { kUSBNoErr = 0, kUSBNoTran = 0, kUSBNoDelay = 0, kUSBPending = 1 }; enum { kUSBNotSent2Err = -6901, kUSBNotSent1Err = -6902, kUSBBufUnderRunErr = -6903, kUSBBufOvrRunErr = -6904, kUSBRes2Err = -6905, kUSBRes1Err = -6906, kUSBUnderRunErr = -6907, kUSBOverRunErr = -6908, kUSBWrongPIDErr = -6909, kUSBPIDCheckErr = -6910, kUSBNotRespondingErr = -6911, kUSBEndpointStallErr = -6912, kUSBDataToggleErr = -6913, kUSBBitstufErr = -6914, kUSBCRCErr = -6915, kUSBLinkErr = -6916 }; enum { kUSBQueueFull = -6948, kUSBNotHandled = -6987, kUSBUnknownNotification = -6949, kUSBBadDispatchTable = -6950 }; enum { kUSBInternalReserved10 = -6951, kUSBInternalReserved9 = -6952, kUSBInternalReserved8 = -6953, kUSBInternalReserved7 = -6954, kUSBInternalReserved6 = -6955, kUSBInternalReserved5 = -6956, kUSBInternalReserved4 = -6957, kUSBInternalReserved3 = -6958, kUSBInternalReserved2 = -6959, kUSBInternalReserved1 = -6960 }; enum { kUSBPortDisabled = -6969, kUSBQueueAborted = -6970, kUSBTimedOut = -6971, kUSBDeviceDisconnected = -6972, kUSBDeviceNotSuspended = -6973, kUSBDeviceSuspended = -6974, kUSBInvalidBuffer = -6975, kUSBDevicePowerProblem = -6976, kUSBDeviceBusy = -6977, kUSBUnknownInterfaceErr = -6978, kUSBPipeStalledError = -6979, kUSBPipeIdleError = -6980, kUSBNoBandwidthError = -6981, kUSBAbortedError = -6982, kUSBFlagsError = -6983, kUSBCompletionError = -6984, kUSBPBLengthError = -6985, kUSBPBVersionError = -6986, kUSBNotFound = -6987, kUSBOutOfMemoryErr = -6988, kUSBDeviceErr = -6989, kUSBNoDeviceErr = -6990, kUSBAlreadyOpenErr = -6991, kUSBTooManyTransactionsErr = -6992, kUSBUnknownRequestErr = -6993, kUSBRqErr = -6994, kUSBIncorrectTypeErr = -6995, kUSBTooManyPipesErr = -6996, kUSBUnknownPipeErr = -6997, kUSBUnknownDeviceErr = -6998, kUSBInternalErr = -6999 }; enum { dcmParamErr = -7100, dcmNotDictionaryErr = -7101, dcmBadDictionaryErr = -7102, dcmPermissionErr = -7103, dcmDictionaryNotOpenErr = -7104, dcmDictionaryBusyErr = -7105, dcmBlockFullErr = -7107, dcmNoRecordErr = -7108, dcmDupRecordErr = -7109, dcmNecessaryFieldErr = -7110, dcmBadFieldInfoErr = -7111, dcmBadFieldTypeErr = -7112, dcmNoFieldErr = -7113, dcmBadKeyErr = -7115, dcmTooManyKeyErr = -7116, dcmBadDataSizeErr = -7117, dcmBadFindMethodErr = -7118, dcmBadPropertyErr = -7119, dcmProtectedErr = -7121, dcmNoAccessMethodErr = -7122, dcmBadFeatureErr = -7124, dcmIterationCompleteErr = -7126, dcmBufferOverflowErr = -7127 }; enum { kRAInvalidParameter = -7100, kRAInvalidPort = -7101, kRAStartupFailed = -7102, kRAPortSetupFailed = -7103, kRAOutOfMemory = -7104, kRANotSupported = -7105, kRAMissingResources = -7106, kRAIncompatiblePrefs = -7107, kRANotConnected = -7108, kRAConnectionCanceled = -7109, kRAUnknownUser = -7110, kRAInvalidPassword = -7111, kRAInternalError = -7112, kRAInstallationDamaged = -7113, kRAPortBusy = -7114, kRAUnknownPortState = -7115, kRAInvalidPortState = -7116, kRAInvalidSerialProtocol = -7117, kRAUserLoginDisabled = -7118, kRAUserPwdChangeRequired = -7119, kRAUserPwdEntryRequired = -7120, kRAUserInteractionRequired = -7121, kRAInitOpenTransportFailed = -7122, kRARemoteAccessNotReady = -7123, kRATCPIPInactive = -7124, kRATCPIPNotConfigured = -7125, kRANotPrimaryInterface = -7126, kRAConfigurationDBInitErr = -7127, kRAPPPProtocolRejected = -7128, kRAPPPAuthenticationFailed = -7129, kRAPPPNegotiationFailed = -7130, kRAPPPUserDisconnected = -7131, kRAPPPPeerDisconnected = -7132, kRAPeerNotResponding = -7133, kRAATalkInactive = -7134, kRAExtAuthenticationFailed = -7135, kRANCPRejectedbyPeer = -7136, kRADuplicateIPAddr = -7137, kRACallBackFailed = -7138, kRANotEnabled = -7139 }; enum { kATSUInvalidTextLayoutErr = -8790, kATSUInvalidStyleErr = -8791, kATSUInvalidTextRangeErr = -8792, kATSUFontsMatched = -8793, kATSUFontsNotMatched = -8794, kATSUNoCorrespondingFontErr = -8795, kATSUInvalidFontErr = -8796, kATSUInvalidAttributeValueErr = -8797, kATSUInvalidAttributeSizeErr = -8798, kATSUInvalidAttributeTagErr = -8799, kATSUInvalidCacheErr = -8800, kATSUNotSetErr = -8801, kATSUNoStyleRunsAssignedErr = -8802, kATSUQuickDrawTextErr = -8803, kATSULowLevelErr = -8804, kATSUNoFontCmapAvailableErr = -8805, kATSUNoFontScalerAvailableErr = -8806, kATSUCoordinateOverflowErr = -8807, kATSULineBreakInWord = -8808, kATSUBusyObjectErr = -8809 }; enum { kTextUnsupportedEncodingErr = -8738, kTextMalformedInputErr = -8739, kTextUndefinedElementErr = -8740, kTECMissingTableErr = -8745, kTECTableChecksumErr = -8746, kTECTableFormatErr = -8747, kTECCorruptConverterErr = -8748, kTECNoConversionPathErr = -8749, kTECBufferBelowMinimumSizeErr = -8750, kTECArrayFullErr = -8751, kTECBadTextRunErr = -8752, kTECPartialCharErr = -8753, kTECUnmappableElementErr = -8754, kTECIncompleteElementErr = -8755, kTECDirectionErr = -8756, kTECGlobalsUnavailableErr = -8770, kTECItemUnavailableErr = -8771, kTECUsedFallbacksStatus = -8783, kTECNeedFlushStatus = -8784, kTECOutputBufferFullStatus = -8785, unicodeChecksumErr = -8769, unicodeNoTableErr = -8768, unicodeVariantErr = -8767, unicodeFallbacksErr = -8766, unicodePartConvertErr = -8765, unicodeBufErr = -8764, unicodeCharErr = -8763, unicodeElementErr = -8762, unicodeNotFoundErr = -8761, unicodeTableFormatErr = -8760, unicodeDirectionErr = -8759, unicodeContextualErr = -8758, unicodeTextEncodingDataErr = -8757 }; enum { kUTCUnderflowErr = -8850, kUTCOverflowErr = -8851, kIllegalClockValueErr = -8852 }; enum { kATSUInvalidFontFallbacksErr = -8900, kATSUUnsupportedStreamFormatErr = -8901, kATSUBadStreamErr = -8902, kATSUOutputBufferTooSmallErr = -8903, kATSUInvalidCallInsideCallbackErr = -8904, kATSUNoFontNameErr = -8905, kATSULastErr = -8959 }; enum { codecErr = -8960, noCodecErr = -8961, codecUnimpErr = -8962, codecSizeErr = -8963, codecScreenBufErr = -8964, codecImageBufErr = -8965, codecSpoolErr = -8966, codecAbortErr = -8967, codecWouldOffscreenErr = -8968, codecBadDataErr = -8969, codecDataVersErr = -8970, codecExtensionNotFoundErr = -8971, scTypeNotFoundErr = codecExtensionNotFoundErr, codecConditionErr = -8972, codecOpenErr = -8973, codecCantWhenErr = -8974, codecCantQueueErr = -8975, codecNothingToBlitErr = -8976, codecNoMemoryPleaseWaitErr = -8977, codecDisabledErr = -8978, codecNeedToFlushChainErr = -8979, lockPortBitsBadSurfaceErr = -8980, lockPortBitsWindowMovedErr = -8981, lockPortBitsWindowResizedErr = -8982, lockPortBitsWindowClippedErr = -8983, lockPortBitsBadPortErr = -8984, lockPortBitsSurfaceLostErr = -8985, codecParameterDialogConfirm = -8986, codecNeedAccessKeyErr = -8987, codecOffscreenFailedErr = -8988, codecDroppedFrameErr = -8989, directXObjectAlreadyExists = -8990, lockPortBitsWrongGDeviceErr = -8991, codecOffscreenFailedPleaseRetryErr = -8992, badCodecCharacterizationErr = -8993, noThumbnailFoundErr = -8994 }; enum { kBadAdapterErr = -9050, kBadAttributeErr = -9051, kBadBaseErr = -9052, kBadEDCErr = -9053, kBadIRQErr = -9054, kBadOffsetErr = -9055, kBadPageErr = -9056, kBadSizeErr = -9057, kBadSocketErr = -9058, kBadTypeErr = -9059, kBadVccErr = -9060, kBadVppErr = -9061, kBadWindowErr = -9062, kBadArgLengthErr = -9063, kBadArgsErr = -9064, kBadHandleErr = -9065, kBadCISErr = -9066, kBadSpeedErr = -9067, kReadFailureErr = -9068, kWriteFailureErr = -9069, kGeneralFailureErr = -9070, kNoCardErr = -9071, kUnsupportedFunctionErr = -9072, kUnsupportedModeErr = -9073, kBusyErr = -9074, kWriteProtectedErr = -9075, kConfigurationLockedErr = -9076, kInUseErr = -9077, kNoMoreItemsErr = -9078, kOutOfResourceErr = -9079, kNoCardSevicesSocketsErr = -9080, kInvalidRegEntryErr = -9081, kBadLinkErr = -9082, kBadDeviceErr = -9083, k16BitCardErr = -9084, kCardBusCardErr = -9085, kPassCallToChainErr = -9086, kCantConfigureCardErr = -9087, kPostCardEventErr = -9088, kInvalidDeviceNumber = -9089, kUnsupportedVsErr = -9090, kInvalidCSClientErr = -9091, kBadTupleDataErr = -9092, kBadCustomIFIDErr = -9093, kNoIOWindowRequestedErr = -9094, kNoMoreTimerClientsErr = -9095, kNoMoreInterruptSlotsErr = -9096, kNoClientTableErr = -9097, kUnsupportedCardErr = -9098, kNoCardEnablersFoundErr = -9099, kNoEnablerForCardErr = -9100, kNoCompatibleNameErr = -9101, kClientRequestDenied = -9102, kNotReadyErr = -9103, kTooManyIOWindowsErr = -9104, kAlreadySavedStateErr = -9105, kAttemptDupCardEntryErr = -9106, kCardPowerOffErr = -9107, kNotZVCapableErr = -9108, kNoCardBusCISErr = -9109 }; enum { noDeviceForChannel = -9400, grabTimeComplete = -9401, cantDoThatInCurrentMode = -9402, notEnoughMemoryToGrab = -9403, notEnoughDiskSpaceToGrab = -9404, couldntGetRequiredComponent = -9405, badSGChannel = -9406, seqGrabInfoNotAvailable = -9407, deviceCantMeetRequest = -9408, badControllerHeight = -9994, editingNotAllowed = -9995, controllerBoundsNotExact = -9996, cannotSetWidthOfAttachedController = -9997, controllerHasFixedHeight = -9998, cannotMoveAttachedController = -9999 }; enum { errAEBadKeyForm = -10002, errAECantHandleClass = -10010, errAECantSupplyType = -10009, errAECantUndo = -10015, errAEEventFailed = -10000, errAEIndexTooLarge = -10007, errAEInTransaction = -10011, errAELocalOnly = -10016, errAENoSuchTransaction = -10012, errAENotAnElement = -10008, errAENotASingleObject = -10014, errAENotModifiable = -10003, errAENoUserSelection = -10013, errAEPrivilegeError = -10004, errAEReadDenied = -10005, errAETypeError = -10001, errAEWriteDenied = -10006, errAENotAnEnumMember = -10023, errAECantPutThatThere = -10024, errAEPropertiesClash = -10025 }; enum { telGenericError = -1, telNoErr = 0, telNoTools = 8, telBadTermErr = -10001, telBadDNErr = -10002, telBadCAErr = -10003, telBadHandErr = -10004, telBadProcErr = -10005, telCAUnavail = -10006, telNoMemErr = -10007, telNoOpenErr = -10008, telBadHTypeErr = -10010, telHTypeNotSupp = -10011, telBadLevelErr = -10012, telBadVTypeErr = -10013, telVTypeNotSupp = -10014, telBadAPattErr = -10015, telAPattNotSupp = -10016, telBadIndex = -10017, telIndexNotSupp = -10018, telBadStateErr = -10019, telStateNotSupp = -10020, telBadIntExt = -10021, telIntExtNotSupp = -10022, telBadDNDType = -10023, telDNDTypeNotSupp = -10024, telFeatNotSub = -10030, telFeatNotAvail = -10031, telFeatActive = -10032, telFeatNotSupp = -10033, telConfLimitErr = -10040, telConfNoLimit = -10041, telConfErr = -10042, telConfRej = -10043, telTransferErr = -10044, telTransferRej = -10045, telCBErr = -10046, telConfLimitExceeded = -10047, telBadDNType = -10050, telBadPageID = -10051, telBadIntercomID = -10052, telBadFeatureID = -10053, telBadFwdType = -10054, telBadPickupGroupID = -10055, telBadParkID = -10056, telBadSelect = -10057, telBadBearerType = -10058, telBadRate = -10059, telDNTypeNotSupp = -10060, telFwdTypeNotSupp = -10061, telBadDisplayMode = -10062, telDisplayModeNotSupp = -10063, telNoCallbackRef = -10064, telAlreadyOpen = -10070, telStillNeeded = -10071, telTermNotOpen = -10072, telCANotAcceptable = -10080, telCANotRejectable = -10081, telCANotDeflectable = -10082, telPBErr = -10090, telBadFunction = -10091, telNoSuchTool = -10102, telUnknownErr = -10103, telNoCommFolder = -10106, telInitFailed = -10107, telBadCodeResource = -10108, telDeviceNotFound = -10109, telBadProcID = -10110, telValidateFailed = -10111, telAutoAnsNotOn = -10112, telDetAlreadyOn = -10113, telBadSWErr = -10114, telBadSampleRate = -10115, telNotEnoughdspBW = -10116 }; enum { errTaskNotFound = -10780 }; enum { pmBusyErr = -13000, pmReplyTOErr = -13001, pmSendStartErr = -13002, pmSendEndErr = -13003, pmRecvStartErr = -13004, pmRecvEndErr = -13005 }; enum { kPowerHandlerExistsForDeviceErr = -13006, kPowerHandlerNotFoundForDeviceErr = -13007, kPowerHandlerNotFoundForProcErr = -13008, kPowerMgtMessageNotHandled = -13009, kPowerMgtRequestDenied = -13010, kCantReportProcessorTemperatureErr = -13013, kProcessorTempRoutineRequiresMPLib2 = -13014, kNoSuchPowerSource = -13020, kBridgeSoftwareRunningCantSleep = -13038 }; enum { debuggingExecutionContextErr = -13880, debuggingDuplicateSignatureErr = -13881, debuggingDuplicateOptionErr = -13882, debuggingInvalidSignatureErr = -13883, debuggingInvalidOptionErr = -13884, debuggingInvalidNameErr = -13885, debuggingNoCallbackErr = -13886, debuggingNoMatchErr = -13887 }; enum { kHIDVersionIncompatibleErr = -13909, kHIDDeviceNotReady = -13910 }; enum { kHIDSuccess = 0, kHIDInvalidRangePageErr = -13923, kHIDReportIDZeroErr = -13924, kHIDReportCountZeroErr = -13925, kHIDReportSizeZeroErr = -13926, kHIDUnmatchedDesignatorRangeErr = -13927, kHIDUnmatchedStringRangeErr = -13928, kHIDInvertedUsageRangeErr = -13929, kHIDUnmatchedUsageRangeErr = -13930, kHIDInvertedPhysicalRangeErr = -13931, kHIDInvertedLogicalRangeErr = -13932, kHIDBadLogicalMaximumErr = -13933, kHIDBadLogicalMinimumErr = -13934, kHIDUsagePageZeroErr = -13935, kHIDEndOfDescriptorErr = -13936, kHIDNotEnoughMemoryErr = -13937, kHIDBadParameterErr = -13938, kHIDNullPointerErr = -13939, kHIDInvalidReportLengthErr = -13940, kHIDInvalidReportTypeErr = -13941, kHIDBadLogPhysValuesErr = -13942, kHIDIncompatibleReportErr = -13943, kHIDInvalidPreparsedDataErr = -13944, kHIDNotValueArrayErr = -13945, kHIDUsageNotFoundErr = -13946, kHIDValueOutOfRangeErr = -13947, kHIDBufferTooSmallErr = -13948, kHIDNullStateErr = -13949, kHIDBaseError = -13950 }; enum { kModemOutOfMemory = -14000, kModemPreferencesMissing = -14001, kModemScriptMissing = -14002 }; enum { kTXNEndIterationErr = -22000, kTXNCannotAddFrameErr = -22001, kTXNInvalidFrameIDErr = -22002, kTXNIllegalToCrossDataBoundariesErr = -22003, kTXNUserCanceledOperationErr = -22004, kTXNBadDefaultFileTypeWarning = -22005, kTXNCannotSetAutoIndentErr = -22006, kTXNRunIndexOutofBoundsErr = -22007, kTXNNoMatchErr = -22008, kTXNAttributeTagInvalidForRunErr = -22009, kTXNSomeOrAllTagsInvalidForRunErr = -22010, kTXNInvalidRunIndex = -22011, kTXNAlreadyInitializedErr = -22012, kTXNCannotTurnTSMOffWhenUsingUnicodeErr = -22013, kTXNCopyNotAllowedInEchoModeErr = -22014, kTXNDataTypeNotAllowedErr = -22015, kTXNATSUIIsNotInstalledErr = -22016, kTXNOutsideOfLineErr = -22017, kTXNOutsideOfFrameErr = -22018 }; enum { printerStatusOpCodeNotSupportedErr = -25280 }; enum { errKCNotAvailable = -25291, errKCReadOnly = -25292, errKCAuthFailed = -25293, errKCNoSuchKeychain = -25294, errKCInvalidKeychain = -25295, errKCDuplicateKeychain = -25296, errKCDuplicateCallback = -25297, errKCInvalidCallback = -25298, errKCDuplicateItem = -25299, errKCItemNotFound = -25300, errKCBufferTooSmall = -25301, errKCDataTooLarge = -25302, errKCNoSuchAttr = -25303, errKCInvalidItemRef = -25304, errKCInvalidSearchRef = -25305, errKCNoSuchClass = -25306, errKCNoDefaultKeychain = -25307, errKCInteractionNotAllowed = -25308, errKCReadOnlyAttr = -25309, errKCWrongKCVersion = -25310, errKCKeySizeNotAllowed = -25311, errKCNoStorageModule = -25312, errKCNoCertificateModule = -25313, errKCNoPolicyModule = -25314, errKCInteractionRequired = -25315, errKCDataNotAvailable = -25316, errKCDataNotModifiable = -25317, errKCCreateChainFailed = -25318 }; enum { kUCOutputBufferTooSmall = -25340, kUCTextBreakLocatorMissingType = -25341 }; enum { kUCTSNoKeysAddedToObjectErr = -25342, kUCTSSearchListErr = -25343 }; enum { kUCTokenizerIterationFinished = -25344, kUCTokenizerUnknownLang = -25345, kUCTokenNotFound = -25346 }; enum { kMPIterationEndErr = -29275, kMPPrivilegedErr = -29276, kMPProcessCreatedErr = -29288, kMPProcessTerminatedErr = -29289, kMPTaskCreatedErr = -29290, kMPTaskBlockedErr = -29291, kMPTaskStoppedErr = -29292, kMPBlueBlockingErr = -29293, kMPDeletedErr = -29295, kMPTimeoutErr = -29296, kMPTaskAbortedErr = -29297, kMPInsufficientResourcesErr = -29298, kMPInvalidIDErr = -29299 }; enum { kMPNanokernelNeedsMemoryErr = -29294 }; enum { kCollateAttributesNotFoundErr = -29500, kCollateInvalidOptions = -29501, kCollateMissingUnicodeTableErr = -29502, kCollateUnicodeConvertFailedErr = -29503, kCollatePatternNotFoundErr = -29504, kCollateInvalidChar = -29505, kCollateBufferTooSmall = -29506, kCollateInvalidCollationRef = -29507 }; enum { kFNSInvalidReferenceErr = -29580, kFNSBadReferenceVersionErr = -29581, kFNSInvalidProfileErr = -29582, kFNSBadProfileVersionErr = -29583, kFNSDuplicateReferenceErr = -29584, kFNSMismatchErr = -29585, kFNSInsufficientDataErr = -29586, kFNSBadFlattenedSizeErr = -29587, kFNSNameNotFoundErr = -29589 }; enum { kLocalesBufferTooSmallErr = -30001, kLocalesTableFormatErr = -30002, kLocalesDefaultDisplayStatus = -30029 }; enum { kALMInternalErr = -30049, kALMGroupNotFoundErr = -30048, kALMNoSuchModuleErr = -30047, kALMModuleCommunicationErr = -30046, kALMDuplicateModuleErr = -30045, kALMInstallationErr = -30044, kALMDeferSwitchErr = -30043, kALMRebootFlagsLevelErr = -30042 }; enum { kALMLocationNotFoundErr = kALMGroupNotFoundErr }; enum { kSSpInternalErr = -30340, kSSpVersionErr = -30341, kSSpCantInstallErr = -30342, kSSpParallelUpVectorErr = -30343, kSSpScaleToZeroErr = -30344 }; enum { kNSpInitializationFailedErr = -30360, kNSpAlreadyInitializedErr = -30361, kNSpTopologyNotSupportedErr = -30362, kNSpPipeFullErr = -30364, kNSpHostFailedErr = -30365, kNSpProtocolNotAvailableErr = -30366, kNSpInvalidGameRefErr = -30367, kNSpInvalidParameterErr = -30369, kNSpOTNotPresentErr = -30370, kNSpOTVersionTooOldErr = -30371, kNSpMemAllocationErr = -30373, kNSpAlreadyAdvertisingErr = -30374, kNSpNotAdvertisingErr = -30376, kNSpInvalidAddressErr = -30377, kNSpFreeQExhaustedErr = -30378, kNSpRemovePlayerFailedErr = -30379, kNSpAddressInUseErr = -30380, kNSpFeatureNotImplementedErr = -30381, kNSpNameRequiredErr = -30382, kNSpInvalidPlayerIDErr = -30383, kNSpInvalidGroupIDErr = -30384, kNSpNoPlayersErr = -30385, kNSpNoGroupsErr = -30386, kNSpNoHostVolunteersErr = -30387, kNSpCreateGroupFailedErr = -30388, kNSpAddPlayerFailedErr = -30389, kNSpInvalidDefinitionErr = -30390, kNSpInvalidProtocolRefErr = -30391, kNSpInvalidProtocolListErr = -30392, kNSpTimeoutErr = -30393, kNSpGameTerminatedErr = -30394, kNSpConnectFailedErr = -30395, kNSpSendFailedErr = -30396, kNSpMessageTooBigErr = -30397, kNSpCantBlockErr = -30398, kNSpJoinFailedErr = -30399 }; enum { kISpInternalErr = -30420, kISpSystemListErr = -30421, kISpBufferToSmallErr = -30422, kISpElementInListErr = -30423, kISpElementNotInListErr = -30424, kISpSystemInactiveErr = -30425, kISpDeviceInactiveErr = -30426, kISpSystemActiveErr = -30427, kISpDeviceActiveErr = -30428, kISpListBusyErr = -30429 }; enum { kDSpNotInitializedErr = -30440L, kDSpSystemSWTooOldErr = -30441L, kDSpInvalidContextErr = -30442L, kDSpInvalidAttributesErr = -30443L, kDSpContextAlreadyReservedErr = -30444L, kDSpContextNotReservedErr = -30445L, kDSpContextNotFoundErr = -30446L, kDSpFrameRateNotReadyErr = -30447L, kDSpConfirmSwitchWarning = -30448L, kDSpInternalErr = -30449L, kDSpStereoContextErr = -30450L }; enum { kFBCvTwinExceptionErr = -30500, kFBCnoIndexesFound = -30501, kFBCallocFailed = -30502, kFBCbadParam = -30503, kFBCfileNotIndexed = -30504, kFBCbadIndexFile = -30505, kFBCcompactionFailed = -30506, kFBCvalidationFailed = -30507, kFBCindexingFailed = -30508, kFBCcommitFailed = -30509, kFBCdeletionFailed = -30510, kFBCmoveFailed = -30511, kFBCtokenizationFailed = -30512, kFBCmergingFailed = -30513, kFBCindexCreationFailed = -30514, kFBCaccessorStoreFailed = -30515, kFBCaddDocFailed = -30516, kFBCflushFailed = -30517, kFBCindexNotFound = -30518, kFBCnoSearchSession = -30519, kFBCindexingCanceled = -30520, kFBCaccessCanceled = -30521, kFBCindexFileDestroyed = -30522, kFBCindexNotAvailable = -30523, kFBCsearchFailed = -30524, kFBCsomeFilesNotIndexed = -30525, kFBCillegalSessionChange = -30526, kFBCanalysisNotAvailable = -30527, kFBCbadIndexFileVersion = -30528, kFBCsummarizationCanceled = -30529, kFBCindexDiskIOFailed = -30530, kFBCbadSearchSession = -30531, kFBCnoSuchHit = -30532 }; enum { notAQTVRMovieErr = -30540, constraintReachedErr = -30541, callNotSupportedByNodeErr = -30542, selectorNotSupportedByNodeErr = -30543, invalidNodeIDErr = -30544, invalidViewStateErr = -30545, timeNotInViewErr = -30546, propertyNotSupportedByNodeErr = -30547, settingNotSupportedByNodeErr = -30548, limitReachedErr = -30549, invalidNodeFormatErr = -30550, invalidHotSpotIDErr = -30551, noMemoryNodeFailedInitialize = -30552, streamingNodeNotReadyErr = -30553, qtvrLibraryLoadErr = -30554, qtvrUninitialized = -30555 }; enum { themeInvalidBrushErr = -30560, themeProcessRegisteredErr = -30561, themeProcessNotRegisteredErr = -30562, themeBadTextColorErr = -30563, themeHasNoAccentsErr = -30564, themeBadCursorIndexErr = -30565, themeScriptFontNotFoundErr = -30566, themeMonitorDepthNotSupportedErr = -30567, themeNoAppropriateBrushErr = -30568 }; enum { errMessageNotSupported = -30580, errDataNotSupported = -30581, errControlDoesntSupportFocus = -30582, errUnknownControl = -30584, errCouldntSetFocus = -30585, errNoRootControl = -30586, errRootAlreadyExists = -30587, errInvalidPartCode = -30588, errControlsAlreadyExist = -30589, errControlIsNotEmbedder = -30590, errDataSizeMismatch = -30591, errControlHiddenOrDisabled = -30592, errCantEmbedIntoSelf = -30594, errCantEmbedRoot = -30595, errItemNotControl = -30596, controlInvalidDataVersionErr = -30597, controlPropertyInvalid = -5603, controlPropertyNotFoundErr = -5604, controlHandleInvalidErr = -30599 }; enum { kURLInvalidURLReferenceError = -30770, kURLProgressAlreadyDisplayedError = -30771, kURLDestinationExistsError = -30772, kURLInvalidURLError = -30773, kURLUnsupportedSchemeError = -30774, kURLServerBusyError = -30775, kURLAuthenticationError = -30776, kURLPropertyNotYetKnownError = -30777, kURLUnknownPropertyError = -30778, kURLPropertyBufferTooSmallError = -30779, kURLUnsettablePropertyError = -30780, kURLInvalidCallError = -30781, kURLFileEmptyError = -30783, kURLExtensionFailureError = -30785, kURLInvalidConfigurationError = -30786, kURLAccessNotAvailableError = -30787, kURL68kNotSupportedError = -30788 }; enum { errCppGeneral = -32000, errCppbad_alloc = -32001, errCppbad_cast = -32002, errCppbad_exception = -32003, errCppbad_typeid = -32004, errCpplogic_error = -32005, errCppdomain_error = -32006, errCppinvalid_argument = -32007, errCpplength_error = -32008, errCppout_of_range = -32009, errCppruntime_error = -32010, errCppoverflow_error = -32011, errCpprange_error = -32012, errCppunderflow_error = -32013, errCppios_base_failure = -32014, errCppLastSystemDefinedError = -32020, errCppLastUserDefinedError = -32049 }; enum { badComponentInstance = (int)0x80008001, badComponentSelector = (int)0x80008002 }; enum { dsBusError = 1, dsAddressErr = 2, dsIllInstErr = 3, dsZeroDivErr = 4, dsChkErr = 5, dsOvflowErr = 6, dsPrivErr = 7, dsTraceErr = 8, dsLineAErr = 9, dsLineFErr = 10, dsMiscErr = 11, dsCoreErr = 12, dsIrqErr = 13, dsIOCoreErr = 14, dsLoadErr = 15, dsFPErr = 16, dsNoPackErr = 17, dsNoPk1 = 18, dsNoPk2 = 19 }; enum { dsNoPk3 = 20, dsNoPk4 = 21, dsNoPk5 = 22, dsNoPk6 = 23, dsNoPk7 = 24, dsMemFullErr = 25, dsBadLaunch = 26, dsFSErr = 27, dsStknHeap = 28, negZcbFreeErr = 33, dsFinderErr = 41, dsBadSlotInt = 51, dsBadSANEOpcode = 81, dsBadPatchHeader = 83, menuPrgErr = 84, dsMBarNFnd = 85, dsHMenuFindErr = 86, dsWDEFNotFound = 87, dsCDEFNotFound = 88, dsMDEFNotFound = 89 }; enum { dsNoFPU = 90, dsNoPatch = 98, dsBadPatch = 99, dsParityErr = 101, dsOldSystem = 102, ds32BitMode = 103, dsNeedToWriteBootBlocks = 104, dsNotEnoughRAMToBoot = 105, dsBufPtrTooLow = 106, dsVMDeferredFuncTableFull = 112, dsVMBadBackingStore = 113, dsCantHoldSystemHeap = 114, dsSystemRequiresPowerPC = 116, dsGibblyMovedToDisabledFolder = 117, dsUnBootableSystem = 118, dsMustUseFCBAccessors = 119, dsMacOSROMVersionTooOld = 120, dsLostConnectionToNetworkDisk = 121, dsRAMDiskTooBig = 122, dsWriteToSupervisorStackGuardPage = 128, dsReinsert = 30, shutDownAlert = 42, dsShutDownOrRestart = 20000, dsSwitchOffOrRestart = 20001, dsForcedQuit = 20002, dsRemoveDisk = 20003, dsDirtyDisk = 20004, dsShutDownOrResume = 20109, dsSCSIWarn = 20010, dsMBSysError = 29200, dsMBFlpySysError = 29201, dsMBATASysError = 29202, dsMBATAPISysError = 29203, dsMBExternFlpySysError = 29204, dsPCCardATASysError = 29205 }; enum { dsNoExtsMacsBug = -1, dsNoExtsDisassembler = -2, dsMacsBugInstalled = -10, dsDisassemblerInstalled = -11, dsExtensionsDisabled = -13, dsGreeting = 40, dsSysErr = 32767, WDEFNFnd = dsWDEFNotFound }; enum { CDEFNFnd = dsCDEFNotFound, dsNotThe1 = 31, dsBadStartupDisk = 42, dsSystemFileErr = 43, dsHD20Installed = -12, mBarNFnd = -126, fsDSIntErr = -127, hMenuFindErr = -127, userBreak = -490, strUserBreak = -491, exUserBreak = -492 }; enum { dsBadLibrary = 1010, dsMixedModeFailure = 1011 }; enum { kPOSIXErrorBase = 100000, kPOSIXErrorEPERM = 100001, kPOSIXErrorENOENT = 100002, kPOSIXErrorESRCH = 100003, kPOSIXErrorEINTR = 100004, kPOSIXErrorEIO = 100005, kPOSIXErrorENXIO = 100006, kPOSIXErrorE2BIG = 100007, kPOSIXErrorENOEXEC = 100008, kPOSIXErrorEBADF = 100009, kPOSIXErrorECHILD = 100010, kPOSIXErrorEDEADLK = 100011, kPOSIXErrorENOMEM = 100012, kPOSIXErrorEACCES = 100013, kPOSIXErrorEFAULT = 100014, kPOSIXErrorENOTBLK = 100015, kPOSIXErrorEBUSY = 100016, kPOSIXErrorEEXIST = 100017, kPOSIXErrorEXDEV = 100018, kPOSIXErrorENODEV = 100019, kPOSIXErrorENOTDIR = 100020, kPOSIXErrorEISDIR = 100021, kPOSIXErrorEINVAL = 100022, kPOSIXErrorENFILE = 100023, kPOSIXErrorEMFILE = 100024, kPOSIXErrorENOTTY = 100025, kPOSIXErrorETXTBSY = 100026, kPOSIXErrorEFBIG = 100027, kPOSIXErrorENOSPC = 100028, kPOSIXErrorESPIPE = 100029, kPOSIXErrorEROFS = 100030, kPOSIXErrorEMLINK = 100031, kPOSIXErrorEPIPE = 100032, kPOSIXErrorEDOM = 100033, kPOSIXErrorERANGE = 100034, kPOSIXErrorEAGAIN = 100035, kPOSIXErrorEINPROGRESS = 100036, kPOSIXErrorEALREADY = 100037, kPOSIXErrorENOTSOCK = 100038, kPOSIXErrorEDESTADDRREQ = 100039, kPOSIXErrorEMSGSIZE = 100040, kPOSIXErrorEPROTOTYPE = 100041, kPOSIXErrorENOPROTOOPT = 100042, kPOSIXErrorEPROTONOSUPPORT = 100043, kPOSIXErrorESOCKTNOSUPPORT = 100044, kPOSIXErrorENOTSUP = 100045, kPOSIXErrorEPFNOSUPPORT = 100046, kPOSIXErrorEAFNOSUPPORT = 100047, kPOSIXErrorEADDRINUSE = 100048, kPOSIXErrorEADDRNOTAVAIL = 100049, kPOSIXErrorENETDOWN = 100050, kPOSIXErrorENETUNREACH = 100051, kPOSIXErrorENETRESET = 100052, kPOSIXErrorECONNABORTED = 100053, kPOSIXErrorECONNRESET = 100054, kPOSIXErrorENOBUFS = 100055, kPOSIXErrorEISCONN = 100056, kPOSIXErrorENOTCONN = 100057, kPOSIXErrorESHUTDOWN = 100058, kPOSIXErrorETOOMANYREFS = 100059, kPOSIXErrorETIMEDOUT = 100060, kPOSIXErrorECONNREFUSED = 100061, kPOSIXErrorELOOP = 100062, kPOSIXErrorENAMETOOLONG = 100063, kPOSIXErrorEHOSTDOWN = 100064, kPOSIXErrorEHOSTUNREACH = 100065, kPOSIXErrorENOTEMPTY = 100066, kPOSIXErrorEPROCLIM = 100067, kPOSIXErrorEUSERS = 100068, kPOSIXErrorEDQUOT = 100069, kPOSIXErrorESTALE = 100070, kPOSIXErrorEREMOTE = 100071, kPOSIXErrorEBADRPC = 100072, kPOSIXErrorERPCMISMATCH = 100073, kPOSIXErrorEPROGUNAVAIL = 100074, kPOSIXErrorEPROGMISMATCH = 100075, kPOSIXErrorEPROCUNAVAIL = 100076, kPOSIXErrorENOLCK = 100077, kPOSIXErrorENOSYS = 100078, kPOSIXErrorEFTYPE = 100079, kPOSIXErrorEAUTH = 100080, kPOSIXErrorENEEDAUTH = 100081, kPOSIXErrorEPWROFF = 100082, kPOSIXErrorEDEVERR = 100083, kPOSIXErrorEOVERFLOW = 100084, kPOSIXErrorEBADEXEC = 100085, kPOSIXErrorEBADARCH = 100086, kPOSIXErrorESHLIBVERS = 100087, kPOSIXErrorEBADMACHO = 100088, kPOSIXErrorECANCELED = 100089, kPOSIXErrorEIDRM = 100090, kPOSIXErrorENOMSG = 100091, kPOSIXErrorEILSEQ = 100092, kPOSIXErrorENOATTR = 100093, kPOSIXErrorEBADMSG = 100094, kPOSIXErrorEMULTIHOP = 100095, kPOSIXErrorENODATA = 100096, kPOSIXErrorENOLINK = 100097, kPOSIXErrorENOSR = 100098, kPOSIXErrorENOSTR = 100099, kPOSIXErrorEPROTO = 100100, kPOSIXErrorETIME = 100101, kPOSIXErrorEOPNOTSUPP = 100102 }; extern void SysError(short errorCode) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); } extern "C" { #pragma pack(push, 2) enum { kUTCDefaultOptions = 0 }; struct UTCDateTime { UInt16 highSeconds; UInt32 lowSeconds; UInt16 fraction; }; typedef struct UTCDateTime UTCDateTime; typedef UTCDateTime * UTCDateTimePtr; typedef UTCDateTimePtr * UTCDateTimeHandle; struct LocalDateTime { UInt16 highSeconds; UInt32 lowSeconds; UInt16 fraction; }; typedef struct LocalDateTime LocalDateTime; typedef LocalDateTime * LocalDateTimePtr; typedef LocalDateTimePtr * LocalDateTimeHandle; #pragma pack(pop) } extern "C" { #pragma pack(push, 2) enum { kTextFlushDefault = 0, kTextCenter = 1, kTextFlushRight = -1, kTextFlushLeft = -2 }; typedef UInt32 TextEncodingBase; enum { kTextEncodingMacRoman = 0, kTextEncodingMacJapanese = 1, kTextEncodingMacChineseTrad = 2, kTextEncodingMacKorean = 3, kTextEncodingMacArabic = 4, kTextEncodingMacHebrew = 5, kTextEncodingMacGreek = 6, kTextEncodingMacCyrillic = 7, kTextEncodingMacDevanagari = 9, kTextEncodingMacGurmukhi = 10, kTextEncodingMacGujarati = 11, kTextEncodingMacOriya = 12, kTextEncodingMacBengali = 13, kTextEncodingMacTamil = 14, kTextEncodingMacTelugu = 15, kTextEncodingMacKannada = 16, kTextEncodingMacMalayalam = 17, kTextEncodingMacSinhalese = 18, kTextEncodingMacBurmese = 19, kTextEncodingMacKhmer = 20, kTextEncodingMacThai = 21, kTextEncodingMacLaotian = 22, kTextEncodingMacGeorgian = 23, kTextEncodingMacArmenian = 24, kTextEncodingMacChineseSimp = 25, kTextEncodingMacTibetan = 26, kTextEncodingMacMongolian = 27, kTextEncodingMacEthiopic = 28, kTextEncodingMacCentralEurRoman = 29, kTextEncodingMacVietnamese = 30, kTextEncodingMacExtArabic = 31, kTextEncodingMacSymbol = 33, kTextEncodingMacDingbats = 34, kTextEncodingMacTurkish = 35, kTextEncodingMacCroatian = 36, kTextEncodingMacIcelandic = 37, kTextEncodingMacRomanian = 38, kTextEncodingMacCeltic = 39, kTextEncodingMacGaelic = 40, kTextEncodingMacKeyboardGlyphs = 41 }; enum { kTextEncodingMacTradChinese = kTextEncodingMacChineseTrad, kTextEncodingMacRSymbol = 8, kTextEncodingMacSimpChinese = kTextEncodingMacChineseSimp, kTextEncodingMacGeez = kTextEncodingMacEthiopic, kTextEncodingMacEastEurRoman = kTextEncodingMacCentralEurRoman, kTextEncodingMacUninterp = 32 }; enum { kTextEncodingMacUnicode = 0x7E }; enum { kTextEncodingMacFarsi = 0x8C, kTextEncodingMacUkrainian = 0x98, kTextEncodingMacInuit = 0xEC, kTextEncodingMacVT100 = 0xFC }; enum { kTextEncodingMacHFS = 0xFF }; enum { kTextEncodingUnicodeDefault = 0x0100, kTextEncodingUnicodeV1_1 = 0x0101, kTextEncodingISO10646_1993 = 0x0101, kTextEncodingUnicodeV2_0 = 0x0103, kTextEncodingUnicodeV2_1 = 0x0103, kTextEncodingUnicodeV3_0 = 0x0104, kTextEncodingUnicodeV3_1 = 0x0105, kTextEncodingUnicodeV3_2 = 0x0106, kTextEncodingUnicodeV4_0 = 0x0108, kTextEncodingUnicodeV5_0 = 0x010A, kTextEncodingUnicodeV5_1 = 0x010B, kTextEncodingUnicodeV6_0 = 0x010D, kTextEncodingUnicodeV6_1 = 0x010E, kTextEncodingUnicodeV6_3 = 0x0110, kTextEncodingUnicodeV7_0 = 0x0111, kTextEncodingUnicodeV8_0 = 0x0112, kTextEncodingUnicodeV9_0 = 0x0113, kTextEncodingUnicodeV10_0 = 0x0114, kTextEncodingUnicodeV11_0 = 0x0115, kTextEncodingUnicodeV12_1 = 0x0116, kTextEncodingUnicodeV13_0 = 0x0117 }; enum { kTextEncodingISOLatin1 = 0x0201, kTextEncodingISOLatin2 = 0x0202, kTextEncodingISOLatin3 = 0x0203, kTextEncodingISOLatin4 = 0x0204, kTextEncodingISOLatinCyrillic = 0x0205, kTextEncodingISOLatinArabic = 0x0206, kTextEncodingISOLatinGreek = 0x0207, kTextEncodingISOLatinHebrew = 0x0208, kTextEncodingISOLatin5 = 0x0209, kTextEncodingISOLatin6 = 0x020A, kTextEncodingISOLatin7 = 0x020D, kTextEncodingISOLatin8 = 0x020E, kTextEncodingISOLatin9 = 0x020F, kTextEncodingISOLatin10 = 0x0210 }; enum { kTextEncodingDOSLatinUS = 0x0400, kTextEncodingDOSGreek = 0x0405, kTextEncodingDOSBalticRim = 0x0406, kTextEncodingDOSLatin1 = 0x0410, kTextEncodingDOSGreek1 = 0x0411, kTextEncodingDOSLatin2 = 0x0412, kTextEncodingDOSCyrillic = 0x0413, kTextEncodingDOSTurkish = 0x0414, kTextEncodingDOSPortuguese = 0x0415, kTextEncodingDOSIcelandic = 0x0416, kTextEncodingDOSHebrew = 0x0417, kTextEncodingDOSCanadianFrench = 0x0418, kTextEncodingDOSArabic = 0x0419, kTextEncodingDOSNordic = 0x041A, kTextEncodingDOSRussian = 0x041B, kTextEncodingDOSGreek2 = 0x041C, kTextEncodingDOSThai = 0x041D, kTextEncodingDOSJapanese = 0x0420, kTextEncodingDOSChineseSimplif = 0x0421, kTextEncodingDOSKorean = 0x0422, kTextEncodingDOSChineseTrad = 0x0423, kTextEncodingWindowsLatin1 = 0x0500, kTextEncodingWindowsANSI = 0x0500, kTextEncodingWindowsLatin2 = 0x0501, kTextEncodingWindowsCyrillic = 0x0502, kTextEncodingWindowsGreek = 0x0503, kTextEncodingWindowsLatin5 = 0x0504, kTextEncodingWindowsHebrew = 0x0505, kTextEncodingWindowsArabic = 0x0506, kTextEncodingWindowsBalticRim = 0x0507, kTextEncodingWindowsVietnamese = 0x0508, kTextEncodingWindowsKoreanJohab = 0x0510 }; enum { kTextEncodingUS_ASCII = 0x0600, kTextEncodingANSEL = 0x0601, kTextEncodingJIS_X0201_76 = 0x0620, kTextEncodingJIS_X0208_83 = 0x0621, kTextEncodingJIS_X0208_90 = 0x0622, kTextEncodingJIS_X0212_90 = 0x0623, kTextEncodingJIS_C6226_78 = 0x0624, kTextEncodingShiftJIS_X0213 = 0x0628, kTextEncodingJIS_X0213_MenKuTen = 0x0629, kTextEncodingGB_2312_80 = 0x0630, kTextEncodingGBK_95 = 0x0631, kTextEncodingGB_18030_2000 = 0x0632, kTextEncodingGB_18030_2005 = 0x0632, kTextEncodingKSC_5601_87 = 0x0640, kTextEncodingKSC_5601_92_Johab = 0x0641, kTextEncodingCNS_11643_92_P1 = 0x0651, kTextEncodingCNS_11643_92_P2 = 0x0652, kTextEncodingCNS_11643_92_P3 = 0x0653 }; enum { kTextEncodingISO_2022_JP = 0x0820, kTextEncodingISO_2022_JP_2 = 0x0821, kTextEncodingISO_2022_JP_1 = 0x0822, kTextEncodingISO_2022_JP_3 = 0x0823, kTextEncodingISO_2022_CN = 0x0830, kTextEncodingISO_2022_CN_EXT = 0x0831, kTextEncodingISO_2022_KR = 0x0840 }; enum { kTextEncodingEUC_JP = 0x0920, kTextEncodingEUC_CN = 0x0930, kTextEncodingEUC_TW = 0x0931, kTextEncodingEUC_KR = 0x0940 }; enum { kTextEncodingShiftJIS = 0x0A01, kTextEncodingKOI8_R = 0x0A02, kTextEncodingBig5 = 0x0A03, kTextEncodingMacRomanLatin1 = 0x0A04, kTextEncodingHZ_GB_2312 = 0x0A05, kTextEncodingBig5_HKSCS_1999 = 0x0A06, kTextEncodingVISCII = 0x0A07, kTextEncodingKOI8_U = 0x0A08, kTextEncodingBig5_E = 0x0A09 }; enum { kTextEncodingNextStepLatin = 0x0B01, kTextEncodingNextStepJapanese = 0x0B02 }; enum { kTextEncodingEBCDIC_LatinCore = 0x0C01, kTextEncodingEBCDIC_CP037 = 0x0C02 }; enum { kTextEncodingMultiRun = 0x0FFF, kTextEncodingUnknown = 0xFFFF }; enum { kTextEncodingEBCDIC_US = 0x0C01 }; typedef UInt32 TextEncodingVariant; enum { kTextEncodingDefaultVariant = 0 }; enum { kMacRomanDefaultVariant = 0, kMacRomanCurrencySignVariant = 1, kMacRomanEuroSignVariant = 2 }; enum { kMacCyrillicDefaultVariant = 0, kMacCyrillicCurrSignStdVariant = 1, kMacCyrillicCurrSignUkrVariant = 2, kMacCyrillicEuroSignVariant = 3 }; enum { kMacIcelandicStdDefaultVariant = 0, kMacIcelandicTTDefaultVariant = 1, kMacIcelandicStdCurrSignVariant = 2, kMacIcelandicTTCurrSignVariant = 3, kMacIcelandicStdEuroSignVariant = 4, kMacIcelandicTTEuroSignVariant = 5 }; enum { kMacCroatianDefaultVariant = 0, kMacCroatianCurrencySignVariant = 1, kMacCroatianEuroSignVariant = 2 }; enum { kMacRomanianDefaultVariant = 0, kMacRomanianCurrencySignVariant = 1, kMacRomanianEuroSignVariant = 2 }; enum { kMacJapaneseStandardVariant = 0, kMacJapaneseStdNoVerticalsVariant = 1, kMacJapaneseBasicVariant = 2, kMacJapanesePostScriptScrnVariant = 3, kMacJapanesePostScriptPrintVariant = 4, kMacJapaneseVertAtKuPlusTenVariant = 5 }; enum { kMacArabicStandardVariant = 0, kMacArabicTrueTypeVariant = 1, kMacArabicThuluthVariant = 2, kMacArabicAlBayanVariant = 3 }; enum { kMacFarsiStandardVariant = 0, kMacFarsiTrueTypeVariant = 1 }; enum { kMacHebrewStandardVariant = 0, kMacHebrewFigureSpaceVariant = 1 }; enum { kMacGreekDefaultVariant = 0, kMacGreekNoEuroSignVariant = 1, kMacGreekEuroSignVariant = 2 }; enum { kMacVT100DefaultVariant = 0, kMacVT100CurrencySignVariant = 1, kMacVT100EuroSignVariant = 2 }; enum { kUnicodeNoSubset = 0, kUnicodeNormalizationFormD = 5, kUnicodeNormalizationFormC = 3, kUnicodeHFSPlusDecompVariant = 8, kUnicodeHFSPlusCompVariant = 9 }; enum { kISOLatin1StandardVariant = 0, kISOLatin1MusicCDVariant = 1 }; enum { kISOLatinArabicImplicitOrderVariant = 0, kISOLatinArabicVisualOrderVariant = 1, kISOLatinArabicExplicitOrderVariant = 2 }; enum { kISOLatinHebrewImplicitOrderVariant = 0, kISOLatinHebrewVisualOrderVariant = 1, kISOLatinHebrewExplicitOrderVariant = 2 }; enum { kWindowsLatin1StandardVariant = 0, kWindowsLatin1PalmVariant = 1 }; enum { kDOSJapaneseStandardVariant = 0, kDOSJapanesePalmVariant = 1 }; enum { kEUC_CN_BasicVariant = 0, kEUC_CN_DOSVariant = 1 }; enum { kEUC_KR_BasicVariant = 0, kEUC_KR_DOSVariant = 1 }; enum { kShiftJIS_BasicVariant = 0, kShiftJIS_DOSVariant = 1, kShiftJIS_MusicCDVariant = 2 }; enum { kBig5_BasicVariant = 0, kBig5_StandardVariant = 1, kBig5_ETenVariant = 2, kBig5_DOSVariant = 3 }; enum { kMacRomanLatin1DefaultVariant = 0, kMacRomanLatin1StandardVariant = 2, kMacRomanLatin1TurkishVariant = 6, kMacRomanLatin1CroatianVariant = 8, kMacRomanLatin1IcelandicVariant = 11, kMacRomanLatin1RomanianVariant = 14 }; enum { kUnicodeNoCompatibilityVariant = 1, kUnicodeNoCorporateVariant = 4 }; enum { kMacRomanStandardVariant = 0, kMacIcelandicStandardVariant = 0, kMacIcelandicTrueTypeVariant = 1, kJapaneseStandardVariant = 0, kJapaneseStdNoVerticalsVariant = 1, kJapaneseBasicVariant = 2, kJapanesePostScriptScrnVariant = 3, kJapanesePostScriptPrintVariant = 4, kJapaneseVertAtKuPlusTenVariant = 5, kTextEncodingShiftJIS_X0213_00 = 0x0628, kHebrewStandardVariant = 0, kHebrewFigureSpaceVariant = 1, kUnicodeCanonicalDecompVariant = 2, kUnicodeMaxDecomposedVariant = 2, kUnicodeCanonicalCompVariant = 3, kUnicodeNoComposedVariant = 3 }; typedef UInt32 TextEncodingFormat; enum { kTextEncodingDefaultFormat = 0, kUnicodeUTF16Format = 0, kUnicodeUTF7Format = 1, kUnicodeUTF8Format = 2, kUnicodeUTF32Format = 3, kUnicodeUTF16BEFormat = 4, kUnicodeUTF16LEFormat = 5, kUnicodeUTF32BEFormat = 6, kUnicodeUTF32LEFormat = 7, kUnicodeSCSUFormat = 8, kUnicode16BitFormat = 0, kUnicode32BitFormat = 3 }; typedef UInt32 TextEncoding; typedef UInt32 TextEncodingNameSelector; enum { kTextEncodingFullName = 0, kTextEncodingBaseName = 1, kTextEncodingVariantName = 2, kTextEncodingFormatName = 3 }; struct TextEncodingRun { ByteOffset offset; TextEncoding textEncoding; }; typedef struct TextEncodingRun TextEncodingRun; typedef TextEncodingRun * TextEncodingRunPtr; typedef const TextEncodingRun * ConstTextEncodingRunPtr; struct ScriptCodeRun { ByteOffset offset; ScriptCode script; }; typedef struct ScriptCodeRun ScriptCodeRun; typedef ScriptCodeRun * ScriptCodeRunPtr; typedef const ScriptCodeRun * ConstScriptCodeRunPtr; typedef UInt8 * TextPtr; typedef const UInt8 * ConstTextPtr; typedef UniChar * UniCharArrayPtr; typedef const UniChar * ConstUniCharArrayPtr; typedef UniCharArrayPtr * UniCharArrayHandle; typedef unsigned long UniCharArrayOffset; enum { kTextScriptDontCare = -128, kTextLanguageDontCare = -128, kTextRegionDontCare = -128 }; struct TECInfo { UInt16 format; UInt16 tecVersion; UInt32 tecTextConverterFeatures; UInt32 tecUnicodeConverterFeatures; UInt32 tecTextCommonFeatures; Str31 tecTextEncodingsFolderName; Str31 tecExtensionFileName; UInt16 tecLowestTEFileVersion; UInt16 tecHighestTEFileVersion; }; typedef struct TECInfo TECInfo; typedef TECInfo * TECInfoPtr; typedef TECInfoPtr * TECInfoHandle; enum { kTECInfoCurrentFormat = 2 }; enum { kTECKeepInfoFixBit = 0, kTECFallbackTextLengthFixBit = 1, kTECTextRunBitClearFixBit = 2, kTECTextToUnicodeScanFixBit = 3, kTECAddForceASCIIChangesBit = 4, kTECPreferredEncodingFixBit = 5, kTECAddTextRunHeuristicsBit = 6, kTECAddFallbackInterruptBit = 7 }; enum { kTECKeepInfoFixMask = 1L << kTECKeepInfoFixBit, kTECFallbackTextLengthFixMask = 1L << kTECFallbackTextLengthFixBit, kTECTextRunBitClearFixMask = 1L << kTECTextRunBitClearFixBit, kTECTextToUnicodeScanFixMask = 1L << kTECTextToUnicodeScanFixBit, kTECAddForceASCIIChangesMask = 1L << kTECAddForceASCIIChangesBit, kTECPreferredEncodingFixMask = 1L << kTECPreferredEncodingFixBit, kTECAddTextRunHeuristicsMask = 1L << kTECAddTextRunHeuristicsBit, kTECAddFallbackInterruptMask = 1L << kTECAddFallbackInterruptBit }; enum { kUnicodeByteOrderMark = 0xFEFF, kUnicodeObjectReplacement = 0xFFFC, kUnicodeReplacementChar = 0xFFFD, kUnicodeSwappedByteOrderMark = 0xFFFE, kUnicodeNotAChar = 0xFFFF }; typedef SInt32 UCCharPropertyType; enum { kUCCharPropTypeGenlCategory = 1, kUCCharPropTypeCombiningClass = 2, kUCCharPropTypeBidiCategory = 3, kUCCharPropTypeDecimalDigitValue = 4 }; typedef UInt32 UCCharPropertyValue; enum { kUCGenlCatOtherNotAssigned = 0, kUCGenlCatOtherControl = 1, kUCGenlCatOtherFormat = 2, kUCGenlCatOtherSurrogate = 3, kUCGenlCatOtherPrivateUse = 4, kUCGenlCatMarkNonSpacing = 5, kUCGenlCatMarkSpacingCombining = 6, kUCGenlCatMarkEnclosing = 7, kUCGenlCatNumberDecimalDigit = 8, kUCGenlCatNumberLetter = 9, kUCGenlCatNumberOther = 10, kUCGenlCatSeparatorSpace = 11, kUCGenlCatSeparatorLine = 12, kUCGenlCatSeparatorParagraph = 13, kUCGenlCatLetterUppercase = 14, kUCGenlCatLetterLowercase = 15, kUCGenlCatLetterTitlecase = 16, kUCGenlCatLetterModifier = 17, kUCGenlCatLetterOther = 18, kUCGenlCatPunctConnector = 20, kUCGenlCatPunctDash = 21, kUCGenlCatPunctOpen = 22, kUCGenlCatPunctClose = 23, kUCGenlCatPunctInitialQuote = 24, kUCGenlCatPunctFinalQuote = 25, kUCGenlCatPunctOther = 26, kUCGenlCatSymbolMath = 28, kUCGenlCatSymbolCurrency = 29, kUCGenlCatSymbolModifier = 30, kUCGenlCatSymbolOther = 31 }; enum { kUCBidiCatNotApplicable = 0, kUCBidiCatLeftRight = 1, kUCBidiCatRightLeft = 2, kUCBidiCatEuroNumber = 3, kUCBidiCatEuroNumberSeparator = 4, kUCBidiCatEuroNumberTerminator = 5, kUCBidiCatArabicNumber = 6, kUCBidiCatCommonNumberSeparator = 7, kUCBidiCatBlockSeparator = 8, kUCBidiCatSegmentSeparator = 9, kUCBidiCatWhitespace = 10, kUCBidiCatOtherNeutral = 11, kUCBidiCatRightLeftArabic = 12, kUCBidiCatLeftRightEmbedding = 13, kUCBidiCatRightLeftEmbedding = 14, kUCBidiCatLeftRightOverride = 15, kUCBidiCatRightLeftOverride = 16, kUCBidiCatPopDirectionalFormat = 17, kUCBidiCatNonSpacingMark = 18, kUCBidiCatBoundaryNeutral = 19, kUCBidiCatLeftRightIsolate = 20, kUCBidiCatRightLeftIsolate = 21, kUCBidiCatFirstStrongIsolate = 22, kUCBidiCatPopDirectionalIsolate = 23 }; extern TextEncoding CreateTextEncoding( TextEncodingBase encodingBase, TextEncodingVariant encodingVariant, TextEncodingFormat encodingFormat) __attribute__((availability(macosx,introduced=10.0))); extern TextEncodingBase GetTextEncodingBase(TextEncoding encoding) __attribute__((availability(macosx,introduced=10.0))); extern TextEncodingVariant GetTextEncodingVariant(TextEncoding encoding) __attribute__((availability(macosx,introduced=10.0))); extern TextEncodingFormat GetTextEncodingFormat(TextEncoding encoding) __attribute__((availability(macosx,introduced=10.0))); extern TextEncoding ResolveDefaultTextEncoding(TextEncoding encoding) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus GetTextEncodingName( TextEncoding iEncoding, TextEncodingNameSelector iNamePartSelector, RegionCode iPreferredRegion, TextEncoding iPreferredEncoding, ByteCount iOutputBufLen, ByteCount * oNameLength, RegionCode * oActualRegion, TextEncoding * oActualEncoding, TextPtr oEncodingName) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetInfo(TECInfoHandle * tecInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UpgradeScriptInfoToTextEncoding( ScriptCode iTextScriptID, LangCode iTextLanguageID, RegionCode iRegionID, ConstStr255Param iTextFontname, TextEncoding * oEncoding) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus RevertTextEncodingToScriptInfo( TextEncoding iEncoding, ScriptCode * oTextScriptID, LangCode * oTextLanguageID, Str255 oTextFontname) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus GetTextEncodingFromScriptInfo( ScriptCode iTextScriptID, LangCode iTextLanguageID, RegionCode iTextRegionID, TextEncoding * oEncoding) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus GetScriptInfoFromTextEncoding( TextEncoding iEncoding, ScriptCode * oTextScriptID, LangCode * oTextLanguageID) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus NearestMacTextEncodings( TextEncoding generalEncoding, TextEncoding * bestMacEncoding, TextEncoding * alternateMacEncoding) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCGetCharProperty( const UniChar * charPtr, UniCharCount textLength, UCCharPropertyType propType, UCCharPropertyValue * propValue) __attribute__((availability(macosx,introduced=10.0))); enum { kUCHighSurrogateRangeStart = 0xD800, kUCHighSurrogateRangeEnd = 0xDBFF, kUCLowSurrogateRangeStart = 0xDC00, kUCLowSurrogateRangeEnd = 0xDFFF }; static __inline__ Boolean UCIsSurrogateHighCharacter( UniChar character ) { return ( ( character & 0xFC00 ) == kUCHighSurrogateRangeStart ); } static __inline__ Boolean UCIsSurrogateLowCharacter( UniChar character ) { return ( ( character & 0xFC00 ) == kUCLowSurrogateRangeStart ); } static __inline__ UnicodeScalarValue UCGetUnicodeScalarValueForSurrogatePair( UniChar surrogateHigh, UniChar surrogateLow ) { return ( (UnicodeScalarValue)( surrogateHigh - kUCHighSurrogateRangeStart ) << 10 ) + ( surrogateLow - kUCLowSurrogateRangeStart ) + 0x0010000; } #pragma pack(pop) } #pragma pack(push, 2) enum { kRoutineDescriptorVersion = 7 }; enum { _MixedModeMagic = 0xAAFE }; enum { kCurrentMixedModeStateRecord = 1 }; typedef unsigned short CallingConventionType; enum { kPascalStackBased = 0, kCStackBased = 1, kRegisterBased = 2, kD0DispatchedPascalStackBased = 8, kD1DispatchedPascalStackBased = 12, kD0DispatchedCStackBased = 9, kStackDispatchedPascalStackBased = 14, kThinkCStackBased = 5 }; typedef SInt8 ISAType; enum { kM68kISA = 0, kPowerPCISA = 1 }; enum { kX86ISA = 2 }; typedef SInt8 RTAType; enum { kOld68kRTA = 0 << 4, kPowerPCRTA = 0 << 4, kCFM68kRTA = 1 << 4 }; enum { kX86RTA = 2 << 4 }; enum { kRegisterD0 = 0, kRegisterD1 = 1, kRegisterD2 = 2, kRegisterD3 = 3, kRegisterD4 = 8, kRegisterD5 = 9, kRegisterD6 = 10, kRegisterD7 = 11, kRegisterA0 = 4, kRegisterA1 = 5, kRegisterA2 = 6, kRegisterA3 = 7, kRegisterA4 = 12, kRegisterA5 = 13, kRegisterA6 = 14, kCCRegisterCBit = 16, kCCRegisterVBit = 17, kCCRegisterZBit = 18, kCCRegisterNBit = 19, kCCRegisterXBit = 20 }; typedef unsigned short registerSelectorType; enum { kNoByteCode = 0, kOneByteCode = 1, kTwoByteCode = 2, kFourByteCode = 3 }; typedef unsigned long ProcInfoType; typedef unsigned short RoutineFlagsType; enum { kProcDescriptorIsAbsolute = 0x00, kProcDescriptorIsRelative = 0x01 }; enum { kFragmentIsPrepared = 0x00, kFragmentNeedsPreparing = 0x02 }; enum { kUseCurrentISA = 0x00, kUseNativeISA = 0x04 }; enum { kPassSelector = 0x00, kDontPassSelector = 0x08 }; enum { kRoutineIsNotDispatchedDefaultRoutine = 0x00, kRoutineIsDispatchedDefaultRoutine = 0x10 }; enum { kProcDescriptorIsProcPtr = 0x00, kProcDescriptorIsIndex = 0x20 }; struct RoutineRecord { ProcInfoType procInfo; SInt8 reserved1; ISAType ISA; RoutineFlagsType routineFlags; ProcPtr procDescriptor; UInt32 reserved2; UInt32 selector; }; typedef struct RoutineRecord RoutineRecord; typedef RoutineRecord * RoutineRecordPtr; typedef RoutineRecordPtr * RoutineRecordHandle; typedef UInt8 RDFlagsType; enum { kSelectorsAreNotIndexable = 0x00, kSelectorsAreIndexable = 0x01 }; struct RoutineDescriptor { UInt16 goMixedModeTrap; SInt8 version; RDFlagsType routineDescriptorFlags; UInt32 reserved1; UInt8 reserved2; UInt8 selectorInfo; UInt16 routineCount; RoutineRecord routineRecords[1]; }; typedef struct RoutineDescriptor RoutineDescriptor; typedef RoutineDescriptor * RoutineDescriptorPtr; typedef RoutineDescriptorPtr * RoutineDescriptorHandle; struct MixedModeStateRecord { UInt32 state1; UInt32 state2; UInt32 state3; UInt32 state4; }; typedef struct MixedModeStateRecord MixedModeStateRecord; enum { kCallingConventionWidth = 4, kCallingConventionPhase = 0, kCallingConventionMask = 0x0F, kResultSizeWidth = 2, kResultSizePhase = kCallingConventionWidth, kResultSizeMask = 0x30, kStackParameterWidth = 2, kStackParameterPhase = (kCallingConventionWidth + kResultSizeWidth), kStackParameterMask = (int)0xFFFFFFC0, kRegisterResultLocationWidth = 5, kRegisterResultLocationPhase = (kCallingConventionWidth + kResultSizeWidth), kRegisterParameterWidth = 5, kRegisterParameterPhase = (kCallingConventionWidth + kResultSizeWidth + kRegisterResultLocationWidth), kRegisterParameterMask = 0x7FFFF800, kRegisterParameterSizePhase = 0, kRegisterParameterSizeWidth = 2, kRegisterParameterWhichPhase = kRegisterParameterSizeWidth, kRegisterParameterWhichWidth = 3, kDispatchedSelectorSizeWidth = 2, kDispatchedSelectorSizePhase = (kCallingConventionWidth + kResultSizeWidth), kDispatchedParameterPhase = (kCallingConventionWidth + kResultSizeWidth + kDispatchedSelectorSizeWidth), kSpecialCaseSelectorWidth = 6, kSpecialCaseSelectorPhase = kCallingConventionWidth, kSpecialCaseSelectorMask = 0x03F0 }; enum { kSpecialCase = 0x000F }; enum { kSpecialCaseHighHook = 0, kSpecialCaseCaretHook = 0, kSpecialCaseEOLHook = 1, kSpecialCaseWidthHook = 2, kSpecialCaseTextWidthHook = 2, kSpecialCaseNWidthHook = 3, kSpecialCaseDrawHook = 4, kSpecialCaseHitTestHook = 5, kSpecialCaseTEFindWord = 6, kSpecialCaseProtocolHandler = 7, kSpecialCaseSocketListener = 8, kSpecialCaseTERecalc = 9, kSpecialCaseTEDoText = 10, kSpecialCaseGNEFilterProc = 11, kSpecialCaseMBarHook = 12 }; #pragma pack(pop) extern "C" { enum { kCollectionDontWantTag = 0, kCollectionDontWantId = 0, kCollectionDontWantSize = 0, kCollectionDontWantAttributes = 0, kCollectionDontWantIndex = 0, kCollectionDontWantData = 0 }; enum { kCollectionNoAttributes = 0x00000000, kCollectionAllAttributes = (int)0xFFFFFFFF, kCollectionUserAttributes = 0x0000FFFF, kCollectionDefaultAttributes = 0x40000000 }; enum { kCollectionUser0Bit = 0, kCollectionUser1Bit = 1, kCollectionUser2Bit = 2, kCollectionUser3Bit = 3, kCollectionUser4Bit = 4, kCollectionUser5Bit = 5, kCollectionUser6Bit = 6, kCollectionUser7Bit = 7, kCollectionUser8Bit = 8, kCollectionUser9Bit = 9, kCollectionUser10Bit = 10, kCollectionUser11Bit = 11, kCollectionUser12Bit = 12, kCollectionUser13Bit = 13, kCollectionUser14Bit = 14, kCollectionUser15Bit = 15, kCollectionReserved0Bit = 16, kCollectionReserved1Bit = 17, kCollectionReserved2Bit = 18, kCollectionReserved3Bit = 19, kCollectionReserved4Bit = 20, kCollectionReserved5Bit = 21, kCollectionReserved6Bit = 22, kCollectionReserved7Bit = 23, kCollectionReserved8Bit = 24, kCollectionReserved9Bit = 25, kCollectionReserved10Bit = 26, kCollectionReserved11Bit = 27, kCollectionReserved12Bit = 28, kCollectionReserved13Bit = 29, kCollectionPersistenceBit = 30, kCollectionLockBit = 31 }; enum { kCollectionUser0Mask = 1UL << kCollectionUser0Bit, kCollectionUser1Mask = 1UL << kCollectionUser1Bit, kCollectionUser2Mask = 1UL << kCollectionUser2Bit, kCollectionUser3Mask = 1UL << kCollectionUser3Bit, kCollectionUser4Mask = 1UL << kCollectionUser4Bit, kCollectionUser5Mask = 1UL << kCollectionUser5Bit, kCollectionUser6Mask = 1UL << kCollectionUser6Bit, kCollectionUser7Mask = 1UL << kCollectionUser7Bit, kCollectionUser8Mask = 1UL << kCollectionUser8Bit, kCollectionUser9Mask = 1UL << kCollectionUser9Bit, kCollectionUser10Mask = 1UL << kCollectionUser10Bit, kCollectionUser11Mask = 1UL << kCollectionUser11Bit, kCollectionUser12Mask = 1UL << kCollectionUser12Bit, kCollectionUser13Mask = 1UL << kCollectionUser13Bit, kCollectionUser14Mask = 1UL << kCollectionUser14Bit, kCollectionUser15Mask = 1UL << kCollectionUser15Bit, kCollectionReserved0Mask = 1UL << kCollectionReserved0Bit, kCollectionReserved1Mask = 1UL << kCollectionReserved1Bit, kCollectionReserved2Mask = 1UL << kCollectionReserved2Bit, kCollectionReserved3Mask = 1UL << kCollectionReserved3Bit, kCollectionReserved4Mask = 1UL << kCollectionReserved4Bit, kCollectionReserved5Mask = 1UL << kCollectionReserved5Bit, kCollectionReserved6Mask = 1UL << kCollectionReserved6Bit, kCollectionReserved7Mask = 1UL << kCollectionReserved7Bit, kCollectionReserved8Mask = 1UL << kCollectionReserved8Bit, kCollectionReserved9Mask = 1UL << kCollectionReserved9Bit, kCollectionReserved10Mask = 1UL << kCollectionReserved10Bit, kCollectionReserved11Mask = 1UL << kCollectionReserved11Bit, kCollectionReserved12Mask = 1UL << kCollectionReserved12Bit, kCollectionReserved13Mask = 1UL << kCollectionReserved13Bit, kCollectionPersistenceMask = 1UL << kCollectionPersistenceBit, kCollectionLockMask = 1UL << kCollectionLockBit }; typedef struct OpaqueCollection* Collection; typedef FourCharCode CollectionTag; typedef OSErr ( * CollectionFlattenProcPtr)(SInt32 size, void *data, void *refCon); typedef OSErr ( * CollectionExceptionProcPtr)(Collection c, OSErr status); typedef CollectionFlattenProcPtr CollectionFlattenUPP; typedef CollectionExceptionProcPtr CollectionExceptionUPP; extern CollectionFlattenUPP NewCollectionFlattenUPP(CollectionFlattenProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern CollectionExceptionUPP NewCollectionExceptionUPP(CollectionExceptionProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeCollectionFlattenUPP(CollectionFlattenUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeCollectionExceptionUPP(CollectionExceptionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr InvokeCollectionFlattenUPP( SInt32 size, void * data, void * refCon, CollectionFlattenUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr InvokeCollectionExceptionUPP( Collection c, OSErr status, CollectionExceptionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline CollectionFlattenUPP NewCollectionFlattenUPP(CollectionFlattenProcPtr userRoutine) { return userRoutine; } inline CollectionExceptionUPP NewCollectionExceptionUPP(CollectionExceptionProcPtr userRoutine) { return userRoutine; } inline void DisposeCollectionFlattenUPP(CollectionFlattenUPP) { } inline void DisposeCollectionExceptionUPP(CollectionExceptionUPP) { } inline OSErr InvokeCollectionFlattenUPP(SInt32 size, void * data, void * refCon, CollectionFlattenUPP userUPP) { return (*userUPP)(size, data, refCon); } inline OSErr InvokeCollectionExceptionUPP(Collection c, OSErr status, CollectionExceptionUPP userUPP) { return (*userUPP)(c, status); } extern Collection NewCollection(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeCollection(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Collection CloneCollection(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 CountCollectionOwners(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus RetainCollection(Collection c) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern OSStatus ReleaseCollection(Collection c) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern ItemCount GetCollectionRetainCount(Collection c) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern Collection CopyCollection( Collection srcCollection, Collection dstCollection) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 GetCollectionDefaultAttributes(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetCollectionDefaultAttributes( Collection c, SInt32 whichAttributes, SInt32 newAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 CountCollectionItems(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr AddCollectionItem( Collection c, CollectionTag tag, SInt32 id, SInt32 itemSize, const void * itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetCollectionItem( Collection c, CollectionTag tag, SInt32 id, SInt32 * itemSize, void * itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr RemoveCollectionItem( Collection c, CollectionTag tag, SInt32 id) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr SetCollectionItemInfo( Collection c, CollectionTag tag, SInt32 id, SInt32 whichAttributes, SInt32 newAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetCollectionItemInfo( Collection c, CollectionTag tag, SInt32 id, SInt32 * itemIndex, SInt32 * itemSize, SInt32 * attributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr ReplaceIndexedCollectionItem( Collection c, SInt32 itemIndex, SInt32 itemSize, const void * itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetIndexedCollectionItem( Collection c, SInt32 itemIndex, SInt32 * itemSize, void * itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr RemoveIndexedCollectionItem( Collection c, SInt32 itemIndex) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr SetIndexedCollectionItemInfo( Collection c, SInt32 itemIndex, SInt32 whichAttributes, SInt32 newAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetIndexedCollectionItemInfo( Collection c, SInt32 itemIndex, CollectionTag * tag, SInt32 * id, SInt32 * itemSize, SInt32 * attributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean CollectionTagExists( Collection c, CollectionTag tag) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 CountCollectionTags(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetIndexedCollectionTag( Collection c, SInt32 tagIndex, CollectionTag * tag) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 CountTaggedCollectionItems( Collection c, CollectionTag tag) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetTaggedCollectionItem( Collection c, CollectionTag tag, SInt32 whichItem, SInt32 * itemSize, void * itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetTaggedCollectionItemInfo( Collection c, CollectionTag tag, SInt32 whichItem, SInt32 * id, SInt32 * itemIndex, SInt32 * itemSize, SInt32 * attributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PurgeCollection( Collection c, SInt32 whichAttributes, SInt32 matchingAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PurgeCollectionTag( Collection c, CollectionTag tag) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void EmptyCollection(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FlattenCollection( Collection c, CollectionFlattenUPP flattenProc, void * refCon) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FlattenPartialCollection( Collection c, CollectionFlattenUPP flattenProc, void * refCon, SInt32 whichAttributes, SInt32 matchingAttributes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr UnflattenCollection( Collection c, CollectionFlattenUPP flattenProc, void * refCon) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern CollectionExceptionUPP GetCollectionExceptionProc(Collection c) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetCollectionExceptionProc( Collection c, CollectionExceptionUPP exceptionProc) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Collection GetNewCollection(SInt16 collectionID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr AddCollectionItemHdl( Collection aCollection, CollectionTag tag, SInt32 id, Handle itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetCollectionItemHdl( Collection aCollection, CollectionTag tag, SInt32 id, Handle itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr ReplaceIndexedCollectionItemHdl( Collection aCollection, SInt32 itemIndex, Handle itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetIndexedCollectionItemHdl( Collection aCollection, SInt32 itemIndex, Handle itemData) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FlattenCollectionToHdl( Collection aCollection, Handle flattened) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr UnflattenCollectionFromHdl( Collection aCollection, Handle flattened) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); } extern "C" { #pragma pack(push, 2) struct BigEndianUInt32 { UInt32 bigEndianValue; }; typedef struct BigEndianUInt32 BigEndianUInt32; struct BigEndianLong { long bigEndianValue; }; typedef struct BigEndianLong BigEndianLong; struct BigEndianUnsignedLong { unsigned long bigEndianValue; }; typedef struct BigEndianUnsignedLong BigEndianUnsignedLong; struct BigEndianShort { short bigEndianValue; }; typedef struct BigEndianShort BigEndianShort; struct BigEndianUnsignedShort { unsigned short bigEndianValue; }; typedef struct BigEndianUnsignedShort BigEndianUnsignedShort; struct BigEndianFixed { Fixed bigEndianValue; }; typedef struct BigEndianFixed BigEndianFixed; struct BigEndianUnsignedFixed { UnsignedFixed bigEndianValue; }; typedef struct BigEndianUnsignedFixed BigEndianUnsignedFixed; struct BigEndianOSType { OSType bigEndianValue; }; typedef struct BigEndianOSType BigEndianOSType; enum { kCoreEndianResourceManagerDomain = 'rsrc', kCoreEndianAppleEventManagerDomain = 'aevt' }; typedef OSStatus ( * CoreEndianFlipProc)(OSType dataDomain, OSType dataType, SInt16 id, void *dataPtr, ByteCount dataSize, Boolean currentlyNative, void *refcon); extern OSStatus CoreEndianInstallFlipper( OSType dataDomain, OSType dataType, CoreEndianFlipProc proc, void * refcon) __attribute__((availability(macosx,introduced=10.3,deprecated=10.8))); extern OSStatus CoreEndianGetFlipper( OSType dataDomain, OSType dataType, CoreEndianFlipProc * proc, void ** refcon) __attribute__((availability(macosx,introduced=10.3,deprecated=10.8))); extern OSStatus CoreEndianFlipData( OSType dataDomain, OSType dataType, SInt16 id, void * data, ByteCount dataLen, Boolean currentlyNative) __attribute__((availability(macosx,introduced=10.3,deprecated=10.8))); #pragma pack(pop) } extern "C" { typedef OSErr ( * SelectorFunctionProcPtr)(OSType selector, SInt32 *response); typedef SelectorFunctionProcPtr SelectorFunctionUPP; extern OSErr Gestalt( OSType selector, SInt32 * response) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr NewGestaltValue( OSType selector, SInt32 newValue) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr ReplaceGestaltValue( OSType selector, SInt32 replacementValue) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr SetGestaltValue( OSType selector, SInt32 newValue) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr DeleteGestaltValue(OSType selector) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SelectorFunctionUPP NewSelectorFunctionUPP(SelectorFunctionProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeSelectorFunctionUPP(SelectorFunctionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr InvokeSelectorFunctionUPP( OSType selector, SInt32 * response, SelectorFunctionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline SelectorFunctionUPP NewSelectorFunctionUPP(SelectorFunctionProcPtr userRoutine) { return userRoutine; } inline void DisposeSelectorFunctionUPP(SelectorFunctionUPP) { } inline OSErr InvokeSelectorFunctionUPP(OSType selector, SInt32 * response, SelectorFunctionUPP userUPP) { return (*userUPP)(selector, response); } enum { gestaltAddressingModeAttr = 'addr', gestalt32BitAddressing = 0, gestalt32BitSysZone = 1, gestalt32BitCapable = 2 }; enum { gestaltAFPClient = 'afps', gestaltAFPClientVersionMask = 0x0000FFFF, gestaltAFPClient3_5 = 0x0001, gestaltAFPClient3_6 = 0x0002, gestaltAFPClient3_6_1 = 0x0003, gestaltAFPClient3_6_2 = 0x0004, gestaltAFPClient3_6_3 = 0x0005, gestaltAFPClient3_7 = 0x0006, gestaltAFPClient3_7_2 = 0x0007, gestaltAFPClient3_8 = 0x0008, gestaltAFPClient3_8_1 = 0x0009, gestaltAFPClient3_8_3 = 0x000A, gestaltAFPClient3_8_4 = 0x000B, gestaltAFPClientAttributeMask = (int)0xFFFF0000, gestaltAFPClientCfgRsrc = 16, gestaltAFPClientSupportsIP = 29, gestaltAFPClientVMUI = 30, gestaltAFPClientMultiReq = 31 }; enum { gestaltAliasMgrAttr = 'alis', gestaltAliasMgrPresent = 0, gestaltAliasMgrSupportsRemoteAppletalk = 1, gestaltAliasMgrSupportsAOCEKeychain = 2, gestaltAliasMgrResolveAliasFileWithMountOptions = 3, gestaltAliasMgrFollowsAliasesWhenResolving = 4, gestaltAliasMgrSupportsExtendedCalls = 5, gestaltAliasMgrSupportsFSCalls = 6, gestaltAliasMgrPrefersPath = 7, gestaltAliasMgrRequiresAccessors = 8 }; enum { gestaltAppearanceAttr = 'appr', gestaltAppearanceExists = 0, gestaltAppearanceCompatMode = 1 }; enum { gestaltAppearanceVersion = 'apvr' }; enum { gestaltArbitorAttr = 'arb ', gestaltSerialArbitrationExists = 0 }; enum { gestaltAppleScriptVersion = 'ascv' }; enum { gestaltAppleScriptAttr = 'ascr', gestaltAppleScriptPresent = 0, gestaltAppleScriptPowerPCSupport = 1 }; enum { gestaltATAAttr = 'ata ', gestaltATAPresent = 0 }; enum { gestaltATalkVersion = 'atkv' }; enum { gestaltAppleTalkVersion = 'atlk' }; enum { gestaltAUXVersion = 'a/ux' }; enum { gestaltMacOSCompatibilityBoxAttr = 'bbox', gestaltMacOSCompatibilityBoxPresent = 0, gestaltMacOSCompatibilityBoxHasSerial = 1, gestaltMacOSCompatibilityBoxless = 2 }; enum { gestaltBusClkSpeed = 'bclk' }; enum { gestaltBusClkSpeedMHz = 'bclm' }; enum { gestaltCloseViewAttr = 'BSDa', gestaltCloseViewEnabled = 0, gestaltCloseViewDisplayMgrFriendly = 1 }; enum { gestaltCarbonVersion = 'cbon' }; enum { gestaltCFMAttr = 'cfrg', gestaltCFMPresent = 0, gestaltCFMPresentMask = 0x0001, gestaltCFM99Present = 2, gestaltCFM99PresentMask = 0x0004 }; enum { gestaltProcessorCacheLineSize = 'csiz' }; enum { gestaltCollectionMgrVersion = 'cltn' }; enum { gestaltColorMatchingAttr = 'cmta', gestaltHighLevelMatching = 0, gestaltColorMatchingLibLoaded = 1 }; enum { gestaltColorMatchingVersion = 'cmtc', gestaltColorSync10 = 0x0100, gestaltColorSync11 = 0x0110, gestaltColorSync104 = 0x0104, gestaltColorSync105 = 0x0105, gestaltColorSync20 = 0x0200, gestaltColorSync21 = 0x0210, gestaltColorSync211 = 0x0211, gestaltColorSync212 = 0x0212, gestaltColorSync213 = 0x0213, gestaltColorSync25 = 0x0250, gestaltColorSync26 = 0x0260, gestaltColorSync261 = 0x0261, gestaltColorSync30 = 0x0300 }; enum { gestaltControlMgrVersion = 'cmvr' }; enum { gestaltControlMgrAttr = 'cntl', gestaltControlMgrPresent = (1L << 0), gestaltControlMgrPresentBit = 0, gestaltControlMsgPresentMask = (1L << gestaltControlMgrPresentBit) }; enum { gestaltConnMgrAttr = 'conn', gestaltConnMgrPresent = 0, gestaltConnMgrCMSearchFix = 1, gestaltConnMgrErrorString = 2, gestaltConnMgrMultiAsyncIO = 3 }; enum { gestaltColorPickerVersion = 'cpkr', gestaltColorPicker = 'cpkr' }; enum { gestaltComponentMgr = 'cpnt', gestaltComponentPlatform = 'copl' }; enum { gestaltNativeCPUtype = 'cput', gestaltNativeCPUfamily = 'cpuf', gestaltCPU68000 = 0, gestaltCPU68010 = 1, gestaltCPU68020 = 2, gestaltCPU68030 = 3, gestaltCPU68040 = 4, gestaltCPU601 = 0x0101, gestaltCPU603 = 0x0103, gestaltCPU604 = 0x0104, gestaltCPU603e = 0x0106, gestaltCPU603ev = 0x0107, gestaltCPU750 = 0x0108, gestaltCPU604e = 0x0109, gestaltCPU604ev = 0x010A, gestaltCPUG4 = 0x010C, gestaltCPUG47450 = 0x0110 }; enum { gestaltCPUApollo = 0x0111, gestaltCPUG47447 = 0x0112, gestaltCPU750FX = 0x0120, gestaltCPU970 = 0x0139, gestaltCPU970FX = 0x013C, gestaltCPU970MP = 0x0144 }; enum { gestaltCPU486 = 'i486', gestaltCPUPentium = 'i586', gestaltCPUPentiumPro = 'i5pr', gestaltCPUPentiumII = 'i5ii', gestaltCPUX86 = 'ixxx', gestaltCPUPentium4 = 'i5iv', }; enum { gestaltCPUARMFamily = 'arm ', gestaltCPUARM64 = 'ax64' }; enum { gestaltCRMAttr = 'crm ', gestaltCRMPresent = 0, gestaltCRMPersistentFix = 1, gestaltCRMToolRsrcCalls = 2 }; enum { gestaltControlStripVersion = 'csvr' }; enum { gestaltCountOfCPUs = 'cpus' }; enum { gestaltCTBVersion = 'ctbv' }; enum { gestaltDBAccessMgrAttr = 'dbac', gestaltDBAccessMgrPresent = 0 }; enum { gestaltDiskCacheSize = 'dcsz' }; enum { gestaltSDPFindVersion = 'dfnd' }; enum { gestaltDictionaryMgrAttr = 'dict', gestaltDictionaryMgrPresent = 0 }; enum { gestaltDITLExtAttr = 'ditl', gestaltDITLExtPresent = 0, gestaltDITLExtSupportsIctb = 1 }; enum { gestaltDialogMgrAttr = 'dlog', gestaltDialogMgrPresent = (1L << 0), gestaltDialogMgrPresentBit = 0, gestaltDialogMgrHasAquaAlertBit = 2, gestaltDialogMgrPresentMask = (1L << gestaltDialogMgrPresentBit), gestaltDialogMgrHasAquaAlertMask = (1L << gestaltDialogMgrHasAquaAlertBit), gestaltDialogMsgPresentMask = gestaltDialogMgrPresentMask }; enum { gestaltDesktopPicturesAttr = 'dkpx', gestaltDesktopPicturesInstalled = 0, gestaltDesktopPicturesDisplayed = 1 }; enum { gestaltDisplayMgrVers = 'dplv' }; enum { gestaltDisplayMgrAttr = 'dply', gestaltDisplayMgrPresent = 0, gestaltDisplayMgrCanSwitchMirrored = 2, gestaltDisplayMgrSetDepthNotifies = 3, gestaltDisplayMgrCanConfirm = 4, gestaltDisplayMgrColorSyncAware = 5, gestaltDisplayMgrGeneratesProfiles = 6, gestaltDisplayMgrSleepNotifies = 7 }; enum { gestaltDragMgrAttr = 'drag', gestaltDragMgrPresent = 0, gestaltDragMgrFloatingWind = 1, gestaltPPCDragLibPresent = 2, gestaltDragMgrHasImageSupport = 3, gestaltCanStartDragInFloatWindow = 4, gestaltSetDragImageUpdates = 5 }; enum { gestaltDrawSprocketVersion = 'dspv' }; enum { gestaltDigitalSignatureVersion = 'dsig' }; enum { gestaltDTPFeatures = 'dtpf', kDTPThirdPartySupported = 0x00000004 }; enum { gestaltDTPInfo = 'dtpx' }; enum { gestaltEasyAccessAttr = 'easy', gestaltEasyAccessOff = 0, gestaltEasyAccessOn = 1, gestaltEasyAccessSticky = 2, gestaltEasyAccessLocked = 3 }; enum { gestaltEditionMgrAttr = 'edtn', gestaltEditionMgrPresent = 0, gestaltEditionMgrTranslationAware = 1 }; enum { gestaltAppleEventsAttr = 'evnt', gestaltAppleEventsPresent = 0, gestaltScriptingSupport = 1, gestaltOSLInSystem = 2, gestaltSupportsApplicationURL = 4 }; enum { gestaltExtensionTableVersion = 'etbl' }; enum { gestaltFBCIndexingState = 'fbci', gestaltFBCindexingSafe = 0, gestaltFBCindexingCritical = 1 }; enum { gestaltFBCVersion = 'fbcv', gestaltFBCCurrentVersion = 0x0011, gestaltOSXFBCCurrentVersion = 0x0100 }; enum { gestaltFileMappingAttr = 'flmp', gestaltFileMappingPresent = 0, gestaltFileMappingMultipleFilesFix = 1 }; enum { gestaltFloppyAttr = 'flpy', gestaltFloppyIsMFMOnly = 0, gestaltFloppyIsManualEject = 1, gestaltFloppyUsesDiskInPlace = 2 }; enum { gestaltFinderAttr = 'fndr', gestaltFinderDropEvent = 0, gestaltFinderMagicPlacement = 1, gestaltFinderCallsAEProcess = 2, gestaltOSLCompliantFinder = 3, gestaltFinderSupports4GBVolumes = 4, gestaltFinderHasClippings = 6, gestaltFinderFullDragManagerSupport = 7, gestaltFinderFloppyRootComments = 8, gestaltFinderLargeAndNotSavedFlavorsOK = 9, gestaltFinderUsesExtensibleFolderManager = 10, gestaltFinderUnderstandsRedirectedDesktopFolder = 11 }; enum { gestaltFindFolderAttr = 'fold', gestaltFindFolderPresent = 0, gestaltFolderDescSupport = 1, gestaltFolderMgrFollowsAliasesWhenResolving = 2, gestaltFolderMgrSupportsExtendedCalls = 3, gestaltFolderMgrSupportsDomains = 4, gestaltFolderMgrSupportsFSCalls = 5 }; enum { gestaltFindFolderRedirectionAttr = 'fole' }; enum { gestaltFontMgrAttr = 'font', gestaltOutlineFonts = 0 }; enum { gestaltFPUType = 'fpu ', gestaltNoFPU = 0, gestalt68881 = 1, gestalt68882 = 2, gestalt68040FPU = 3 }; enum { gestaltFSAttr = 'fs ', gestaltFullExtFSDispatching = 0, gestaltHasFSSpecCalls = 1, gestaltHasFileSystemManager = 2, gestaltFSMDoesDynamicLoad = 3, gestaltFSSupports4GBVols = 4, gestaltFSSupports2TBVols = 5, gestaltHasExtendedDiskInit = 6, gestaltDTMgrSupportsFSM = 7, gestaltFSNoMFSVols = 8, gestaltFSSupportsHFSPlusVols = 9, gestaltFSIncompatibleDFA82 = 10 }; enum { gestaltFSSupportsDirectIO = 11 }; enum { gestaltHasHFSPlusAPIs = 12, gestaltMustUseFCBAccessors = 13, gestaltFSUsesPOSIXPathsForConversion = 14, gestaltFSSupportsExclusiveLocks = 15, gestaltFSSupportsHardLinkDetection = 16, gestaltFSAllowsConcurrentAsyncIO = 17 }; enum { gestaltAdminFeaturesFlagsAttr = 'fred', gestaltFinderUsesSpecialOpenFoldersFile = 0 }; enum { gestaltFSMVersion = 'fsm ' }; enum { gestaltFXfrMgrAttr = 'fxfr', gestaltFXfrMgrPresent = 0, gestaltFXfrMgrMultiFile = 1, gestaltFXfrMgrErrorString = 2, gestaltFXfrMgrAsync = 3 }; enum { gestaltGraphicsAttr = 'gfxa', gestaltGraphicsIsDebugging = 0x00000001, gestaltGraphicsIsLoaded = 0x00000002, gestaltGraphicsIsPowerPC = 0x00000004 }; enum { gestaltGraphicsVersion = 'grfx', gestaltCurrentGraphicsVersion = 0x00010200 }; enum { gestaltHardwareAttr = 'hdwr', gestaltHasVIA1 = 0, gestaltHasVIA2 = 1, gestaltHasASC = 3, gestaltHasSCC = 4, gestaltHasSCSI = 7, gestaltHasSoftPowerOff = 19, gestaltHasSCSI961 = 21, gestaltHasSCSI962 = 22, gestaltHasUniversalROM = 24, gestaltHasEnhancedLtalk = 30 }; enum { gestaltHelpMgrAttr = 'help', gestaltHelpMgrPresent = 0, gestaltHelpMgrExtensions = 1, gestaltAppleGuideIsDebug = 30, gestaltAppleGuidePresent = 31 }; enum { gestaltHardwareVendorCode = 'hrad', gestaltHardwareVendorApple = 'Appl' }; enum { gestaltCompressionMgr = 'icmp' }; enum { gestaltIconUtilitiesAttr = 'icon', gestaltIconUtilitiesPresent = 0, gestaltIconUtilitiesHas48PixelIcons = 1, gestaltIconUtilitiesHas32BitIcons = 2, gestaltIconUtilitiesHas8BitDeepMasks = 3, gestaltIconUtilitiesHasIconServices = 4 }; enum { gestaltInternalDisplay = 'idsp' }; enum { gestaltKeyboardType = 'kbd ', gestaltMacKbd = 1, gestaltMacAndPad = 2, gestaltMacPlusKbd = 3, gestaltUnknownThirdPartyKbd = 3, gestaltExtADBKbd = 4, gestaltStdADBKbd = 5, gestaltPrtblADBKbd = 6, gestaltPrtblISOKbd = 7, gestaltStdISOADBKbd = 8, gestaltExtISOADBKbd = 9, gestaltADBKbdII = 10, gestaltADBISOKbdII = 11, gestaltPwrBookADBKbd = 12, gestaltPwrBookISOADBKbd = 13, gestaltAppleAdjustKeypad = 14, gestaltAppleAdjustADBKbd = 15, gestaltAppleAdjustISOKbd = 16, gestaltJapanAdjustADBKbd = 17, gestaltPwrBkExtISOKbd = 20, gestaltPwrBkExtJISKbd = 21, gestaltPwrBkExtADBKbd = 24, gestaltPS2Keyboard = 27, gestaltPwrBkSubDomKbd = 28, gestaltPwrBkSubISOKbd = 29, gestaltPwrBkSubJISKbd = 30, gestaltPortableUSBANSIKbd = 37, gestaltPortableUSBISOKbd = 38, gestaltPortableUSBJISKbd = 39, gestaltThirdPartyANSIKbd = 40, gestaltThirdPartyISOKbd = 41, gestaltThirdPartyJISKbd = 42, gestaltPwrBkEKDomKbd = 195, gestaltPwrBkEKISOKbd = 196, gestaltPwrBkEKJISKbd = 197, gestaltUSBCosmoANSIKbd = 198, gestaltUSBCosmoISOKbd = 199, gestaltUSBCosmoJISKbd = 200, gestaltPwrBk99JISKbd = 201, gestaltUSBAndyANSIKbd = 204, gestaltUSBAndyISOKbd = 205, gestaltUSBAndyJISKbd = 206 }; enum { gestaltPortable2001ANSIKbd = 202, gestaltPortable2001ISOKbd = 203, gestaltPortable2001JISKbd = 207 }; enum { gestaltUSBProF16ANSIKbd = 34, gestaltUSBProF16ISOKbd = 35, gestaltUSBProF16JISKbd = 36, gestaltProF16ANSIKbd = 31, gestaltProF16ISOKbd = 32, gestaltProF16JISKbd = 33 }; enum { gestaltUDFSupport = 'kudf' }; enum { gestaltLowMemorySize = 'lmem' }; enum { gestaltLogicalRAMSize = 'lram' }; enum { gestaltMachineType = 'mach', gestaltClassic = 1, gestaltMacXL = 2, gestaltMac512KE = 3, gestaltMacPlus = 4, gestaltMacSE = 5, gestaltMacII = 6, gestaltMacIIx = 7, gestaltMacIIcx = 8, gestaltMacSE030 = 9, gestaltPortable = 10, gestaltMacIIci = 11, gestaltPowerMac8100_120 = 12, gestaltMacIIfx = 13, gestaltMacClassic = 17, gestaltMacIIsi = 18, gestaltMacLC = 19, gestaltMacQuadra900 = 20, gestaltPowerBook170 = 21, gestaltMacQuadra700 = 22, gestaltClassicII = 23, gestaltPowerBook100 = 24, gestaltPowerBook140 = 25, gestaltMacQuadra950 = 26, gestaltMacLCIII = 27, gestaltPerforma450 = gestaltMacLCIII, gestaltPowerBookDuo210 = 29, gestaltMacCentris650 = 30, gestaltPowerBookDuo230 = 32, gestaltPowerBook180 = 33, gestaltPowerBook160 = 34, gestaltMacQuadra800 = 35, gestaltMacQuadra650 = 36, gestaltMacLCII = 37, gestaltPowerBookDuo250 = 38, gestaltAWS9150_80 = 39, gestaltPowerMac8100_110 = 40, gestaltAWS8150_110 = gestaltPowerMac8100_110, gestaltPowerMac5200 = 41, gestaltPowerMac5260 = gestaltPowerMac5200, gestaltPerforma5300 = gestaltPowerMac5200, gestaltPowerMac6200 = 42, gestaltPerforma6300 = gestaltPowerMac6200, gestaltMacIIvi = 44, gestaltMacIIvm = 45, gestaltPerforma600 = gestaltMacIIvm, gestaltPowerMac7100_80 = 47, gestaltMacIIvx = 48, gestaltMacColorClassic = 49, gestaltPerforma250 = gestaltMacColorClassic, gestaltPowerBook165c = 50, gestaltMacCentris610 = 52, gestaltMacQuadra610 = 53, gestaltPowerBook145 = 54, gestaltPowerMac8100_100 = 55, gestaltMacLC520 = 56, gestaltAWS9150_120 = 57, gestaltPowerMac6400 = 58, gestaltPerforma6400 = gestaltPowerMac6400, gestaltPerforma6360 = gestaltPerforma6400, gestaltMacCentris660AV = 60, gestaltMacQuadra660AV = gestaltMacCentris660AV, gestaltPerforma46x = 62, gestaltPowerMac8100_80 = 65, gestaltAWS8150_80 = gestaltPowerMac8100_80, gestaltPowerMac9500 = 67, gestaltPowerMac9600 = gestaltPowerMac9500, gestaltPowerMac7500 = 68, gestaltPowerMac7600 = gestaltPowerMac7500, gestaltPowerMac8500 = 69, gestaltPowerMac8600 = gestaltPowerMac8500, gestaltAWS8550 = gestaltPowerMac7500, gestaltPowerBook180c = 71, gestaltPowerBook520 = 72, gestaltPowerBook520c = gestaltPowerBook520, gestaltPowerBook540 = gestaltPowerBook520, gestaltPowerBook540c = gestaltPowerBook520, gestaltPowerMac5400 = 74, gestaltPowerMac6100_60 = 75, gestaltAWS6150_60 = gestaltPowerMac6100_60, gestaltPowerBookDuo270c = 77, gestaltMacQuadra840AV = 78, gestaltPerforma550 = 80, gestaltPowerBook165 = 84, gestaltPowerBook190 = 85, gestaltMacTV = 88, gestaltMacLC475 = 89, gestaltPerforma47x = gestaltMacLC475, gestaltMacLC575 = 92, gestaltMacQuadra605 = 94, gestaltMacQuadra630 = 98, gestaltMacLC580 = 99, gestaltPerforma580 = gestaltMacLC580, gestaltPowerMac6100_66 = 100, gestaltAWS6150_66 = gestaltPowerMac6100_66, gestaltPowerBookDuo280 = 102, gestaltPowerBookDuo280c = 103, gestaltPowerMacLC475 = 104, gestaltPowerMacPerforma47x = gestaltPowerMacLC475, gestaltPowerMacLC575 = 105, gestaltPowerMacPerforma57x = gestaltPowerMacLC575, gestaltPowerMacQuadra630 = 106, gestaltPowerMacLC630 = gestaltPowerMacQuadra630, gestaltPowerMacPerforma63x = gestaltPowerMacQuadra630, gestaltPowerMac7200 = 108, gestaltPowerMac7300 = 109, gestaltPowerMac7100_66 = 112, gestaltPowerBook150 = 115, gestaltPowerMacQuadra700 = 116, gestaltPowerMacQuadra900 = 117, gestaltPowerMacQuadra950 = 118, gestaltPowerMacCentris610 = 119, gestaltPowerMacCentris650 = 120, gestaltPowerMacQuadra610 = 121, gestaltPowerMacQuadra650 = 122, gestaltPowerMacQuadra800 = 123, gestaltPowerBookDuo2300 = 124, gestaltPowerBook500PPCUpgrade = 126, gestaltPowerBook5300 = 128, gestaltPowerBook1400 = 310, gestaltPowerBook3400 = 306, gestaltPowerBook2400 = 307, gestaltPowerBookG3Series = 312, gestaltPowerBookG3 = 313, gestaltPowerBookG3Series2 = 314, gestaltPowerMacNewWorld = 406, gestaltPowerMacG3 = 510, gestaltPowerMac5500 = 512, gestalt20thAnniversary = gestaltPowerMac5500, gestaltPowerMac6500 = 513, gestaltPowerMac4400_160 = 514, gestaltPowerMac4400 = 515, gestaltMacOSCompatibility = 1206 }; enum { gestaltQuadra605 = gestaltMacQuadra605, gestaltQuadra610 = gestaltMacQuadra610, gestaltQuadra630 = gestaltMacQuadra630, gestaltQuadra650 = gestaltMacQuadra650, gestaltQuadra660AV = gestaltMacQuadra660AV, gestaltQuadra700 = gestaltMacQuadra700, gestaltQuadra800 = gestaltMacQuadra800, gestaltQuadra840AV = gestaltMacQuadra840AV, gestaltQuadra900 = gestaltMacQuadra900, gestaltQuadra950 = gestaltMacQuadra950 }; enum { kMachineNameStrID = -16395 }; enum { gestaltSMPMailerVersion = 'malr' }; enum { gestaltMediaBay = 'mbeh', gestaltMBLegacy = 0, gestaltMBSingleBay = 1, gestaltMBMultipleBays = 2 }; enum { gestaltMessageMgrVersion = 'mess' }; enum { gestaltMenuMgrAttr = 'menu', gestaltMenuMgrPresent = (1L << 0), gestaltMenuMgrPresentBit = 0, gestaltMenuMgrAquaLayoutBit = 1, gestaltMenuMgrMultipleItemsWithCommandIDBit = 2, gestaltMenuMgrRetainsIconRefBit = 3, gestaltMenuMgrSendsMenuBoundsToDefProcBit = 4, gestaltMenuMgrMoreThanFiveMenusDeepBit = 5, gestaltMenuMgrCGImageMenuTitleBit = 6, gestaltMenuMgrPresentMask = (1L << gestaltMenuMgrPresentBit), gestaltMenuMgrAquaLayoutMask = (1L << gestaltMenuMgrAquaLayoutBit), gestaltMenuMgrMultipleItemsWithCommandIDMask = (1L << gestaltMenuMgrMultipleItemsWithCommandIDBit), gestaltMenuMgrRetainsIconRefMask = (1L << gestaltMenuMgrRetainsIconRefBit), gestaltMenuMgrSendsMenuBoundsToDefProcMask = (1L << gestaltMenuMgrSendsMenuBoundsToDefProcBit), gestaltMenuMgrMoreThanFiveMenusDeepMask = (1L << gestaltMenuMgrMoreThanFiveMenusDeepBit), gestaltMenuMgrCGImageMenuTitleMask = (1L << gestaltMenuMgrCGImageMenuTitleBit) }; enum { gestaltMultipleUsersState = 'mfdr' }; enum { gestaltMachineIcon = 'micn' }; enum { gestaltMiscAttr = 'misc', gestaltScrollingThrottle = 0, gestaltSquareMenuBar = 2 }; enum { gestaltMixedModeVersion = 'mixd' }; enum { gestaltMixedModeAttr = 'mixd', gestaltMixedModePowerPC = 0, gestaltPowerPCAware = 0, gestaltMixedModeCFM68K = 1, gestaltMixedModeCFM68KHasTrap = 2, gestaltMixedModeCFM68KHasState = 3 }; enum { gestaltQuickTimeConferencing = 'mtlk' }; enum { gestaltMemoryMapAttr = 'mmap', gestaltMemoryMapSparse = 0 }; enum { gestaltMMUType = 'mmu ', gestaltNoMMU = 0, gestaltAMU = 1, gestalt68851 = 2, gestalt68030MMU = 3, gestalt68040MMU = 4, gestaltEMMU1 = 5 }; enum { gestaltUserVisibleMachineName = 'mnam' }; enum { gestaltMPCallableAPIsAttr = 'mpsc', gestaltMPFileManager = 0, gestaltMPDeviceManager = 1, gestaltMPTrapCalls = 2 }; enum { gestaltStdNBPAttr = 'nlup', gestaltStdNBPPresent = 0, gestaltStdNBPSupportsAutoPosition = 1 }; enum { gestaltNotificationMgrAttr = 'nmgr', gestaltNotificationPresent = 0 }; enum { gestaltNameRegistryVersion = 'nreg' }; enum { gestaltNuBusSlotCount = 'nubs' }; enum { gestaltOCEToolboxVersion = 'ocet', gestaltOCETB = 0x0102, gestaltSFServer = 0x0100 }; enum { gestaltOCEToolboxAttr = 'oceu', gestaltOCETBPresent = 0x01, gestaltOCETBAvailable = 0x02, gestaltOCESFServerAvailable = 0x04, gestaltOCETBNativeGlueAvailable = 0x10 }; enum { gestaltOpenFirmwareInfo = 'opfw' }; enum { gestaltOSAttr = 'os ', gestaltSysZoneGrowable = 0, gestaltLaunchCanReturn = 1, gestaltLaunchFullFileSpec = 2, gestaltLaunchControl = 3, gestaltTempMemSupport = 4, gestaltRealTempMemory = 5, gestaltTempMemTracked = 6, gestaltIPCSupport = 7, gestaltSysDebuggerSupport = 8, gestaltNativeProcessMgrBit = 19, gestaltAltivecRegistersSwappedCorrectlyBit = 20 }; enum { gestaltOSTable = 'ostt' }; enum { gestaltOpenTptNetworkSetup = 'otcf', gestaltOpenTptNetworkSetupLegacyImport = 0, gestaltOpenTptNetworkSetupLegacyExport = 1, gestaltOpenTptNetworkSetupSupportsMultihoming = 2 }; enum { gestaltOpenTptNetworkSetupVersion = 'otcv' }; enum { gestaltOpenTptRemoteAccess = 'otra', gestaltOpenTptRemoteAccessPresent = 0, gestaltOpenTptRemoteAccessLoaded = 1, gestaltOpenTptRemoteAccessClientOnly = 2, gestaltOpenTptRemoteAccessPServer = 3, gestaltOpenTptRemoteAccessMPServer = 4, gestaltOpenTptPPPPresent = 5, gestaltOpenTptARAPPresent = 6 }; enum { gestaltOpenTptRemoteAccessVersion = 'otrv' }; enum { gestaltOpenTptVersions = 'otvr' }; enum { gestaltOpenTpt = 'otan', gestaltOpenTptPresentMask = 0x00000001, gestaltOpenTptLoadedMask = 0x00000002, gestaltOpenTptAppleTalkPresentMask = 0x00000004, gestaltOpenTptAppleTalkLoadedMask = 0x00000008, gestaltOpenTptTCPPresentMask = 0x00000010, gestaltOpenTptTCPLoadedMask = 0x00000020, gestaltOpenTptIPXSPXPresentMask = 0x00000040, gestaltOpenTptIPXSPXLoadedMask = 0x00000080, gestaltOpenTptPresentBit = 0, gestaltOpenTptLoadedBit = 1, gestaltOpenTptAppleTalkPresentBit = 2, gestaltOpenTptAppleTalkLoadedBit = 3, gestaltOpenTptTCPPresentBit = 4, gestaltOpenTptTCPLoadedBit = 5, gestaltOpenTptIPXSPXPresentBit = 6, gestaltOpenTptIPXSPXLoadedBit = 7 }; enum { gestaltPCCard = 'pccd', gestaltCardServicesPresent = 0, gestaltPCCardFamilyPresent = 1, gestaltPCCardHasPowerControl = 2, gestaltPCCardSupportsCardBus = 3 }; enum { gestaltProcClkSpeed = 'pclk' }; enum { gestaltProcClkSpeedMHz = 'mclk' }; enum { gestaltPCXAttr = 'pcxg', gestaltPCXHas8and16BitFAT = 0, gestaltPCXHasProDOS = 1, gestaltPCXNewUI = 2, gestaltPCXUseICMapping = 3 }; enum { gestaltLogicalPageSize = 'pgsz' }; enum { gestaltScreenCaptureMain = 'pic1', gestaltScreenCaptureDir = 'pic2' }; enum { gestaltGXPrintingMgrVersion = 'pmgr' }; enum { gestaltPopupAttr = 'pop!', gestaltPopupPresent = 0 }; enum { gestaltPowerMgrAttr = 'powr', gestaltPMgrExists = 0, gestaltPMgrCPUIdle = 1, gestaltPMgrSCC = 2, gestaltPMgrSound = 3, gestaltPMgrDispatchExists = 4, gestaltPMgrSupportsAVPowerStateAtSleepWake = 5 }; enum { gestaltPowerMgrVers = 'pwrv' }; enum { gestaltPPCToolboxAttr = 'ppc ', gestaltPPCToolboxPresent = 0x0000, gestaltPPCSupportsRealTime = 0x1000, gestaltPPCSupportsIncoming = 0x0001, gestaltPPCSupportsOutGoing = 0x0002, gestaltPPCSupportsTCP_IP = 0x0004, gestaltPPCSupportsIncomingAppleTalk = 0x0010, gestaltPPCSupportsIncomingTCP_IP = 0x0020, gestaltPPCSupportsOutgoingAppleTalk = 0x0100, gestaltPPCSupportsOutgoingTCP_IP = 0x0200 }; enum { gestaltPowerPCProcessorFeatures = 'ppcf', gestaltPowerPCHasGraphicsInstructions = 0, gestaltPowerPCHasSTFIWXInstruction = 1, gestaltPowerPCHasSquareRootInstructions = 2, gestaltPowerPCHasDCBAInstruction = 3, gestaltPowerPCHasVectorInstructions = 4, gestaltPowerPCHasDataStreams = 5, gestaltPowerPCHas64BitSupport = 6, gestaltPowerPCHasDCBTStreams = 7, gestaltPowerPCASArchitecture = 8, gestaltPowerPCIgnoresDCBST = 9 }; enum { gestaltProcessorType = 'proc', gestalt68000 = 1, gestalt68010 = 2, gestalt68020 = 3, gestalt68030 = 4, gestalt68040 = 5 }; enum { gestaltSDPPromptVersion = 'prpv' }; enum { gestaltParityAttr = 'prty', gestaltHasParityCapability = 0, gestaltParityEnabled = 1 }; enum { gestaltQD3DVersion = 'q3v ' }; enum { gestaltQD3DViewer = 'q3vc', gestaltQD3DViewerPresent = 0 }; enum { gestaltQuickdrawVersion = 'qd ', gestaltOriginalQD = 0x0000, gestalt8BitQD = 0x0100, gestalt32BitQD = 0x0200, gestalt32BitQD11 = 0x0201, gestalt32BitQD12 = 0x0220, gestalt32BitQD13 = 0x0230, gestaltAllegroQD = 0x0250, gestaltMacOSXQD = 0x0300 }; enum { gestaltQD3D = 'qd3d', gestaltQD3DPresent = 0 }; enum { gestaltGXVersion = 'qdgx' }; enum { gestaltQuickdrawFeatures = 'qdrw', gestaltHasColor = 0, gestaltHasDeepGWorlds = 1, gestaltHasDirectPixMaps = 2, gestaltHasGrayishTextOr = 3, gestaltSupportsMirroring = 4, gestaltQDHasLongRowBytes = 5 }; enum { gestaltQDTextVersion = 'qdtx', gestaltOriginalQDText = 0x0000, gestaltAllegroQDText = 0x0100, gestaltMacOSXQDText = 0x0200 }; enum { gestaltQDTextFeatures = 'qdtf', gestaltWSIISupport = 0, gestaltSbitFontSupport = 1, gestaltAntiAliasedTextAvailable = 2, gestaltOFA2available = 3, gestaltCreatesAliasFontRsrc = 4, gestaltNativeType1FontSupport = 5, gestaltCanUseCGTextRendering = 6 }; enum { gestaltQuickTimeConferencingInfo = 'qtci' }; enum { gestaltQuickTimeVersion = 'qtim', gestaltQuickTime = 'qtim' }; enum { gestaltQuickTimeFeatures = 'qtrs', gestaltPPCQuickTimeLibPresent = 0 }; enum { gestaltQuickTimeStreamingFeatures = 'qtsf' }; enum { gestaltQuickTimeStreamingVersion = 'qtst' }; enum { gestaltQuickTimeThreadSafeFeaturesAttr = 'qtth', gestaltQuickTimeThreadSafeICM = 0, gestaltQuickTimeThreadSafeMovieToolbox = 1, gestaltQuickTimeThreadSafeMovieImport = 2, gestaltQuickTimeThreadSafeMovieExport = 3, gestaltQuickTimeThreadSafeGraphicsImport = 4, gestaltQuickTimeThreadSafeGraphicsExport = 5, gestaltQuickTimeThreadSafeMoviePlayback = 6 }; enum { gestaltQTVRMgrAttr = 'qtvr', gestaltQTVRMgrPresent = 0, gestaltQTVRObjMoviesPresent = 1, gestaltQTVRCylinderPanosPresent = 2, gestaltQTVRCubicPanosPresent = 3 }; enum { gestaltQTVRMgrVers = 'qtvv' }; enum { gestaltPhysicalRAMSize = 'ram ' }; enum { gestaltPhysicalRAMSizeInMegabytes = 'ramm' }; enum { gestaltRBVAddr = 'rbv ' }; enum { gestaltROMSize = 'rom ' }; enum { gestaltROMVersion = 'romv' }; enum { gestaltResourceMgrAttr = 'rsrc', gestaltPartialRsrcs = 0, gestaltHasResourceOverrides = 1 }; enum { gestaltResourceMgrBugFixesAttrs = 'rmbg', gestaltRMForceSysHeapRolledIn = 0, gestaltRMFakeAppleMenuItemsRolledIn = 1, gestaltSanityCheckResourceFiles = 2, gestaltSupportsFSpResourceFileAlreadyOpenBit = 3, gestaltRMSupportsFSCalls = 4, gestaltRMTypeIndexOrderingReverse = 8 }; enum { gestaltRealtimeMgrAttr = 'rtmr', gestaltRealtimeMgrPresent = 0 }; enum { gestaltSafeOFAttr = 'safe', gestaltVMZerosPagesBit = 0, gestaltInitHeapZerosOutHeapsBit = 1, gestaltNewHandleReturnsZeroedMemoryBit = 2, gestaltNewPtrReturnsZeroedMemoryBit = 3, gestaltFileAllocationZeroedBlocksBit = 4 }; enum { gestaltSCCReadAddr = 'sccr' }; enum { gestaltSCCWriteAddr = 'sccw' }; enum { gestaltScrapMgrAttr = 'scra', gestaltScrapMgrTranslationAware = 0 }; enum { gestaltScriptMgrVersion = 'scri' }; enum { gestaltScriptCount = 'scr#' }; enum { gestaltSCSI = 'scsi', gestaltAsyncSCSI = 0, gestaltAsyncSCSIINROM = 1, gestaltSCSISlotBoot = 2, gestaltSCSIPollSIH = 3 }; enum { gestaltControlStripAttr = 'sdev', gestaltControlStripExists = 0, gestaltControlStripVersionFixed = 1, gestaltControlStripUserFont = 2, gestaltControlStripUserHotKey = 3 }; enum { gestaltSDPStandardDirectoryVersion = 'sdvr' }; enum { gestaltSerialAttr = 'ser ', gestaltHasGPIaToDCDa = 0, gestaltHasGPIaToRTxCa = 1, gestaltHasGPIbToDCDb = 2, gestaltHidePortA = 3, gestaltHidePortB = 4, gestaltPortADisabled = 5, gestaltPortBDisabled = 6 }; enum { gestaltShutdownAttributes = 'shut', gestaltShutdownHassdOnBootVolUnmount = 0 }; enum { gestaltNuBusConnectors = 'sltc' }; enum { gestaltSlotAttr = 'slot', gestaltSlotMgrExists = 0, gestaltNuBusPresent = 1, gestaltSESlotPresent = 2, gestaltSE30SlotPresent = 3, gestaltPortableSlotPresent = 4 }; enum { gestaltFirstSlotNumber = 'slt1' }; enum { gestaltSoundAttr = 'snd ', gestaltStereoCapability = 0, gestaltStereoMixing = 1, gestaltSoundIOMgrPresent = 3, gestaltBuiltInSoundInput = 4, gestaltHasSoundInputDevice = 5, gestaltPlayAndRecord = 6, gestalt16BitSoundIO = 7, gestaltStereoInput = 8, gestaltLineLevelInput = 9, gestaltSndPlayDoubleBuffer = 10, gestaltMultiChannels = 11, gestalt16BitAudioSupport = 12 }; enum { gestaltSplitOSAttr = 'spos', gestaltSplitOSBootDriveIsNetworkVolume = 0, gestaltSplitOSAware = 1, gestaltSplitOSEnablerVolumeIsDifferentFromBootVolume = 2, gestaltSplitOSMachineNameSetToNetworkNameTemp = 3, gestaltSplitOSMachineNameStartupDiskIsNonPersistent = 5 }; enum { gestaltSMPSPSendLetterVersion = 'spsl' }; enum { gestaltSpeechRecognitionAttr = 'srta', gestaltDesktopSpeechRecognition = 1, gestaltTelephoneSpeechRecognition = 2 }; enum { gestaltSpeechRecognitionVersion = 'srtb' }; enum { gestaltSoftwareVendorCode = 'srad', gestaltSoftwareVendorApple = 'Appl', gestaltSoftwareVendorLicensee = 'Lcns' }; enum { gestaltStandardFileAttr = 'stdf', gestaltStandardFile58 = 0, gestaltStandardFileTranslationAware = 1, gestaltStandardFileHasColorIcons = 2, gestaltStandardFileUseGenericIcons = 3, gestaltStandardFileHasDynamicVolumeAllocation = 4 }; enum { gestaltSysArchitecture = 'sysa', gestalt68k = 1, gestaltPowerPC = 2, gestaltIntel = 10, gestaltArm = 20 }; enum { gestaltSystemUpdateVersion = 'sysu' }; enum { gestaltSystemVersion = 'sysv', gestaltSystemVersionMajor = 'sys1', gestaltSystemVersionMinor = 'sys2', gestaltSystemVersionBugFix = 'sys3' } __attribute__((availability(macosx,introduced=10.0,deprecated=10.8,message="Use NSProcessInfo's operatingSystemVersion property instead."))); enum { gestaltToolboxTable = 'tbtt' }; enum { gestaltTextEditVersion = 'te ', gestaltTE1 = 1, gestaltTE2 = 2, gestaltTE3 = 3, gestaltTE4 = 4, gestaltTE5 = 5 }; enum { gestaltTE6 = 6 }; enum { gestaltTEAttr = 'teat', gestaltTEHasGetHiliteRgn = 0, gestaltTESupportsInlineInput = 1, gestaltTESupportsTextObjects = 2, gestaltTEHasWhiteBackground = 3 }; enum { gestaltTeleMgrAttr = 'tele', gestaltTeleMgrPresent = 0, gestaltTeleMgrPowerPCSupport = 1, gestaltTeleMgrSoundStreams = 2, gestaltTeleMgrAutoAnswer = 3, gestaltTeleMgrIndHandset = 4, gestaltTeleMgrSilenceDetect = 5, gestaltTeleMgrNewTELNewSupport = 6 }; enum { gestaltTermMgrAttr = 'term', gestaltTermMgrPresent = 0, gestaltTermMgrErrorString = 2 }; enum { gestaltThreadMgrAttr = 'thds', gestaltThreadMgrPresent = 0, gestaltSpecificMatchSupport = 1, gestaltThreadsLibraryPresent = 2 }; enum { gestaltTimeMgrVersion = 'tmgr', gestaltStandardTimeMgr = 1, gestaltRevisedTimeMgr = 2, gestaltExtendedTimeMgr = 3, gestaltNativeTimeMgr = 4 }; enum { gestaltTSMTEVersion = 'tmTV', gestaltTSMTE1 = 0x0100, gestaltTSMTE15 = 0x0150, gestaltTSMTE152 = 0x0152 }; enum { gestaltTSMTEAttr = 'tmTE', gestaltTSMTEPresent = 0, gestaltTSMTE = 0 }; enum { gestaltAVLTreeAttr = 'tree', gestaltAVLTreePresentBit = 0, gestaltAVLTreeSupportsHandleBasedTreeBit = 1, gestaltAVLTreeSupportsTreeLockingBit = 2 }; enum { gestaltALMAttr = 'trip', gestaltALMPresent = 0, gestaltALMHasSFGroup = 1, gestaltALMHasCFMSupport = 2, gestaltALMHasRescanNotifiers = 3 }; enum { gestaltALMHasSFLocation = gestaltALMHasSFGroup }; enum { gestaltTSMgrVersion = 'tsmv', gestaltTSMgr15 = 0x0150, gestaltTSMgr20 = 0x0200, gestaltTSMgr22 = 0x0220, gestaltTSMgr23 = 0x0230 }; enum { gestaltTSMgrAttr = 'tsma', gestaltTSMDisplayMgrAwareBit = 0, gestaltTSMdoesTSMTEBit = 1 }; enum { gestaltSpeechAttr = 'ttsc', gestaltSpeechMgrPresent = 0, gestaltSpeechHasPPCGlue = 1 }; enum { gestaltTVAttr = 'tv ', gestaltHasTVTuner = 0, gestaltHasSoundFader = 1, gestaltHasHWClosedCaptioning = 2, gestaltHasIRRemote = 3, gestaltHasVidDecoderScaler = 4, gestaltHasStereoDecoder = 5, gestaltHasSerialFader = 6, gestaltHasFMTuner = 7, gestaltHasSystemIRFunction = 8, gestaltIRDisabled = 9, gestaltINeedIRPowerOffConfirm = 10, gestaltHasZoomedVideo = 11 }; enum { gestaltATSUVersion = 'uisv', gestaltOriginalATSUVersion = (1 << 16), gestaltATSUUpdate1 = (2 << 16), gestaltATSUUpdate2 = (3 << 16), gestaltATSUUpdate3 = (4 << 16), gestaltATSUUpdate4 = (5 << 16), gestaltATSUUpdate5 = (6 << 16), gestaltATSUUpdate6 = (7 << 16), gestaltATSUUpdate7 = (8 << 16) }; enum { gestaltATSUFeatures = 'uisf', gestaltATSUTrackingFeature = 0x00000001, gestaltATSUMemoryFeature = 0x00000001, gestaltATSUFallbacksFeature = 0x00000001, gestaltATSUGlyphBoundsFeature = 0x00000001, gestaltATSULineControlFeature = 0x00000001, gestaltATSULayoutCreateAndCopyFeature = 0x00000001, gestaltATSULayoutCacheClearFeature = 0x00000001, gestaltATSUTextLocatorUsageFeature = 0x00000002, gestaltATSULowLevelOrigFeatures = 0x00000004, gestaltATSUFallbacksObjFeatures = 0x00000008, gestaltATSUIgnoreLeadingFeature = 0x00000008, gestaltATSUByCharacterClusterFeature = 0x00000010, gestaltATSUAscentDescentControlsFeature = 0x00000010, gestaltATSUHighlightInactiveTextFeature = 0x00000010, gestaltATSUPositionToCursorFeature = 0x00000010, gestaltATSUBatchBreakLinesFeature = 0x00000010, gestaltATSUTabSupportFeature = 0x00000010, gestaltATSUDirectAccess = 0x00000010, gestaltATSUDecimalTabFeature = 0x00000020, gestaltATSUBiDiCursorPositionFeature = 0x00000020, gestaltATSUNearestCharLineBreakFeature = 0x00000020, gestaltATSUHighlightColorControlFeature = 0x00000020, gestaltATSUUnderlineOptionsStyleFeature = 0x00000020, gestaltATSUStrikeThroughStyleFeature = 0x00000020, gestaltATSUDropShadowStyleFeature = 0x00000020 }; enum { gestaltUSBAttr = 'usb ', gestaltUSBPresent = 0, gestaltUSBHasIsoch = 1 }; enum { gestaltUSBVersion = 'usbv' }; enum { gestaltVersion = 'vers', gestaltValueImplementedVers = 5 }; enum { gestaltVIA1Addr = 'via1' }; enum { gestaltVIA2Addr = 'via2' }; enum { gestaltVMAttr = 'vm ', gestaltVMPresent = 0, gestaltVMHasLockMemoryForOutput = 1, gestaltVMFilemappingOn = 3, gestaltVMHasPagingControl = 4 }; enum { gestaltVMInfoType = 'vmin', gestaltVMInfoSizeStorageType = 0, gestaltVMInfoSizeType = 1, gestaltVMInfoSimpleType = 2, gestaltVMInfoNoneType = 3 }; enum { gestaltVMBackingStoreFileRefNum = 'vmbs' }; enum { gestaltALMVers = 'walk' }; enum { gestaltWindowMgrAttr = 'wind', gestaltWindowMgrPresent = (1L << 0), gestaltWindowMgrPresentBit = 0, gestaltExtendedWindowAttributes = 1, gestaltExtendedWindowAttributesBit = 1, gestaltHasFloatingWindows = 2, gestaltHasFloatingWindowsBit = 2, gestaltHasWindowBuffering = 3, gestaltHasWindowBufferingBit = 3, gestaltWindowLiveResizeBit = 4, gestaltWindowMinimizeToDockBit = 5, gestaltHasWindowShadowsBit = 6, gestaltSheetsAreWindowModalBit = 7, gestaltFrontWindowMayBeHiddenBit = 8, gestaltWindowMgrPresentMask = (1L << gestaltWindowMgrPresentBit), gestaltExtendedWindowAttributesMask = (1L << gestaltExtendedWindowAttributesBit), gestaltHasFloatingWindowsMask = (1L << gestaltHasFloatingWindowsBit), gestaltHasWindowBufferingMask = (1L << gestaltHasWindowBufferingBit), gestaltWindowLiveResizeMask = (1L << gestaltWindowLiveResizeBit), gestaltWindowMinimizeToDockMask = (1L << gestaltWindowMinimizeToDockBit), gestaltHasWindowShadowsMask = (1L << gestaltHasWindowShadowsBit), gestaltSheetsAreWindowModalMask = (1L << gestaltSheetsAreWindowModalBit), gestaltFrontWindowMayBeHiddenMask = (1L << gestaltFrontWindowMayBeHiddenBit) }; enum { gestaltHasSingleWindowModeBit = 8, gestaltHasSingleWindowModeMask = (1L << gestaltHasSingleWindowModeBit) }; enum { gestaltX86Features = 'x86f', gestaltX86HasFPU = 0, gestaltX86HasVME = 1, gestaltX86HasDE = 2, gestaltX86HasPSE = 3, gestaltX86HasTSC = 4, gestaltX86HasMSR = 5, gestaltX86HasPAE = 6, gestaltX86HasMCE = 7, gestaltX86HasCX8 = 8, gestaltX86HasAPIC = 9, gestaltX86HasSEP = 11, gestaltX86HasMTRR = 12, gestaltX86HasPGE = 13, gestaltX86HasMCA = 14, gestaltX86HasCMOV = 15, gestaltX86HasPAT = 16, gestaltX86HasPSE36 = 17, gestaltX86HasPSN = 18, gestaltX86HasCLFSH = 19, gestaltX86Serviced20 = 20, gestaltX86HasDS = 21, gestaltX86ResACPI = 22, gestaltX86HasMMX = 23, gestaltX86HasFXSR = 24, gestaltX86HasSSE = 25, gestaltX86HasSSE2 = 26, gestaltX86HasSS = 27, gestaltX86HasHTT = 28, gestaltX86HasTM = 29 }; enum { gestaltX86AdditionalFeatures = 'x86a', gestaltX86HasSSE3 = 0, gestaltX86HasMONITOR = 3, gestaltX86HasDSCPL = 4, gestaltX86HasVMX = 5, gestaltX86HasSMX = 6, gestaltX86HasEST = 7, gestaltX86HasTM2 = 8, gestaltX86HasSupplementalSSE3 = 9, gestaltX86HasCID = 10, gestaltX86HasCX16 = 13, gestaltX86HasxTPR = 14 }; enum { gestaltTranslationAttr = 'xlat', gestaltTranslationMgrExists = 0, gestaltTranslationMgrHintOrder = 1, gestaltTranslationPPCAvail = 2, gestaltTranslationGetPathAPIAvail = 3 }; enum { gestaltExtToolboxTable = 'xttt' }; enum { gestaltUSBPrinterSharingVersion = 'zak ', gestaltUSBPrinterSharingVersionMask = 0x0000FFFF, gestaltUSBPrinterSharingAttr = 'zak ', gestaltUSBPrinterSharingAttrMask = (int)0xFFFF0000, gestaltUSBPrinterSharingAttrRunning = (int)0x80000000, gestaltUSBPrinterSharingAttrBooted = 0x40000000 }; enum { gestaltWorldScriptIIVersion = 'doub', gestaltWorldScriptIIAttr = 'wsat', gestaltWSIICanPrintWithoutPrGeneralBit = 0 }; } extern "C" { #pragma pack(push, 2) enum { kMacMemoryMaximumMemoryManagerBlockSize = 0x7FFFFFF0 }; enum { defaultPhysicalEntryCount = 8 }; enum { kPageInMemory = 0, kPageOnDisk = 1, kNotPaged = 2 }; enum { k32BitHeap = 1, kNewStyleHeap = 2, kNewDebugHeap = 4 }; enum { kHandleIsResourceBit = 5, kHandlePurgeableBit = 6, kHandleLockedBit = 7 }; enum { kHandleIsResourceMask = 0x20, kHandlePurgeableMask = 0x40, kHandleLockedMask = 0x80 }; extern OSErr MemError(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt16 LMGetMemErr(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetMemErr(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle NewHandle(Size byteCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle NewHandleClear(Size byteCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle RecoverHandle(Ptr p) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Ptr NewPtr(Size byteCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Ptr NewPtrClear(Size byteCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle NewEmptyHandle(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void HLock(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void HLockHi(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void HUnlock(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle TempNewHandle( Size logicalSize, OSErr * resultCode) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposePtr(Ptr p) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Size GetPtrSize(Ptr p) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetPtrSize( Ptr p, Size newSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeHandle(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetHandleSize( Handle h, Size newSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Size GetHandleSize(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void ReallocateHandle( Handle h, Size byteCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void EmptyHandle(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void HSetRBit(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void HClrRBit(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt8 HGetState(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void HSetState( Handle h, SInt8 flags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr HandToHand(Handle * theHndl) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PtrToXHand( const void * srcPtr, Handle dstHndl, long size) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PtrToHand( const void * srcPtr, Handle * dstHndl, long size) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr HandAndHand( Handle hand1, Handle hand2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PtrAndHand( const void * ptr1, Handle hand2, long size) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean IsHeapValid(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean IsHandleValid(Handle h) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean IsPointerValid(Ptr p) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); #pragma pack(pop) } extern "C" { extern SInt64 S64Max(void); extern SInt64 S64Min(void); extern SInt64 S64Add( SInt64 left, SInt64 right); extern SInt64 S64Subtract( SInt64 left, SInt64 right); extern SInt64 S64Negate(SInt64 value); extern SInt64 S64Multiply( SInt64 left, SInt64 right); extern SInt64 S64Mod( SInt64 dividend, SInt64 divisor); extern SInt64 S64Divide( SInt64 dividend, SInt64 divisor, SInt64 * remainder); extern SInt64 S64Div( SInt64 dividend, SInt64 divisor); extern SInt64 S64Set(SInt32 value); extern SInt64 S64SetU(UInt32 value); extern SInt32 S32Set(SInt64 value); extern Boolean S64And( SInt64 left, SInt64 right); extern Boolean S64Or( SInt64 left, SInt64 right); extern Boolean S64Eor( SInt64 left, SInt64 right); extern Boolean S64Not(SInt64 value); extern SInt32 S64Compare( SInt64 left, SInt64 right) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt64 S64BitwiseAnd( SInt64 left, SInt64 right); extern SInt64 S64BitwiseOr( SInt64 left, SInt64 right); extern SInt64 S64BitwiseEor( SInt64 left, SInt64 right); extern SInt64 S64BitwiseNot(SInt64 value); extern SInt64 S64ShiftRight( SInt64 value, UInt32 shift); extern SInt64 S64ShiftLeft( SInt64 value, UInt32 shift); extern long double SInt64ToLongDouble(SInt64 value); extern SInt64 LongDoubleToSInt64(long double value); extern UInt64 U64Max(void); extern UInt64 U64Add( UInt64 left, UInt64 right); extern UInt64 U64Subtract( UInt64 left, UInt64 right); extern UInt64 U64Multiply( UInt64 left, UInt64 right); extern UInt64 U64Mod( UInt64 dividend, UInt64 divisor); extern UInt64 U64Divide( UInt64 dividend, UInt64 divisor, UInt64 * remainder); extern UInt64 U64Div( UInt64 dividend, UInt64 divisor); extern UInt64 U64Set(SInt32 value); extern UInt64 U64SetU(UInt32 value); extern UInt32 U32SetU(UInt64 value); extern Boolean U64And( UInt64 left, UInt64 right); extern Boolean U64Or( UInt64 left, UInt64 right); extern Boolean U64Eor( UInt64 left, UInt64 right); extern Boolean U64Not(UInt64 value); extern SInt32 U64Compare( UInt64 left, UInt64 right) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt64 U64BitwiseAnd( UInt64 left, UInt64 right); extern UInt64 U64BitwiseOr( UInt64 left, UInt64 right); extern UInt64 U64BitwiseEor( UInt64 left, UInt64 right); extern UInt64 U64BitwiseNot(UInt64 value); extern UInt64 U64ShiftRight( UInt64 value, UInt32 shift); extern UInt64 U64ShiftLeft( UInt64 value, UInt32 shift); extern long double UInt64ToLongDouble(UInt64 value); extern UInt64 LongDoubleToUInt64(long double value); extern SInt64 UInt64ToSInt64(UInt64 value); extern UInt64 SInt64ToUInt64(SInt64 value); static inline wide SInt64ToWide(SInt64 s) { wide result; result.hi = (SInt32)(((UInt64)s >> 32) & 0xffffffffUL); result.lo = (UInt32)((UInt64)s & 0xffffffffUL); return result; } static inline SInt64 WideToSInt64(wide w) { SInt64 result = w.hi; result = (result << 32) | w.lo; return result; } static inline UnsignedWide UInt64ToUnsignedWide(UInt64 u) { UnsignedWide result; result.hi = (UInt32)((u >> 32) & 0xffffffffUL); result.lo = (UInt32)(u & 0xffffffffUL); return result; } static inline UInt64 UnsignedWideToUInt64(UnsignedWide uw) { UInt64 result = uw.hi; result = (result << 32) | uw.lo; return result; } } extern "C" { extern OSStatus CSBackupSetItemExcluded( CFURLRef item, Boolean exclude, Boolean excludeByPath) __attribute__((availability(macosx,introduced=10.5))); extern Boolean CSBackupIsItemExcluded( CFURLRef item, Boolean * excludeByPath) __attribute__((availability(macosx,introduced=10.5))); } extern "C" { enum { kCSDiskSpaceRecoveryOptionNoUI = (1 << 0) }; typedef int CSDiskSpaceRecoveryOptions; typedef void (*CSDiskSpaceRecoveryCallback)(Boolean succeeded, UInt64 bytesFree, CFErrorRef error); extern void CSDiskSpaceStartRecovery( CFURLRef volumeURL, UInt64 bytesNeeded, CSDiskSpaceRecoveryOptions options, CFUUIDRef * outOperationUUID, dispatch_queue_t callbackQueue, CSDiskSpaceRecoveryCallback callback) __attribute__((availability(macosx,introduced=10.7))); extern void CSDiskSpaceCancelRecovery(CFUUIDRef operationUUID) __attribute__((availability(macosx,introduced=10.7))); extern UInt64 CSDiskSpaceGetRecoveryEstimate(CFURLRef volumeURL) __attribute__((availability(macosx,introduced=10.7))); } extern "C" { #pragma pack(push, 2) typedef SInt16 ToggleResults; enum { toggleUndefined = 0, toggleOK = 1, toggleBadField = 2, toggleBadDelta = 3, toggleBadChar = 4, toggleUnknown = 5, toggleBadNum = 6, toggleOutOfRange = 7, toggleErr3 = 7, toggleErr4 = 8, toggleErr5 = 9 }; enum { smallDateBit = 31, togChar12HourBit = 30, togCharZCycleBit = 29, togDelta12HourBit = 28, genCdevRangeBit = 27, validDateFields = -1, maxDateField = 10 }; enum { eraMask = 0x0001, yearMask = 0x0002, monthMask = 0x0004, dayMask = 0x0008, hourMask = 0x0010, minuteMask = 0x0020, secondMask = 0x0040, dayOfWeekMask = 0x0080, dayOfYearMask = 0x0100, weekOfYearMask = 0x0200, pmMask = 0x0400, dateStdMask = 0x007F }; typedef SInt8 LongDateField; enum { eraField = 0, yearField = 1, monthField = 2, dayField = 3, hourField = 4, minuteField = 5, secondField = 6, dayOfWeekField = 7, dayOfYearField = 8, weekOfYearField = 9, pmField = 10, res1Field = 11, res2Field = 12, res3Field = 13 }; typedef SInt8 DateForm; enum { shortDate = 0, longDate = 1, abbrevDate = 2 }; enum { fatalDateTime = 0x8000, longDateFound = 1, leftOverChars = 2, sepNotIntlSep = 4, fieldOrderNotIntl = 8, extraneousStrings = 16, tooManySeps = 32, sepNotConsistent = 64, tokenErr = 0x8100, cantReadUtilities = 0x8200, dateTimeNotFound = 0x8400, dateTimeInvalid = 0x8800 }; typedef short StringToDateStatus; typedef StringToDateStatus String2DateStatus; struct DateCacheRecord { short hidden[256]; }; typedef struct DateCacheRecord DateCacheRecord; typedef DateCacheRecord * DateCachePtr; struct DateTimeRec { short year; short month; short day; short hour; short minute; short second; short dayOfWeek; }; typedef struct DateTimeRec DateTimeRec; typedef SInt64 LongDateTime; union LongDateCvt { SInt64 c; struct { UInt32 lLow; UInt32 lHigh; } hl; }; typedef union LongDateCvt LongDateCvt; union LongDateRec { struct { short era; short year; short month; short day; short hour; short minute; short second; short dayOfWeek; short dayOfYear; short weekOfYear; short pm; short res1; short res2; short res3; } ld; short list[14]; struct { short eraAlt; DateTimeRec oldDate; } od; }; typedef union LongDateRec LongDateRec; typedef SInt8 DateDelta; struct TogglePB { long togFlags; ResType amChars; ResType pmChars; long reserved[4]; }; typedef struct TogglePB TogglePB; extern OSStatus UCConvertUTCDateTimeToCFAbsoluteTime( const UTCDateTime * iUTCDate, CFAbsoluteTime * oCFTime) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus UCConvertSecondsToCFAbsoluteTime( UInt32 iSeconds, CFAbsoluteTime * oCFTime) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus UCConvertLongDateTimeToCFAbsoluteTime( LongDateTime iLongTime, CFAbsoluteTime * oCFTime) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus UCConvertCFAbsoluteTimeToUTCDateTime( CFAbsoluteTime iCFTime, UTCDateTime * oUTCDate) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus UCConvertCFAbsoluteTimeToSeconds( CFAbsoluteTime iCFTime, UInt32 * oSeconds) __attribute__((availability(macosx,introduced=10.2))); extern OSStatus UCConvertCFAbsoluteTimeToLongDateTime( CFAbsoluteTime iCFTime, LongDateTime * oLongDate) __attribute__((availability(macosx,introduced=10.2))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) enum { sortsBefore = -1, sortsEqual = 0, sortsAfter = 1 }; enum { dummyType = 0, vType = 1, ioQType = 2, drvQType = 3, evType = 4, fsQType = 5, sIQType = 6, dtQType = 7, nmType = 8 }; typedef SignedByte QTypes; struct QElem { struct QElem * qLink; short qType; short qData[1]; }; typedef struct QElem QElem; typedef QElem * QElemPtr; struct QHdr { volatile short qFlags; volatile QElemPtr qHead; volatile QElemPtr qTail; }; typedef struct QHdr QHdr; typedef QHdr * QHdrPtr; struct MachineLocation { Fract latitude; Fract longitude; union { long gmtDelta; struct { SInt8 pad[3]; SInt8 Delta; } dls; } u; }; typedef struct MachineLocation MachineLocation; extern Boolean IsMetric(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void Delay( unsigned long numTicks, unsigned long * finalTicks) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void Enqueue( QElemPtr qElement, QHdrPtr qHeader) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr Dequeue( QElemPtr qElement, QHdrPtr qHeader) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void ReadLocation(MachineLocation * loc) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt32 TickCount(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern CFStringRef CSCopyUserName(Boolean useShortName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern CFStringRef CSCopyMachineName(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { useFree = 0, useATalk = 1, useAsync = 2, useExtClk = 3, useMIDI = 4 }; enum { false32b = 0, true32b = 1 } __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); typedef void * SysPPtr; typedef void ( * DeferredTaskProcPtr)(long dtParam); typedef DeferredTaskProcPtr DeferredTaskUPP; extern DeferredTaskUPP NewDeferredTaskUPP(DeferredTaskProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeDeferredTaskUPP(DeferredTaskUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void InvokeDeferredTaskUPP( long dtParam, DeferredTaskUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline DeferredTaskUPP NewDeferredTaskUPP(DeferredTaskProcPtr userRoutine) { return userRoutine; } inline void DisposeDeferredTaskUPP(DeferredTaskUPP) { } inline void InvokeDeferredTaskUPP(long dtParam, DeferredTaskUPP userUPP) { (*userUPP)(dtParam); } struct DeferredTask { volatile QElemPtr qLink; short qType; volatile short dtFlags; DeferredTaskUPP dtAddr; long dtParam; long dtReserved; }; typedef struct DeferredTask DeferredTask; typedef DeferredTask * DeferredTaskPtr; #pragma pack(pop) } extern "C" { typedef kern_return_t IOReturn; } extern "C" { typedef unsigned int UInt; typedef signed int SInt; typedef UInt32 IOOptionBits; typedef SInt32 IOFixed; typedef UInt32 IOVersion; typedef UInt32 IOItemCount; typedef UInt32 IOCacheMode; typedef UInt32 IOByteCount32; typedef UInt64 IOByteCount64; typedef UInt32 IOPhysicalAddress32; typedef UInt64 IOPhysicalAddress64; typedef UInt32 IOPhysicalLength32; typedef UInt64 IOPhysicalLength64; typedef mach_vm_address_t IOVirtualAddress ; typedef IOByteCount32 IOByteCount; typedef IOVirtualAddress IOLogicalAddress; typedef IOPhysicalAddress32 IOPhysicalAddress; typedef IOPhysicalLength32 IOPhysicalLength; typedef struct{ IOPhysicalAddress address; IOByteCount length; } IOPhysicalRange; typedef struct{ IOVirtualAddress address; IOByteCount length; } IOVirtualRange; typedef IOVirtualRange IOAddressRange; typedef struct { int value; const char *name; } IONamedValue; typedef unsigned int IOAlignment; typedef mach_port_t io_object_t; typedef char * io_buf_ptr_t; typedef char io_name_t[128]; typedef char io_string_t[512]; typedef char io_string_inband_t[4096]; typedef char io_struct_inband_t[4096]; typedef uint64_t io_user_scalar_t; typedef uint64_t io_user_reference_t; typedef io_user_scalar_t io_scalar_inband_t[16]; typedef io_user_reference_t io_async_ref_t[8]; typedef io_user_scalar_t io_scalar_inband64_t[16]; typedef io_user_reference_t io_async_ref64_t[8]; typedef io_object_t io_connect_t; typedef io_object_t io_enumerator_t; typedef io_object_t io_ident_t; typedef io_object_t io_iterator_t; typedef io_object_t io_registry_entry_t; typedef io_object_t io_service_t; typedef io_object_t uext_object_t; enum { kIODefaultMemoryType = 0 }; enum { kIODefaultCache = 0, kIOInhibitCache = 1, kIOWriteThruCache = 2, kIOCopybackCache = 3, kIOWriteCombineCache = 4, kIOCopybackInnerCache = 5, kIOPostedWrite = 6, kIORealTimeCache = 7, kIOPostedReordered = 8, kIOPostedCombinedReordered = 9, }; enum { kIOMapAnywhere = 0x00000001, kIOMapCacheMask = 0x00000f00, kIOMapCacheShift = 8, kIOMapDefaultCache = kIODefaultCache << kIOMapCacheShift, kIOMapInhibitCache = kIOInhibitCache << kIOMapCacheShift, kIOMapWriteThruCache = kIOWriteThruCache << kIOMapCacheShift, kIOMapCopybackCache = kIOCopybackCache << kIOMapCacheShift, kIOMapWriteCombineCache = kIOWriteCombineCache << kIOMapCacheShift, kIOMapCopybackInnerCache = kIOCopybackInnerCache << kIOMapCacheShift, kIOMapPostedWrite = kIOPostedWrite << kIOMapCacheShift, kIOMapRealTimeCache = kIORealTimeCache << kIOMapCacheShift, kIOMapPostedReordered = kIOPostedReordered << kIOMapCacheShift, kIOMapPostedCombinedReordered = kIOPostedCombinedReordered << kIOMapCacheShift, kIOMapUserOptionsMask = 0x00000fff, kIOMapReadOnly = 0x00001000, kIOMapStatic = 0x01000000, kIOMapReference = 0x02000000, kIOMapUnique = 0x04000000, kIOMapPrefault = 0x10000000, kIOMapOverwrite = 0x20000000, kIOMapGuardedMask = 0xC0000000, kIOMapGuardedSmall = 0x40000000, kIOMapGuardedLarge = 0x80000000 }; enum { kNanosecondScale = 1, kMicrosecondScale = 1000, kMillisecondScale = 1000 * 1000, kSecondScale = 1000 * 1000 * 1000, kTickScale = (kSecondScale / 100) }; enum { kIOConnectMethodVarOutputSize = -3 }; typedef unsigned int IODeviceNumber; } enum { kIOMaxBusStall40usec = 40000, kIOMaxBusStall30usec = 30000, kIOMaxBusStall25usec = 25000, kIOMaxBusStall20usec = 20000, kIOMaxBusStall10usec = 10000, kIOMaxBusStall5usec = 5000, kIOMaxBusStallNone = 0, }; extern "C" { enum { kFirstIOKitNotificationType = 100, kIOServicePublishNotificationType = 100, kIOServiceMatchedNotificationType = 101, kIOServiceTerminatedNotificationType = 102, kIOAsyncCompletionNotificationType = 150, kIOServiceMessageNotificationType = 160, kLastIOKitNotificationType = 199, kIOKitNoticationTypeMask = 0x00000FFF, kIOKitNoticationTypeSizeAdjShift = 30, kIOKitNoticationMsgSizeMask = 3, }; enum { kOSNotificationMessageID = 53, kOSAsyncCompleteMessageID = 57, kMaxAsyncArgs = 16 }; enum { kIOAsyncReservedIndex = 0, kIOAsyncReservedCount, kIOAsyncCalloutFuncIndex = kIOAsyncReservedCount, kIOAsyncCalloutRefconIndex, kIOAsyncCalloutCount, kIOMatchingCalloutFuncIndex = kIOAsyncReservedCount, kIOMatchingCalloutRefconIndex, kIOMatchingCalloutCount, kIOInterestCalloutFuncIndex = kIOAsyncReservedCount, kIOInterestCalloutRefconIndex, kIOInterestCalloutServiceIndex, kIOInterestCalloutCount }; enum { kOSAsyncRef64Count = 8, kOSAsyncRef64Size = kOSAsyncRef64Count * ((int) sizeof(io_user_reference_t)) }; typedef io_user_reference_t OSAsyncReference64[kOSAsyncRef64Count]; struct OSNotificationHeader64 { mach_msg_size_t size; natural_t type; OSAsyncReference64 reference; unsigned char content[0]; }; #pragma pack(4) struct IOServiceInterestContent64 { natural_t messageType; io_user_reference_t messageArgument[1]; }; #pragma pack() enum { kOSAsyncRefCount = 8, kOSAsyncRefSize = 32 }; typedef natural_t OSAsyncReference[kOSAsyncRefCount] ; struct OSNotificationHeader { mach_msg_size_t size; natural_t type; OSAsyncReference reference; unsigned char content[0]; }; #pragma pack(4) struct IOServiceInterestContent { natural_t messageType; void * messageArgument[1]; }; #pragma pack() struct IOAsyncCompletionContent { IOReturn result; void * args[0] __attribute__ ((packed)); }; } extern "C" { typedef struct IONotificationPort * IONotificationPortRef; typedef void (*IOServiceMatchingCallback)( void * refcon, io_iterator_t iterator ); typedef void (*IOServiceInterestCallback)( void * refcon, io_service_t service, uint32_t messageType, void * messageArgument ); extern const mach_port_t kIOMainPortDefault __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); kern_return_t IOMainPort( mach_port_t bootstrapPort, mach_port_t * mainPort ) __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); extern const mach_port_t kIOMasterPortDefault __attribute__((availability(macos,introduced=10.0,deprecated=12.0,replacement="kIOMainPortDefault"))) __attribute__((availability(ios,introduced=1.0,deprecated=15.0,replacement="kIOMainPortDefault"))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,replacement="kIOMainPortDefault"))) __attribute__((availability(tvos,introduced=1.0,deprecated=15.0,replacement="kIOMainPortDefault"))); kern_return_t IOMasterPort( mach_port_t bootstrapPort, mach_port_t * mainPort ) __attribute__((availability(macos,introduced=10.0,deprecated=12.0,replacement="IOMainPort"))) __attribute__((availability(ios,introduced=1.0,deprecated=15.0,replacement="IOMainPort"))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,replacement="IOMainPort"))) __attribute__((availability(tvos,introduced=1.0,deprecated=15.0,replacement="IOMainPort"))); IONotificationPortRef IONotificationPortCreate( mach_port_t mainPort ); void IONotificationPortDestroy( IONotificationPortRef notify ); CFRunLoopSourceRef IONotificationPortGetRunLoopSource( IONotificationPortRef notify ); mach_port_t IONotificationPortGetMachPort( IONotificationPortRef notify ); kern_return_t IONotificationPortSetImportanceReceiver( IONotificationPortRef notify ); void IONotificationPortSetDispatchQueue( IONotificationPortRef notify, dispatch_queue_t queue ) __attribute__((availability(macosx,introduced=10.6))); void IODispatchCalloutFromMessage( void *unused, mach_msg_header_t *msg, void *reference ); kern_return_t IOCreateReceivePort( uint32_t msgType, mach_port_t * recvPort ); kern_return_t IOObjectRelease( io_object_t object ); kern_return_t IOObjectRetain( io_object_t object ); kern_return_t IOObjectGetClass( io_object_t object, io_name_t className ); CFStringRef IOObjectCopyClass(io_object_t object) __attribute__((availability(macosx,introduced=10.4))); CFStringRef IOObjectCopySuperclassForClass(CFStringRef classname) __attribute__((availability(macosx,introduced=10.4))); CFStringRef IOObjectCopyBundleIdentifierForClass(CFStringRef classname) __attribute__((availability(macosx,introduced=10.4))); boolean_t IOObjectConformsTo( io_object_t object, const io_name_t className ); boolean_t IOObjectIsEqualTo( io_object_t object, io_object_t anObject ); uint32_t IOObjectGetKernelRetainCount( io_object_t object ) __attribute__((availability(macosx,introduced=10.6))); uint32_t IOObjectGetUserRetainCount( io_object_t object ) __attribute__((availability(macosx,introduced=10.6))); uint32_t IOObjectGetRetainCount( io_object_t object ); io_object_t IOIteratorNext( io_iterator_t iterator ); void IOIteratorReset( io_iterator_t iterator ); boolean_t IOIteratorIsValid( io_iterator_t iterator ); io_service_t IOServiceGetMatchingService( mach_port_t mainPort, CFDictionaryRef matching __attribute__((cf_consumed))); kern_return_t IOServiceGetMatchingServices( mach_port_t mainPort, CFDictionaryRef matching __attribute__((cf_consumed)), io_iterator_t * existing ); kern_return_t IOServiceAddNotification( mach_port_t mainPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated)); kern_return_t IOServiceAddMatchingNotification( IONotificationPortRef notifyPort, const io_name_t notificationType, CFDictionaryRef matching __attribute__((cf_consumed)), IOServiceMatchingCallback callback, void * refCon, io_iterator_t * notification ); kern_return_t IOServiceAddInterestNotification( IONotificationPortRef notifyPort, io_service_t service, const io_name_t interestType, IOServiceInterestCallback callback, void * refCon, io_object_t * notification ); kern_return_t IOServiceMatchPropertyTable( io_service_t service, CFDictionaryRef matching, boolean_t * matches ); kern_return_t IOServiceGetBusyState( io_service_t service, uint32_t * busyState ); kern_return_t IOServiceWaitQuiet( io_service_t service, mach_timespec_t * waitTime ); kern_return_t IOKitGetBusyState( mach_port_t mainPort, uint32_t * busyState ); kern_return_t IOKitWaitQuiet( mach_port_t mainPort, mach_timespec_t * waitTime ); kern_return_t IOServiceOpen( io_service_t service, task_port_t owningTask, uint32_t type, io_connect_t * connect ); kern_return_t IOServiceRequestProbe( io_service_t service, uint32_t options ); enum { kIOServiceInteractionAllowed = 0x00000001 }; kern_return_t IOServiceAuthorize( io_service_t service, uint32_t options ); int IOServiceOpenAsFileDescriptor( io_service_t service, int oflag ); kern_return_t IOServiceClose( io_connect_t connect ); kern_return_t IOConnectAddRef( io_connect_t connect ); kern_return_t IOConnectRelease( io_connect_t connect ); kern_return_t IOConnectGetService( io_connect_t connect, io_service_t * service ); kern_return_t IOConnectSetNotificationPort( io_connect_t connect, uint32_t type, mach_port_t port, uintptr_t reference ); kern_return_t IOConnectMapMemory( io_connect_t connect, uint32_t memoryType, task_port_t intoTask, mach_vm_address_t *atAddress, mach_vm_size_t *ofSize, IOOptionBits options ); kern_return_t IOConnectMapMemory64( io_connect_t connect, uint32_t memoryType, task_port_t intoTask, mach_vm_address_t *atAddress, mach_vm_size_t *ofSize, IOOptionBits options ); kern_return_t IOConnectUnmapMemory( io_connect_t connect, uint32_t memoryType, task_port_t fromTask, mach_vm_address_t atAddress ); kern_return_t IOConnectUnmapMemory64( io_connect_t connect, uint32_t memoryType, task_port_t fromTask, mach_vm_address_t atAddress ); kern_return_t IOConnectSetCFProperties( io_connect_t connect, CFTypeRef properties ); kern_return_t IOConnectSetCFProperty( io_connect_t connect, CFStringRef propertyName, CFTypeRef property ); kern_return_t IOConnectCallMethod( mach_port_t connection, uint32_t selector, const uint64_t *input, uint32_t inputCnt, const void *inputStruct, size_t inputStructCnt, uint64_t *output, uint32_t *outputCnt, void *outputStruct, size_t *outputStructCnt) __attribute__((availability(macosx,introduced=10.5))); kern_return_t IOConnectCallAsyncMethod( mach_port_t connection, uint32_t selector, mach_port_t wake_port, uint64_t *reference, uint32_t referenceCnt, const uint64_t *input, uint32_t inputCnt, const void *inputStruct, size_t inputStructCnt, uint64_t *output, uint32_t *outputCnt, void *outputStruct, size_t *outputStructCnt) __attribute__((availability(macosx,introduced=10.5))); kern_return_t IOConnectCallStructMethod( mach_port_t connection, uint32_t selector, const void *inputStruct, size_t inputStructCnt, void *outputStruct, size_t *outputStructCnt) __attribute__((availability(macosx,introduced=10.5))); kern_return_t IOConnectCallAsyncStructMethod( mach_port_t connection, uint32_t selector, mach_port_t wake_port, uint64_t *reference, uint32_t referenceCnt, const void *inputStruct, size_t inputStructCnt, void *outputStruct, size_t *outputStructCnt) __attribute__((availability(macosx,introduced=10.5))); kern_return_t IOConnectCallScalarMethod( mach_port_t connection, uint32_t selector, const uint64_t *input, uint32_t inputCnt, uint64_t *output, uint32_t *outputCnt) __attribute__((availability(macosx,introduced=10.5))); kern_return_t IOConnectCallAsyncScalarMethod( mach_port_t connection, uint32_t selector, mach_port_t wake_port, uint64_t *reference, uint32_t referenceCnt, const uint64_t *input, uint32_t inputCnt, uint64_t *output, uint32_t *outputCnt) __attribute__((availability(macosx,introduced=10.5))); kern_return_t IOConnectTrap0(io_connect_t connect, uint32_t index ); kern_return_t IOConnectTrap1(io_connect_t connect, uint32_t index, uintptr_t p1 ); kern_return_t IOConnectTrap2(io_connect_t connect, uint32_t index, uintptr_t p1, uintptr_t p2); kern_return_t IOConnectTrap3(io_connect_t connect, uint32_t index, uintptr_t p1, uintptr_t p2, uintptr_t p3); kern_return_t IOConnectTrap4(io_connect_t connect, uint32_t index, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4); kern_return_t IOConnectTrap5(io_connect_t connect, uint32_t index, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5); kern_return_t IOConnectTrap6(io_connect_t connect, uint32_t index, uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4, uintptr_t p5, uintptr_t p6); kern_return_t IOConnectAddClient( io_connect_t connect, io_connect_t client ); io_registry_entry_t IORegistryGetRootEntry( mach_port_t mainPort ); io_registry_entry_t IORegistryEntryFromPath( mach_port_t mainPort, const io_string_t path ); io_registry_entry_t IORegistryEntryCopyFromPath( mach_port_t mainPort, CFStringRef path ) __attribute__((availability(macosx,introduced=10.11))) ; enum { kIORegistryIterateRecursively = 0x00000001, kIORegistryIterateParents = 0x00000002 }; kern_return_t IORegistryCreateIterator( mach_port_t mainPort, const io_name_t plane, IOOptionBits options, io_iterator_t * iterator ); kern_return_t IORegistryEntryCreateIterator( io_registry_entry_t entry, const io_name_t plane, IOOptionBits options, io_iterator_t * iterator ); kern_return_t IORegistryIteratorEnterEntry( io_iterator_t iterator ); kern_return_t IORegistryIteratorExitEntry( io_iterator_t iterator ); kern_return_t IORegistryEntryGetName( io_registry_entry_t entry, io_name_t name ); kern_return_t IORegistryEntryGetNameInPlane( io_registry_entry_t entry, const io_name_t plane, io_name_t name ); kern_return_t IORegistryEntryGetLocationInPlane( io_registry_entry_t entry, const io_name_t plane, io_name_t location ); kern_return_t IORegistryEntryGetPath( io_registry_entry_t entry, const io_name_t plane, io_string_t path ); CFStringRef IORegistryEntryCopyPath( io_registry_entry_t entry, const io_name_t plane) __attribute__((availability(macosx,introduced=10.11))) ; kern_return_t IORegistryEntryGetRegistryEntryID( io_registry_entry_t entry, uint64_t * entryID ); kern_return_t IORegistryEntryCreateCFProperties( io_registry_entry_t entry, CFMutableDictionaryRef * properties, CFAllocatorRef allocator, IOOptionBits options ); CFTypeRef IORegistryEntryCreateCFProperty( io_registry_entry_t entry, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options ); CFTypeRef IORegistryEntrySearchCFProperty( io_registry_entry_t entry, const io_name_t plane, CFStringRef key, CFAllocatorRef allocator, IOOptionBits options ) __attribute__((cf_returns_retained)); kern_return_t IORegistryEntryGetProperty( io_registry_entry_t entry, const io_name_t propertyName, io_struct_inband_t buffer, uint32_t * size ); kern_return_t IORegistryEntrySetCFProperties( io_registry_entry_t entry, CFTypeRef properties ); kern_return_t IORegistryEntrySetCFProperty( io_registry_entry_t entry, CFStringRef propertyName, CFTypeRef property ); kern_return_t IORegistryEntryGetChildIterator( io_registry_entry_t entry, const io_name_t plane, io_iterator_t * iterator ); kern_return_t IORegistryEntryGetChildEntry( io_registry_entry_t entry, const io_name_t plane, io_registry_entry_t * child ); kern_return_t IORegistryEntryGetParentIterator( io_registry_entry_t entry, const io_name_t plane, io_iterator_t * iterator ); kern_return_t IORegistryEntryGetParentEntry( io_registry_entry_t entry, const io_name_t plane, io_registry_entry_t * parent ); boolean_t IORegistryEntryInPlane( io_registry_entry_t entry, const io_name_t plane ); CFMutableDictionaryRef IOServiceMatching( const char * name ) __attribute__((cf_returns_retained)); CFMutableDictionaryRef IOServiceNameMatching( const char * name ) __attribute__((cf_returns_retained)); CFMutableDictionaryRef IOBSDNameMatching( mach_port_t mainPort, uint32_t options, const char * bsdName ) __attribute__((cf_returns_retained)); CFMutableDictionaryRef IOOpenFirmwarePathMatching( mach_port_t mainPort, uint32_t options, const char * path ) __attribute__((deprecated)); CFMutableDictionaryRef IORegistryEntryIDMatching( uint64_t entryID ) __attribute__((cf_returns_retained)); kern_return_t IOServiceOFPathToBSDName(mach_port_t mainPort, const io_name_t openFirmwarePath, io_name_t bsdName) __attribute__((deprecated)); typedef void (*IOAsyncCallback0)(void *refcon, IOReturn result); typedef void (*IOAsyncCallback1)(void *refcon, IOReturn result, void *arg0); typedef void (*IOAsyncCallback2)(void *refcon, IOReturn result, void *arg0, void *arg1); typedef void (*IOAsyncCallback)(void *refcon, IOReturn result, void **args, uint32_t numArgs); kern_return_t OSGetNotificationFromMessage( mach_msg_header_t * msg, uint32_t index, uint32_t * type, uintptr_t * reference, void ** content, vm_size_t * size ); kern_return_t IOCatalogueSendData( mach_port_t mainPort, uint32_t flag, const char *buffer, uint32_t size ); kern_return_t IOCatalogueTerminate( mach_port_t mainPort, uint32_t flag, io_name_t description ); kern_return_t IOCatalogueGetData( mach_port_t mainPort, uint32_t flag, char **buffer, uint32_t *size ); kern_return_t IOCatalogueModuleLoaded( mach_port_t mainPort, io_name_t name ); kern_return_t IOCatalogueReset( mach_port_t mainPort, uint32_t flag ); } extern "C" { #pragma clang assume_nonnull begin typedef struct __attribute__((objc_bridge(id))) __DASession * DASessionRef; extern CFTypeID DASessionGetTypeID( void ); extern DASessionRef _Nullable DASessionCreate( CFAllocatorRef _Nullable allocator ); extern void DASessionScheduleWithRunLoop( DASessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode ); extern void DASessionUnscheduleFromRunLoop( DASessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode ); extern void DASessionSetDispatchQueue( DASessionRef session, dispatch_queue_t _Nullable queue ); typedef struct __attribute__((objc_bridge(id))) __DASession * DAApprovalSessionRef __attribute__((availability(swift, unavailable, message="Use DASessionRef instead"))); extern CFTypeID DAApprovalSessionGetTypeID( void ) __attribute__((availability(swift, unavailable, message="Use DASessionGetTypeID instead"))); extern DAApprovalSessionRef _Nullable DAApprovalSessionCreate( CFAllocatorRef _Nullable allocator ) __attribute__((availability(swift, unavailable, message="Use DASessionCreate instead"))); extern void DAApprovalSessionScheduleWithRunLoop( DAApprovalSessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode ) __attribute__((availability(swift, unavailable, message="Use DASessionSetDispatchQueue instead"))); extern void DAApprovalSessionUnscheduleFromRunLoop( DAApprovalSessionRef session, CFRunLoopRef runLoop, CFStringRef runLoopMode ) __attribute__((availability(swift, unavailable, message="Use DASessionSetDispatchQueue instead"))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kDADiskDescriptionVolumeKindKey; extern const CFStringRef kDADiskDescriptionVolumeMountableKey; extern const CFStringRef kDADiskDescriptionVolumeNameKey; extern const CFStringRef kDADiskDescriptionVolumeNetworkKey; extern const CFStringRef kDADiskDescriptionVolumePathKey; extern const CFStringRef kDADiskDescriptionVolumeTypeKey; extern const CFStringRef kDADiskDescriptionVolumeUUIDKey; extern const CFStringRef kDADiskDescriptionMediaBlockSizeKey; extern const CFStringRef kDADiskDescriptionMediaBSDMajorKey; extern const CFStringRef kDADiskDescriptionMediaBSDMinorKey; extern const CFStringRef kDADiskDescriptionMediaBSDNameKey; extern const CFStringRef kDADiskDescriptionMediaBSDUnitKey; extern const CFStringRef kDADiskDescriptionMediaContentKey; extern const CFStringRef kDADiskDescriptionMediaEjectableKey; extern const CFStringRef kDADiskDescriptionMediaIconKey; extern const CFStringRef kDADiskDescriptionMediaKindKey; extern const CFStringRef kDADiskDescriptionMediaLeafKey; extern const CFStringRef kDADiskDescriptionMediaNameKey; extern const CFStringRef kDADiskDescriptionMediaPathKey; extern const CFStringRef kDADiskDescriptionMediaRemovableKey; extern const CFStringRef kDADiskDescriptionMediaSizeKey; extern const CFStringRef kDADiskDescriptionMediaTypeKey; extern const CFStringRef kDADiskDescriptionMediaUUIDKey; extern const CFStringRef kDADiskDescriptionMediaWholeKey; extern const CFStringRef kDADiskDescriptionMediaWritableKey; extern const CFStringRef kDADiskDescriptionMediaEncryptedKey; extern const CFStringRef kDADiskDescriptionMediaEncryptionDetailKey; extern const CFStringRef kDADiskDescriptionDeviceGUIDKey; extern const CFStringRef kDADiskDescriptionDeviceInternalKey; extern const CFStringRef kDADiskDescriptionDeviceModelKey; extern const CFStringRef kDADiskDescriptionDevicePathKey; extern const CFStringRef kDADiskDescriptionDeviceProtocolKey; extern const CFStringRef kDADiskDescriptionDeviceRevisionKey; extern const CFStringRef kDADiskDescriptionDeviceUnitKey; extern const CFStringRef kDADiskDescriptionDeviceVendorKey; extern const CFStringRef kDADiskDescriptionDeviceTDMLockedKey; extern const CFStringRef kDADiskDescriptionBusNameKey; extern const CFStringRef kDADiskDescriptionBusPathKey; typedef struct __attribute__((objc_bridge(id))) __DADisk * DADiskRef; extern CFTypeID DADiskGetTypeID( void ); extern DADiskRef _Nullable DADiskCreateFromBSDName( CFAllocatorRef _Nullable allocator, DASessionRef session, const char * name ); extern DADiskRef _Nullable DADiskCreateFromIOMedia( CFAllocatorRef _Nullable allocator, DASessionRef session, io_service_t media ); extern DADiskRef _Nullable DADiskCreateFromVolumePath( CFAllocatorRef _Nullable allocator, DASessionRef session, CFURLRef path ); extern const char * _Nullable DADiskGetBSDName( DADiskRef disk ); extern io_service_t DADiskCopyIOMedia( DADiskRef disk ); extern CFDictionaryRef _Nullable DADiskCopyDescription( DADiskRef disk ); extern DADiskRef _Nullable DADiskCopyWholeDisk( DADiskRef disk ); #pragma clang assume_nonnull end } extern "C" { struct HFSUniStr255 { u_int16_t length; u_int16_t unicode[255]; } __attribute__((aligned(2), packed)); typedef struct HFSUniStr255 HFSUniStr255; typedef const HFSUniStr255 *ConstHFSUniStr255Param; } extern "C" { #pragma pack(push, 2) enum { fsCurPerm = 0x00, fsRdPerm = 0x01, fsWrPerm = 0x02, fsRdWrPerm = 0x03, fsRdWrShPerm = 0x04 }; enum { fsRdAccessPerm = 0x01, fsWrAccessPerm = 0x02, fsRdDenyPerm = 0x10, fsWrDenyPerm = 0x20 }; enum { fsRtParID = 1, fsRtDirID = 2 }; enum { fsAtMark = 0, fsFromStart = 1, fsFromLEOF = 2, fsFromMark = 3 }; enum { kFSAllowConcurrentAsyncIOBit = 3, kFSAllowConcurrentAsyncIOMask = 0x0008, kFSPleaseCacheBit = 4, kFSPleaseCacheMask = 0x0010, kFSNoCacheBit = 5, kFSNoCacheMask = 0x0020, kFSRdVerifyBit = 6, kFSRdVerifyMask = 0x0040, kFSForceReadBit = 6, kFSForceReadMask = 0x0040, kFSNewLineBit = 7, kFSNewLineMask = 0x0080, kFSNewLineCharMask = 0xFF00 }; enum { fsSBPartialName = 0x01, fsSBFullName = 0x02, fsSBFlAttrib = 0x04, fsSBFlFndrInfo = 0x08, fsSBFlLgLen = 0x20, fsSBFlPyLen = 0x40, fsSBFlRLgLen = 0x80, fsSBFlRPyLen = 0x0100, fsSBFlCrDat = 0x0200, fsSBFlMdDat = 0x0400, fsSBFlBkDat = 0x0800, fsSBFlXFndrInfo = 0x1000, fsSBFlParID = 0x2000, fsSBNegate = 0x4000, fsSBDrUsrWds = 0x08, fsSBDrNmFls = 0x10, fsSBDrCrDat = 0x0200, fsSBDrMdDat = 0x0400, fsSBDrBkDat = 0x0800, fsSBDrFndrInfo = 0x1000, fsSBDrParID = 0x2000, fsSBNodeID = 0x8000, fsSBAttributeModDate = 0x00010000, fsSBAccessDate = 0x00020000, fsSBPermissions = 0x00040000, fsSBSkipPackageContents = 0x00080000, fsSBSkipHiddenItems = 0x00100000, fsSBUserID = 0x00200000, fsSBGroupID = 0x00400000 }; enum { fsSBPartialNameBit = 0, fsSBFullNameBit = 1, fsSBFlAttribBit = 2, fsSBFlFndrInfoBit = 3, fsSBFlLgLenBit = 5, fsSBFlPyLenBit = 6, fsSBFlRLgLenBit = 7, fsSBFlRPyLenBit = 8, fsSBFlCrDatBit = 9, fsSBFlMdDatBit = 10, fsSBFlBkDatBit = 11, fsSBFlXFndrInfoBit = 12, fsSBFlParIDBit = 13, fsSBNegateBit = 14, fsSBDrUsrWdsBit = 3, fsSBDrNmFlsBit = 4, fsSBDrCrDatBit = 9, fsSBDrMdDatBit = 10, fsSBDrBkDatBit = 11, fsSBDrFndrInfoBit = 12, fsSBDrParIDBit = 13, fsSBNodeIDBit = 15, fsSBAttributeModDateBit = 16, fsSBAccessDateBit = 17, fsSBPermissionsBit = 18, fsSBSkipPackageContentsBit = 19, fsSBSkipHiddenItemsBit = 20, fsSBUserIDBit = 21, fsSBGroupIDBit = 22 }; enum { bLimitFCBs = 31, bLocalWList = 30, bNoMiniFndr = 29, bNoVNEdit = 28, bNoLclSync = 27, bTrshOffLine = 26, bNoSwitchTo = 25, bNoDeskItems = 20, bNoBootBlks = 19, bAccessCntl = 18, bNoSysDir = 17, bHasExtFSVol = 16, bHasOpenDeny = 15, bHasCopyFile = 14, bHasMoveRename = 13, bHasDesktopMgr = 12, bHasShortName = 11, bHasFolderLock = 10, bHasPersonalAccessPrivileges = 9, bHasUserGroupList = 8, bHasCatSearch = 7, bHasFileIDs = 6, bHasBTreeMgr = 5, bHasBlankAccessPrivileges = 4, bSupportsAsyncRequests = 3, bSupportsTrashVolumeCache = 2 }; enum { bHasDirectIO = 1 }; enum { bIsEjectable = 0, bSupportsHFSPlusAPIs = 1, bSupportsFSCatalogSearch = 2, bSupportsFSExchangeObjects = 3, bSupports2TBFiles = 4, bSupportsLongNames = 5, bSupportsMultiScriptNames = 6, bSupportsNamedForks = 7, bSupportsSubtreeIterators = 8, bL2PCanMapFileBlocks = 9, bParentModDateChanges = 10, bAncestorModDateChanges = 11, bSupportsSymbolicLinks = 13, bIsAutoMounted = 14, bAllowCDiDataHandler = 17, bSupportsExclusiveLocks = 18, bSupportsJournaling = 19, bNoVolumeSizes = 20, bIsOnInternalBus = 21, bIsCaseSensitive = 22, bIsCasePreserving = 23, bDoNotDisplay = 24, bIsRemovable = 25, bNoRootTimes = 26, bIsOnExternalBus = 27, bSupportsExtendedFileSecurity = 28 }; enum { kWidePosOffsetBit = 8, kUseWidePositioning = (1 << kWidePosOffsetBit), kMaximumBlocksIn4GB = 0x007FFFFF }; enum { fsUnixPriv = 1 }; enum { kNoUserAuthentication = 1, kPassword = 2, kEncryptPassword = 3, kTwoWayEncryptPassword = 6 }; enum { knoUser = 0, kadministratorUser = 1 }; enum { knoGroup = 0 }; typedef SInt16 FSVolumeRefNum; typedef int FSIORefNum; enum { kFSInvalidVolumeRefNum = 0 }; struct FSRef { UInt8 hidden[80]; }; typedef struct FSRef FSRef; typedef FSRef * FSRefPtr; typedef struct __FSFileSecurity* FSFileSecurityRef; struct CatPositionRec { SInt32 initialize; SInt16 priv[6]; }; typedef struct CatPositionRec CatPositionRec; struct FSSpec { UInt8 hidden[70]; }; typedef struct FSSpec FSSpec; typedef FSSpec * FSSpecPtr; typedef FSSpecPtr * FSSpecHandle; typedef FSSpecPtr FSSpecArrayPtr; typedef const FSSpec * ConstFSSpecPtr; typedef union ParamBlockRec ParamBlockRec; typedef void * ParmBlkPtr; typedef void ( * IOCompletionProcPtr)(ParmBlkPtr paramBlock); typedef IOCompletionProcPtr IOCompletionUPP; struct FSPermissionInfo { UInt32 userID; UInt32 groupID; UInt8 reserved1; UInt8 userAccess; UInt16 mode; FSFileSecurityRef fileSec; }; typedef struct FSPermissionInfo FSPermissionInfo; typedef UInt32 FSCatalogInfoBitmap; enum { kFSCatInfoNone = 0x00000000, kFSCatInfoTextEncoding = 0x00000001, kFSCatInfoNodeFlags = 0x00000002, kFSCatInfoVolume = 0x00000004, kFSCatInfoParentDirID = 0x00000008, kFSCatInfoNodeID = 0x00000010, kFSCatInfoCreateDate = 0x00000020, kFSCatInfoContentMod = 0x00000040, kFSCatInfoAttrMod = 0x00000080, kFSCatInfoAccessDate = 0x00000100, kFSCatInfoBackupDate = 0x00000200, kFSCatInfoPermissions = 0x00000400, kFSCatInfoFinderInfo = 0x00000800, kFSCatInfoFinderXInfo = 0x00001000, kFSCatInfoValence = 0x00002000, kFSCatInfoDataSizes = 0x00004000, kFSCatInfoRsrcSizes = 0x00008000, kFSCatInfoSharingFlags = 0x00010000, kFSCatInfoUserPrivs = 0x00020000, kFSCatInfoUserAccess = 0x00080000, kFSCatInfoSetOwnership = 0x00100000, kFSCatInfoFSFileSecurityRef = 0x00400000, kFSCatInfoAllDates = 0x000003E0, kFSCatInfoGettableInfo = 0x0003FFFF, kFSCatInfoSettableInfo = 0x00001FE3, kFSCatInfoReserved = (int)0xFFFC0000 }; enum { kFSNodeLockedBit = 0, kFSNodeLockedMask = 0x0001, kFSNodeResOpenBit = 2, kFSNodeResOpenMask = 0x0004, kFSNodeDataOpenBit = 3, kFSNodeDataOpenMask = 0x0008, kFSNodeIsDirectoryBit = 4, kFSNodeIsDirectoryMask = 0x0010, kFSNodeCopyProtectBit = 6, kFSNodeCopyProtectMask = 0x0040, kFSNodeForkOpenBit = 7, kFSNodeForkOpenMask = 0x0080, kFSNodeHardLinkBit = 8, kFSNodeHardLinkMask = 0x00000100 }; enum { kFSNodeInSharedBit = 2, kFSNodeInSharedMask = 0x0004, kFSNodeIsMountedBit = 3, kFSNodeIsMountedMask = 0x0008, kFSNodeIsSharePointBit = 5, kFSNodeIsSharePointMask = 0x0020 }; struct FSCatalogInfo { UInt16 nodeFlags; FSVolumeRefNum volume; UInt32 parentDirID; UInt32 nodeID; UInt8 sharingFlags; UInt8 userPrivileges; UInt8 reserved1; UInt8 reserved2; UTCDateTime createDate; UTCDateTime contentModDate; UTCDateTime attributeModDate; UTCDateTime accessDate; UTCDateTime backupDate; FSPermissionInfo permissions; UInt8 finderInfo[16]; UInt8 extFinderInfo[16]; UInt64 dataLogicalSize; UInt64 dataPhysicalSize; UInt64 rsrcLogicalSize; UInt64 rsrcPhysicalSize; UInt32 valence; TextEncoding textEncodingHint; }; typedef struct FSCatalogInfo FSCatalogInfo; typedef FSCatalogInfo * FSCatalogInfoPtr; struct FSRefParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; ConstStringPtr ioNamePtr; FSVolumeRefNum ioVRefNum; SInt16 reserved1; UInt8 reserved2; UInt8 reserved3; const FSRef * ref; FSCatalogInfoBitmap whichInfo; FSCatalogInfo * catInfo; UniCharCount nameLength; const UniChar * name; UInt32 ioDirID; FSSpecPtr spec; FSRef * parentRef; FSRef * newRef; TextEncoding textEncodingHint; HFSUniStr255 * outName; }; typedef struct FSRefParam FSRefParam; typedef FSRefParam * FSRefParamPtr; struct FSRefForkIOParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; const FSRef * parentRef; UniCharCount nameLength; const UniChar * name; FSCatalogInfoBitmap whichInfo; const FSCatalogInfo * catInfo; UniCharCount forkNameLength; const UniChar * forkName; SInt8 permissions; UInt8 reserved1; FSIORefNum forkRefNum; FSRef * newRef; }; typedef struct FSRefForkIOParam FSRefForkIOParam; typedef FSRefForkIOParam * FSRefForkIOParamPtr; typedef struct OpaqueFSIterator* FSIterator; enum { kFSIterateFlat = 0, kFSIterateSubtree = 1, kFSIterateDelete = 2, kFSIterateReserved = (int)0xFFFFFFFC }; typedef OptionBits FSIteratorFlags; struct FSSearchParams { Duration searchTime; OptionBits searchBits; UniCharCount searchNameLength; const UniChar * searchName; FSCatalogInfo * searchInfo1; FSCatalogInfo * searchInfo2; }; typedef struct FSSearchParams FSSearchParams; typedef FSSearchParams * FSSearchParamsPtr; struct FSCatalogBulkParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; Boolean containerChanged; UInt8 reserved; FSIteratorFlags iteratorFlags; FSIterator iterator; const FSRef * container; ItemCount maximumItems; ItemCount actualItems; FSCatalogInfoBitmap whichInfo; FSCatalogInfo * catalogInfo; FSRef * refs; FSSpecPtr specs; HFSUniStr255 * names; const FSSearchParams * searchParams; }; typedef struct FSCatalogBulkParam FSCatalogBulkParam; typedef FSCatalogBulkParam * FSCatalogBulkParamPtr; typedef UInt16 FSAllocationFlags; enum { kFSAllocDefaultFlags = 0x0000, kFSAllocAllOrNothingMask = 0x0001, kFSAllocContiguousMask = 0x0002, kFSAllocNoRoundUpMask = 0x0004, kFSAllocReservedMask = 0xFFF8 }; struct FSForkIOParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; void * reserved1; SInt16 reserved2; FSIORefNum forkRefNum; UInt8 reserved3; SInt8 permissions; const FSRef * ref; Ptr buffer; UInt32 requestCount; UInt32 actualCount; UInt16 positionMode; SInt64 positionOffset; FSAllocationFlags allocationFlags; UInt64 allocationAmount; UniCharCount forkNameLength; const UniChar * forkName; CatPositionRec forkIterator; HFSUniStr255 * outForkName; }; typedef struct FSForkIOParam FSForkIOParam; typedef FSForkIOParam * FSForkIOParamPtr; typedef UInt8 FSForkInfoFlags; struct FSForkInfo { FSForkInfoFlags flags; SInt8 permissions; FSVolumeRefNum volume; UInt32 reserved2; UInt32 nodeID; UInt32 forkID; UInt64 currentPosition; UInt64 logicalEOF; UInt64 physicalEOF; UInt64 process; }; typedef struct FSForkInfo FSForkInfo; typedef FSForkInfo * FSForkInfoPtr; struct FSForkCBInfoParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; FSIORefNum desiredRefNum; FSVolumeRefNum volumeRefNum; FSIORefNum iterator; FSVolumeRefNum actualRefNum; FSRef * ref; FSForkInfo * forkInfo; HFSUniStr255 * forkName; }; typedef struct FSForkCBInfoParam FSForkCBInfoParam; typedef FSForkCBInfoParam * FSForkCBInfoParamPtr; struct FSRangeLockParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; FSIORefNum forkRefNum; UInt64 requestCount; UInt16 positionMode; SInt64 positionOffset; UInt64 rangeStart; }; typedef struct FSRangeLockParam FSRangeLockParam; typedef FSRangeLockParam * FSRangeLockParamPtr; typedef UInt32 FSVolumeInfoBitmap; enum { kFSVolInfoNone = 0x0000, kFSVolInfoCreateDate = 0x0001, kFSVolInfoModDate = 0x0002, kFSVolInfoBackupDate = 0x0004, kFSVolInfoCheckedDate = 0x0008, kFSVolInfoFileCount = 0x0010, kFSVolInfoDirCount = 0x0020, kFSVolInfoSizes = 0x0040, kFSVolInfoBlocks = 0x0080, kFSVolInfoNextAlloc = 0x0100, kFSVolInfoRsrcClump = 0x0200, kFSVolInfoDataClump = 0x0400, kFSVolInfoNextID = 0x0800, kFSVolInfoFinderInfo = 0x1000, kFSVolInfoFlags = 0x2000, kFSVolInfoFSInfo = 0x4000, kFSVolInfoDriveInfo = 0x8000, kFSVolInfoGettableInfo = 0xFFFF, kFSVolInfoSettableInfo = 0x3004 }; enum { kFSVolFlagDefaultVolumeBit = 5, kFSVolFlagDefaultVolumeMask = 0x0020, kFSVolFlagFilesOpenBit = 6, kFSVolFlagFilesOpenMask = 0x0040, kFSVolFlagHardwareLockedBit = 7, kFSVolFlagHardwareLockedMask = 0x0080, kFSVolFlagJournalingActiveBit = 14, kFSVolFlagJournalingActiveMask = 0x4000, kFSVolFlagSoftwareLockedBit = 15, kFSVolFlagSoftwareLockedMask = 0x8000 }; struct FSVolumeInfo { UTCDateTime createDate; UTCDateTime modifyDate; UTCDateTime backupDate; UTCDateTime checkedDate; UInt32 fileCount; UInt32 folderCount; UInt64 totalBytes; UInt64 freeBytes; UInt32 blockSize; UInt32 totalBlocks; UInt32 freeBlocks; UInt32 nextAllocation; UInt32 rsrcClumpSize; UInt32 dataClumpSize; UInt32 nextCatalogID; UInt8 finderInfo[32]; UInt16 flags; UInt16 filesystemID; UInt16 signature; UInt16 driveNumber; FSIORefNum driverRefNum; }; typedef struct FSVolumeInfo FSVolumeInfo; typedef FSVolumeInfo * FSVolumeInfoPtr; struct FSVolumeInfoParam { QElemPtr qLink; SInt16 qType; SInt16 ioTrap; Ptr ioCmdAddr; IOCompletionUPP ioCompletion; volatile OSErr ioResult; StringPtr ioNamePtr; FSVolumeRefNum ioVRefNum; UInt32 volumeIndex; FSVolumeInfoBitmap whichInfo; FSVolumeInfo * volumeInfo; HFSUniStr255 * volumeName; FSRef * ref; }; typedef struct FSVolumeInfoParam FSVolumeInfoParam; typedef FSVolumeInfoParam * FSVolumeInfoParamPtr; struct GetVolParmsInfoBuffer { SInt16 vMVersion; SInt32 vMAttrib; Handle vMLocalHand; SInt32 vMServerAdr; SInt32 vMVolumeGrade; SInt16 vMForeignPrivID; SInt32 vMExtendedAttributes; void * vMDeviceID; UniCharCount vMMaxNameLength; }; typedef struct GetVolParmsInfoBuffer GetVolParmsInfoBuffer; typedef OSType VolumeType; enum { AppleShareMediaType = 'afpm' }; struct VolMountInfoHeader { SInt16 length; VolumeType media; }; typedef struct VolMountInfoHeader VolMountInfoHeader; typedef VolMountInfoHeader * VolMountInfoPtr; struct VolumeMountInfoHeader { SInt16 length; VolumeType media; SInt16 flags; }; typedef struct VolumeMountInfoHeader VolumeMountInfoHeader; typedef VolumeMountInfoHeader * VolumeMountInfoHeaderPtr; enum { volMountNoLoginMsgFlagBit = 0, volMountNoLoginMsgFlagMask = 0x0001, volMountExtendedFlagsBit = 7, volMountExtendedFlagsMask = 0x0080, volMountInteractBit = 15, volMountInteractMask = 0x8000, volMountChangedBit = 14, volMountChangedMask = 0x4000, volMountFSReservedMask = 0x00FF, volMountSysReservedMask = 0xFF00 }; struct AFPVolMountInfo { SInt16 length; VolumeType media; SInt16 flags; SInt8 nbpInterval; SInt8 nbpCount; SInt16 uamType; SInt16 zoneNameOffset; SInt16 serverNameOffset; SInt16 volNameOffset; SInt16 userNameOffset; SInt16 userPasswordOffset; SInt16 volPasswordOffset; char AFPData[144]; }; typedef struct AFPVolMountInfo AFPVolMountInfo; typedef AFPVolMountInfo * AFPVolMountInfoPtr; struct AFPXVolMountInfo { SInt16 length; VolumeType media; SInt16 flags; SInt8 nbpInterval; SInt8 nbpCount; SInt16 uamType; SInt16 zoneNameOffset; SInt16 serverNameOffset; SInt16 volNameOffset; SInt16 userNameOffset; SInt16 userPasswordOffset; SInt16 volPasswordOffset; SInt16 extendedFlags; SInt16 uamNameOffset; SInt16 alternateAddressOffset; char AFPData[176]; }; typedef struct AFPXVolMountInfo AFPXVolMountInfo; typedef AFPXVolMountInfo * AFPXVolMountInfoPtr; enum { kAFPExtendedFlagsAlternateAddressMask = 1 }; enum { kAFPTagTypeIP = 0x01, kAFPTagTypeIPPort = 0x02, kAFPTagTypeDDP = 0x03, kAFPTagTypeDNS = 0x04 }; enum { kAFPTagLengthIP = 0x06, kAFPTagLengthIPPort = 0x08, kAFPTagLengthDDP = 0x06 }; struct AFPTagData { UInt8 fLength; UInt8 fType; UInt8 fData[1]; }; typedef struct AFPTagData AFPTagData; struct AFPAlternateAddress { UInt8 fVersion; UInt8 fAddressCount; UInt8 fAddressList[1]; }; typedef struct AFPAlternateAddress AFPAlternateAddress; enum { kLargeIconSize = 256, kLarge4BitIconSize = 512, kLarge8BitIconSize = 1024, kSmallIconSize = 64, kSmall4BitIconSize = 128, kSmall8BitIconSize = 256 }; extern IOCompletionUPP NewIOCompletionUPP(IOCompletionProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeIOCompletionUPP(IOCompletionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void InvokeIOCompletionUPP( ParmBlkPtr paramBlock, IOCompletionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline IOCompletionUPP NewIOCompletionUPP(IOCompletionProcPtr userRoutine) { return userRoutine; } inline void DisposeIOCompletionUPP(IOCompletionUPP) { } inline void InvokeIOCompletionUPP(ParmBlkPtr paramBlock, IOCompletionUPP userUPP) { (*userUPP)(paramBlock); } extern OSErr FSMakeFSRefUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, TextEncoding textEncodingHint, FSRef *newRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBMakeFSRefUnicodeSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBMakeFSRefUnicodeAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCompareFSRefs(const FSRef *ref1, const FSRef *ref2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCompareFSRefsSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCompareFSRefsAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCreateFileUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo, FSRef *newRef, FSSpecPtr newSpec) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCreateFileUnicodeSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCreateFileUnicodeAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCreateDirectoryUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo, FSRef *newRef, FSSpecPtr newSpec, UInt32 *newDirID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCreateDirectoryUnicodeSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCreateDirectoryUnicodeAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSDeleteObject(const FSRef * ref) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBDeleteObjectSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBDeleteObjectAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSUnlinkObject(const FSRef * ref) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSErr PBUnlinkObjectSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern void PBUnlinkObjectAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSErr FSMoveObject(const FSRef *ref, const FSRef *destDirectory, FSRef *newRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBMoveObjectSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBMoveObjectAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSExchangeObjects(const FSRef *ref, const FSRef *destRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBExchangeObjectsSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBExchangeObjectsAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { kFSReplaceObjectDefaultOptions = 0, kFSReplaceObjectReplaceMetadata = 0x01, kFSReplaceObjectSaveOriginalAsABackup = 0x02, kFSReplaceObjectReplacePermissionInfo = 0x04, kFSReplaceObjectPreservePermissionInfo = 0x08, kFSReplaceObjectDoNotCheckObjectWriteAccess = 0x10 }; extern OSStatus FSReplaceObject(const FSRef *originalObject, const FSRef *replacementObject, CFStringRef newName, CFStringRef temporaryName, const FSRef *temporaryDirectory, OptionBits flags, FSRef *resultObject) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8,message="Use NSFileManager's -replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: instead. WARNING: FSReplaceObject does not work correctly in sandboxed apps."))); extern OSStatus FSPathReplaceObject(const char *originalObjectPath, const char *replacementObjectPath, CFStringRef newName, CFStringRef temporaryName, const char *temporaryDirectoryPath, OptionBits flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8,message="Use NSFileManager's -replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: instead. WARNING: FSPathReplaceObject does not work correctly in sandboxed apps."))); extern OSStatus FSGetTemporaryDirectoryForReplaceObject(const FSRef *originalObject, FSRef *temporaryDirectory, OptionBits flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSPathGetTemporaryDirectoryForReplaceObject(const char *originalObjectPath, char *temporaryDirectoryPath, UInt32 maxPathSize, OptionBits flags) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSErr FSRenameUnicode(const FSRef *ref, UniCharCount nameLength, const UniChar *name, TextEncoding textEncodingHint, FSRef *newRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBRenameUnicodeSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBRenameUnicodeAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfo, HFSUniStr255 *outName, FSSpecPtr fsSpec, FSRef *parentRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBGetCatalogInfoSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBGetCatalogInfoAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSSetCatalogInfo(const FSRef *ref, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBSetCatalogInfoSync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBSetCatalogInfoAsync(FSRefParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSOpenIterator(const FSRef *container, FSIteratorFlags iteratorFlags, FSIterator *iterator) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBOpenIteratorSync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBOpenIteratorAsync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCloseIterator(FSIterator iterator) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCloseIteratorSync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCloseIteratorAsync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetCatalogInfoBulk(FSIterator iterator, ItemCount maximumObjects, ItemCount *actualObjects, Boolean *containerChanged, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfos, FSRef *refs, FSSpecPtr specs, HFSUniStr255 *names) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBGetCatalogInfoBulkSync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBGetCatalogInfoBulkAsync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCatalogSearch(FSIterator iterator, const FSSearchParams *searchCriteria, ItemCount maximumObjects, ItemCount *actualObjects, Boolean *containerChanged, FSCatalogInfoBitmap whichInfo, FSCatalogInfo *catalogInfos, FSRef *refs, FSSpecPtr specs, HFSUniStr255 *names) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCatalogSearchSync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCatalogSearchAsync(FSCatalogBulkParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus FSCreateFileAndOpenForkUnicode(const FSRef *parentRef, UniCharCount nameLength, const UniChar *name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo *catalogInfo, UniCharCount forkNameLength, const UniChar *forkName, SInt8 permissions, FSIORefNum *forkRefNum, FSRef *newRef) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus PBCreateFileAndOpenForkUnicodeSync(FSRefForkIOParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern void PBCreateFileAndOpenForkUnicodeAsync(FSRefForkIOParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSErr FSCreateFork(const FSRef *ref, UniCharCount forkNameLength, const UniChar *forkName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCreateForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCreateForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSDeleteFork(const FSRef *ref, UniCharCount forkNameLength, const UniChar *forkName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBDeleteForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBDeleteForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSIterateForks(const FSRef *ref, CatPositionRec *forkIterator, HFSUniStr255 *forkName, SInt64 *forkSize, UInt64 *forkPhysicalSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBIterateForksSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBIterateForksAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSOpenFork(const FSRef *ref, UniCharCount forkNameLength, const UniChar *forkName, SInt8 permissions, FSIORefNum *forkRefNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBOpenForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBOpenForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSReadFork(FSIORefNum forkRefNum, UInt16 positionMode, SInt64 positionOffset, ByteCount requestCount, void *buffer, ByteCount *actualCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBReadForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBReadForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSWriteFork(FSIORefNum forkRefNum, UInt16 positionMode, SInt64 positionOffset, ByteCount requestCount, const void *buffer, ByteCount *actualCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBWriteForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBWriteForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetForkPosition(FSIORefNum forkRefNum, SInt64 *position) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBGetForkPositionSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBGetForkPositionAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSSetForkPosition(FSIORefNum forkRefNum, UInt16 positionMode, SInt64 positionOffset) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBSetForkPositionSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBSetForkPositionAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetForkSize(FSIORefNum forkRefNum, SInt64 *forkSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBGetForkSizeSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBGetForkSizeAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSSetForkSize(FSIORefNum forkRefNum, UInt16 positionMode, SInt64 positionOffset) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBSetForkSizeSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBSetForkSizeAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSAllocateFork(FSIORefNum forkRefNum, FSAllocationFlags flags, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount, UInt64 *actualCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBAllocateForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBAllocateForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSFlushFork(FSIORefNum forkRefNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBFlushForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBFlushForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCloseFork(FSIORefNum forkRefNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBCloseForkSync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBCloseForkAsync(FSForkIOParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetForkCBInfo(FSIORefNum desiredRefNum, FSVolumeRefNum volume, short *iterator, FSIORefNum *actualRefNum, FSForkInfo *forkInfo, FSRef *ref, HFSUniStr255 *outForkName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBGetForkCBInfoSync(FSForkCBInfoParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBGetForkCBInfoAsync(FSForkCBInfoParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus FSLockRange(FSIORefNum forkRefNum, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount, UInt64 *rangeStart) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus PBXLockRangeSync(FSRangeLockParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus PBXLockRangeAsync(FSRangeLockParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSUnlockRange(FSIORefNum forkRefNum, UInt16 positionMode, SInt64 positionOffset, UInt64 requestCount, UInt64 *rangeStart) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus PBXUnlockRangeSync(FSRangeLockParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus PBXUnlockRangeAsync(FSRangeLockParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSErr FSGetVolumeInfo(FSVolumeRefNum volume, ItemCount volumeIndex, FSVolumeRefNum *actualVolume, FSVolumeInfoBitmap whichInfo, FSVolumeInfo *info, HFSUniStr255 *volumeName, FSRef *rootDirectory) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBGetVolumeInfoSync(FSVolumeInfoParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBGetVolumeInfoAsync(FSVolumeInfoParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSSetVolumeInfo(FSVolumeRefNum volume, FSVolumeInfoBitmap whichInfo, const FSVolumeInfo *info) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr PBSetVolumeInfoSync(FSVolumeInfoParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void PBSetVolumeInfoAsync(FSVolumeInfoParam * paramBlock) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetDataForkName(HFSUniStr255 * dataForkName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSGetResourceForkName(HFSUniStr255 * resourceForkName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus FSRefMakePath(const FSRef *ref, UInt8 *path, UInt32 pathBufferSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus FSPathMakeRef(const UInt8 *path, FSRef *ref, Boolean *isDirectory) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { kFSPathMakeRefDefaultOptions = 0, kFSPathMakeRefDoNotFollowLeafSymlink = 0x01 }; extern OSStatus FSPathMakeRefWithOptions(const UInt8 *path, OptionBits options, FSRef *ref, Boolean *isDirectory) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern Boolean FSIsFSRefValid(const FSRef * ref) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); typedef UInt32 FNMessage; enum { kFNDirectoryModifiedMessage = 1 }; extern OSStatus FNNotify(const FSRef *ref, FNMessage message, OptionBits flags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus FNNotifyByPath(const UInt8 *path, FNMessage message, OptionBits flags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus FNNotifyAll(FNMessage message, OptionBits flags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); typedef struct OpaqueFNSubscriptionRef* FNSubscriptionRef; enum { kFNNoImplicitAllSubscription = (1 << 0), kFNNotifyInBackground = (1 << 1) }; typedef void ( * FNSubscriptionProcPtr)(FNMessage message, OptionBits flags, void *refcon, FNSubscriptionRef subscription); typedef FNSubscriptionProcPtr FNSubscriptionUPP; extern FNSubscriptionUPP NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern void DisposeFNSubscriptionUPP(FNSubscriptionUPP userUPP) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern void InvokeFNSubscriptionUPP( FNMessage message, OptionBits flags, void * refcon, FNSubscriptionRef subscription, FNSubscriptionUPP userUPP) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); inline FNSubscriptionUPP NewFNSubscriptionUPP(FNSubscriptionProcPtr userRoutine) { return userRoutine; } inline void DisposeFNSubscriptionUPP(FNSubscriptionUPP) { } inline void InvokeFNSubscriptionUPP(FNMessage message, OptionBits flags, void * refcon, FNSubscriptionRef subscription, FNSubscriptionUPP userUPP) { (*userUPP)(message, flags, refcon, subscription); } extern OSStatus FNSubscribe(const FSRef *directoryRef, FNSubscriptionUPP callback, void *refcon, OptionBits flags, FNSubscriptionRef *subscription) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern OSStatus FNSubscribeByPath(const UInt8 *directoryPath, FNSubscriptionUPP callback, void *refcon, OptionBits flags, FNSubscriptionRef *subscription) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern OSStatus FNUnsubscribe(FNSubscriptionRef subscription) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); extern OSStatus FNGetDirectoryForSubscription(FNSubscriptionRef subscription, FSRef *ref) __attribute__((availability(macosx,introduced=10.1,deprecated=10.8))); enum { kAsyncMountInProgress = 1, kAsyncMountComplete = 2, kAsyncUnmountInProgress = 3, kAsyncUnmountComplete = 4, kAsyncEjectInProgress = 5, kAsyncEjectComplete = 6 }; typedef UInt32 FSMountStatus; typedef UInt32 FSEjectStatus; typedef UInt32 FSUnmountStatus; typedef struct OpaqueFSVolumeOperation* FSVolumeOperation; typedef void ( * FSVolumeMountProcPtr)(FSVolumeOperation volumeOp, void *clientData, OSStatus err, FSVolumeRefNum mountedVolumeRefNum); typedef void ( * FSVolumeUnmountProcPtr)(FSVolumeOperation volumeOp, void *clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter); typedef void ( * FSVolumeEjectProcPtr)(FSVolumeOperation volumeOp, void *clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter); typedef FSVolumeMountProcPtr FSVolumeMountUPP; typedef FSVolumeUnmountProcPtr FSVolumeUnmountUPP; typedef FSVolumeEjectProcPtr FSVolumeEjectUPP; extern FSVolumeMountUPP NewFSVolumeMountUPP(FSVolumeMountProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern FSVolumeUnmountUPP NewFSVolumeUnmountUPP(FSVolumeUnmountProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern FSVolumeEjectUPP NewFSVolumeEjectUPP(FSVolumeEjectProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern void DisposeFSVolumeMountUPP(FSVolumeMountUPP userUPP) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern void DisposeFSVolumeUnmountUPP(FSVolumeUnmountUPP userUPP) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern void DisposeFSVolumeEjectUPP(FSVolumeEjectUPP userUPP) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern void InvokeFSVolumeMountUPP( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum mountedVolumeRefNum, FSVolumeMountUPP userUPP) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern void InvokeFSVolumeUnmountUPP( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter, FSVolumeUnmountUPP userUPP) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern void InvokeFSVolumeEjectUPP( FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter, FSVolumeEjectUPP userUPP) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); inline FSVolumeMountUPP NewFSVolumeMountUPP(FSVolumeMountProcPtr userRoutine) { return userRoutine; } inline FSVolumeUnmountUPP NewFSVolumeUnmountUPP(FSVolumeUnmountProcPtr userRoutine) { return userRoutine; } inline FSVolumeEjectUPP NewFSVolumeEjectUPP(FSVolumeEjectProcPtr userRoutine) { return userRoutine; } inline void DisposeFSVolumeMountUPP(FSVolumeMountUPP) { } inline void DisposeFSVolumeUnmountUPP(FSVolumeUnmountUPP) { } inline void DisposeFSVolumeEjectUPP(FSVolumeEjectUPP) { } inline void InvokeFSVolumeMountUPP(FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum mountedVolumeRefNum, FSVolumeMountUPP userUPP) { (*userUPP)(volumeOp, clientData, err, mountedVolumeRefNum); } inline void InvokeFSVolumeUnmountUPP(FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter, FSVolumeUnmountUPP userUPP) { (*userUPP)(volumeOp, clientData, err, volumeRefNum, dissenter); } inline void InvokeFSVolumeEjectUPP(FSVolumeOperation volumeOp, void * clientData, OSStatus err, FSVolumeRefNum volumeRefNum, pid_t dissenter, FSVolumeEjectUPP userUPP) { (*userUPP)(volumeOp, clientData, err, volumeRefNum, dissenter); } enum { kFSMountServerMarkDoNotDisplay = (1 << 0), kFSMountServerMountOnMountDir = (1 << 2), kFSMountServerSuppressConnectionUI = (1 << 6) }; enum { kFSMountServerMountWithoutNotification = (1 << 1) }; enum { kFSEjectVolumeForceEject = (1 << 0) }; enum { kFSUnmountVolumeForceUnmount = (1 << 0) }; extern OSStatus FSCreateVolumeOperation(FSVolumeOperation * volumeOp) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSDisposeVolumeOperation(FSVolumeOperation volumeOp) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSMountLocalVolumeSync(CFStringRef diskID, CFURLRef mountDir, FSVolumeRefNum *mountedVolumeRefNum, OptionBits flags) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSMountLocalVolumeAsync(CFStringRef diskID, CFURLRef mountDir, FSVolumeOperation volumeOp, void *clientData, OptionBits flags, FSVolumeMountUPP callback, CFRunLoopRef runloop, CFStringRef runloopMode) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSMountServerVolumeSync(CFURLRef url, CFURLRef mountDir, CFStringRef user, CFStringRef password, FSVolumeRefNum *mountedVolumeRefNum, OptionBits flags) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSMountServerVolumeAsync(CFURLRef url, CFURLRef mountDir, CFStringRef user, CFStringRef password, FSVolumeOperation volumeOp, void *clientData, OptionBits flags, FSVolumeMountUPP callback, CFRunLoopRef runloop, CFStringRef runloopMode) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSGetAsyncMountStatus(FSVolumeOperation volumeOp, FSMountStatus *status, OSStatus *volumeOpStatus, FSVolumeRefNum *mountedVolumeRefNum, void **clientData) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSUnmountVolumeSync(FSVolumeRefNum vRefNum, OptionBits flags, pid_t *dissenter) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSUnmountVolumeAsync(FSVolumeRefNum vRefNum, OptionBits flags, FSVolumeOperation volumeOp, void *clientData, FSVolumeUnmountUPP callback, CFRunLoopRef runloop, CFStringRef runloopMode) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSGetAsyncUnmountStatus(FSVolumeOperation volumeOp, FSUnmountStatus *status, OSStatus *volumeOpStatus, FSVolumeRefNum *volumeRefNum, pid_t *dissenter, void **clientData) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSCancelVolumeOperation(FSVolumeOperation volumeOp) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSEjectVolumeSync(FSVolumeRefNum vRefNum, OptionBits flags, pid_t *dissenter) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSEjectVolumeAsync(FSVolumeRefNum vRefNum, OptionBits flags, FSVolumeOperation volumeOp, void *clientData, FSVolumeEjectUPP callback, CFRunLoopRef runloop, CFStringRef runloopMode) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSGetAsyncEjectStatus(FSVolumeOperation volumeOp, FSEjectStatus *status, OSStatus *volumeOpStatus, FSVolumeRefNum *volumeRefNum, pid_t *dissenter, void **clientData) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSCopyDiskIDForVolume(FSVolumeRefNum vRefNum, CFStringRef *diskID) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSCopyURLForVolume(FSVolumeRefNum vRefNum, CFURLRef *url) __attribute__((availability(macosx,introduced=10.3,deprecated=10.8))); extern OSStatus FSGetVolumeForDiskID(CFStringRef diskID, FSVolumeRefNum *vRefNum) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSCopyDADiskForVolume(FSVolumeRefNum vRefNum, DADiskRef *disk) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSGetVolumeForDADisk(DADiskRef disk, FSVolumeRefNum *vRefNum) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); typedef struct __FSFileOperation* FSFileOperationRef; typedef UInt32 FSFileOperationStage; struct FSFileOperationClientContext { CFIndex version; void * info; CFAllocatorRetainCallBack retain; CFAllocatorReleaseCallBack release; CFAllocatorCopyDescriptionCallBack copyDescription; }; typedef struct FSFileOperationClientContext FSFileOperationClientContext; typedef void ( * FSFileOperationStatusProcPtr)(FSFileOperationRef fileOp, const FSRef *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info); typedef void ( * FSPathFileOperationStatusProcPtr)(FSFileOperationRef fileOp, const char *currentItem, FSFileOperationStage stage, OSStatus error, CFDictionaryRef statusDictionary, void *info); enum { kFSFileOperationDefaultOptions = 0, kFSFileOperationOverwrite = 0x01, kFSFileOperationSkipSourcePermissionErrors = 0x02, kFSFileOperationDoNotMoveAcrossVolumes = 0x04, kFSFileOperationSkipPreflight = 0x08 }; enum { kFSOperationStageUndefined = 0, kFSOperationStagePreflighting = 1, kFSOperationStageRunning = 2, kFSOperationStageComplete = 3 }; extern const CFStringRef kFSOperationTotalBytesKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationBytesCompleteKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationBytesRemainingKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationTotalObjectsKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationObjectsCompleteKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationObjectsRemainingKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationTotalUserVisibleObjectsKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationUserVisibleObjectsCompleteKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationUserVisibleObjectsRemainingKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const CFStringRef kFSOperationThroughputKey __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSCopyObjectSync(const FSRef *source, const FSRef *destDir, CFStringRef destName, FSRef *target, OptionBits options) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSMoveObjectSync(const FSRef *source, const FSRef *destDir, CFStringRef destName, FSRef *target, OptionBits options) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSMoveObjectToTrashSync(const FSRef *source, FSRef *target, OptionBits options) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSPathCopyObjectSync(const char *sourcePath, const char *destDirPath, CFStringRef destName, char **targetPath, OptionBits options) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSPathMoveObjectSync(const char *sourcePath, const char *destDirPath, CFStringRef destName, char **targetPath, OptionBits options) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSPathMoveObjectToTrashSync(const char *sourcePath, char **targetPath, OptionBits options) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern CFTypeID FSFileOperationGetTypeID(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern FSFileOperationRef FSFileOperationCreate(CFAllocatorRef alloc) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileOperationScheduleWithRunLoop(FSFileOperationRef fileOp, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileOperationUnscheduleFromRunLoop(FSFileOperationRef fileOp, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSCopyObjectAsync(FSFileOperationRef fileOp, const FSRef *source, const FSRef *destDir, CFStringRef destName, OptionBits flags, FSFileOperationStatusProcPtr callback, CFTimeInterval statusChangeInterval, FSFileOperationClientContext *clientContext) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSMoveObjectAsync(FSFileOperationRef fileOp, const FSRef *source, const FSRef *destDir, CFStringRef destName, OptionBits flags, FSFileOperationStatusProcPtr callback, CFTimeInterval statusChangeInterval, FSFileOperationClientContext *clientContext) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSMoveObjectToTrashAsync(FSFileOperationRef fileOp, const FSRef *source, OptionBits flags, FSFileOperationStatusProcPtr callback, CFTimeInterval statusChangeInterval, FSFileOperationClientContext *clientContext) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSPathCopyObjectAsync(FSFileOperationRef fileOp, const char *sourcePath, const char *destDirPath, CFStringRef destName, OptionBits flags, FSPathFileOperationStatusProcPtr callback, CFTimeInterval statusChangeInterval, FSFileOperationClientContext *clientContext) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSPathMoveObjectAsync(FSFileOperationRef fileOp, const char *sourcePath, const char *destDirPath, CFStringRef destName, OptionBits flags, FSPathFileOperationStatusProcPtr callback, CFTimeInterval statusChangeInterval, FSFileOperationClientContext *clientContext) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSPathMoveObjectToTrashAsync(FSFileOperationRef fileOp, const char *sourcePath, OptionBits flags, FSPathFileOperationStatusProcPtr callback, CFTimeInterval statusChangeInterval, FSFileOperationClientContext *clientContext) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSFileOperationCancel(FSFileOperationRef fileOp) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileOperationCopyStatus(FSFileOperationRef fileOp, FSRef *currentItem, FSFileOperationStage *stage, OSStatus *error, CFDictionaryRef *statusDictionary, void **info) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSPathFileOperationCopyStatus(FSFileOperationRef fileOp, char **currentItem, FSFileOperationStage *stage, OSStatus *error, CFDictionaryRef *statusDictionary, void **info) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern CFStringRef FSCreateStringFromHFSUniStr(CFAllocatorRef alloc, const HFSUniStr255 *uniStr) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSGetHFSUniStrFromString(CFStringRef theString, HFSUniStr255 *uniStr) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern CFTypeID FSFileSecurityGetTypeID(void) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern FSFileSecurityRef FSFileSecurityCreate(CFAllocatorRef alloc) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern FSFileSecurityRef FSFileSecurityCreateWithFSPermissionInfo(CFAllocatorRef alloc, const FSPermissionInfo *permissions) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern FSFileSecurityRef FSFileSecurityRefCreateCopy(CFAllocatorRef alloc, FSFileSecurityRef fileSec) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecurityGetOwnerUUID(FSFileSecurityRef fileSec, CFUUIDBytes *owner) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecuritySetOwnerUUID(FSFileSecurityRef fileSec, const CFUUIDBytes *owner) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecurityGetGroupUUID(FSFileSecurityRef fileSec, CFUUIDBytes *group) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecuritySetGroupUUID(FSFileSecurityRef fileSec, const CFUUIDBytes *group) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecurityCopyAccessControlList(FSFileSecurityRef fileSec, acl_t *accessControlList) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecuritySetAccessControlList(FSFileSecurityRef fileSec, acl_t accessControlList) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecurityGetOwner(FSFileSecurityRef fileSec, UInt32 *owner) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecuritySetOwner(FSFileSecurityRef fileSec, UInt32 owner) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecurityGetGroup(FSFileSecurityRef fileSec, UInt32 *group) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecuritySetGroup(FSFileSecurityRef fileSec, UInt32 group) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecurityGetMode(FSFileSecurityRef fileSec, UInt16 *mode) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSStatus FSFileSecuritySetMode(FSFileSecurityRef fileSec, UInt16 mode) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); enum { pleaseCacheBit = 4, pleaseCacheMask = 0x0010, noCacheBit = 5, noCacheMask = 0x0020, rdVerifyBit = 6, rdVerifyMask = 0x0040, rdVerify = 64, forceReadBit = 6, forceReadMask = 0x0040, newLineBit = 7, newLineMask = 0x0080, newLineCharMask = 0xFF00 }; enum { kOwnerID2Name = 1, kGroupID2Name = 2, kOwnerName2ID = 3, kGroupName2ID = 4, kReturnNextUser = 1, kReturnNextGroup = 2, kReturnNextUG = 3 }; enum { kVCBFlagsIdleFlushBit = 3, kVCBFlagsIdleFlushMask = 0x0008, kVCBFlagsHFSPlusAPIsBit = 4, kVCBFlagsHFSPlusAPIsMask = 0x0010, kVCBFlagsHardwareGoneBit = 5, kVCBFlagsHardwareGoneMask = 0x0020, kVCBFlagsVolumeDirtyBit = 15, kVCBFlagsVolumeDirtyMask = 0x8000 }; enum { kioVAtrbDefaultVolumeBit = 5, kioVAtrbDefaultVolumeMask = 0x0020, kioVAtrbFilesOpenBit = 6, kioVAtrbFilesOpenMask = 0x0040, kioVAtrbHardwareLockedBit = 7, kioVAtrbHardwareLockedMask = 0x0080, kioVAtrbSoftwareLockedBit = 15, kioVAtrbSoftwareLockedMask = 0x8000 }; enum { kioFlAttribLockedBit = 0, kioFlAttribLockedMask = 0x01, kioFlAttribResOpenBit = 2, kioFlAttribResOpenMask = 0x04, kioFlAttribDataOpenBit = 3, kioFlAttribDataOpenMask = 0x08, kioFlAttribDirBit = 4, kioFlAttribDirMask = 0x10, ioDirFlg = 4, ioDirMask = 0x10, kioFlAttribCopyProtBit = 6, kioFlAttribCopyProtMask = 0x40, kioFlAttribFileOpenBit = 7, kioFlAttribFileOpenMask = 0x80, kioFlAttribInSharedBit = 2, kioFlAttribInSharedMask = 0x04, kioFlAttribMountedBit = 3, kioFlAttribMountedMask = 0x08, kioFlAttribSharePointBit = 5, kioFlAttribSharePointMask = 0x20 }; enum { kioFCBWriteBit = 8, kioFCBWriteMask = 0x0100, kioFCBResourceBit = 9, kioFCBResourceMask = 0x0200, kioFCBWriteLockedBit = 10, kioFCBWriteLockedMask = 0x0400, kioFCBLargeFileBit = 11, kioFCBLargeFileMask = 0x0800, kioFCBSharedWriteBit = 12, kioFCBSharedWriteMask = 0x1000, kioFCBFileLockedBit = 13, kioFCBFileLockedMask = 0x2000, kioFCBOwnClumpBit = 14, kioFCBOwnClumpMask = 0x4000, kioFCBModifiedBit = 15, kioFCBModifiedMask = 0x8000 }; enum { kForkInfoFlagsWriteBit = (kioFCBWriteBit - 8), kForkInfoFlagsWriteMask = (1 << kForkInfoFlagsWriteBit), kForkInfoFlagsResourceBit = (kioFCBResourceBit - 8), kForkInfoFlagsResourceMask = (1 << kForkInfoFlagsResourceBit), kForkInfoFlagsWriteLockedBit = (kioFCBWriteLockedBit - 8), kForkInfoFlagsWriteLockedMask = (1 << kForkInfoFlagsWriteLockedBit), kForkInfoFlagsLargeFileBit = (kioFCBLargeFileBit - 8), kForkInfoFlagsLargeFileMask = (1 << kForkInfoFlagsLargeFileBit), kForkInfoFlagsSharedWriteBit = (kioFCBSharedWriteBit - 8), kForkInfoFlagsSharedWriteMask = (1 << kForkInfoFlagsSharedWriteBit), kForkInfoFlagsFileLockedBit = (kioFCBFileLockedBit - 8), kForkInfoFlagsFileLockedMask = (1 << kForkInfoFlagsFileLockedBit), kForkInfoFlagsOwnClumpBit = (kioFCBOwnClumpBit - 8), kForkInfoFlagsOwnClumpMask = (1 << kForkInfoFlagsOwnClumpBit), kForkInfoFlagsModifiedBit = (kioFCBModifiedBit - 8), kForkInfoFlagsModifiedMask = (1 << kForkInfoFlagsModifiedBit) }; enum { kioACUserNoSeeFolderBit = 0, kioACUserNoSeeFolderMask = 0x01, kioACUserNoSeeFilesBit = 1, kioACUserNoSeeFilesMask = 0x02, kioACUserNoMakeChangesBit = 2, kioACUserNoMakeChangesMask = 0x04, kioACUserNotOwnerBit = 7, kioACUserNotOwnerMask = 0x80 }; enum { kioACAccessOwnerBit = 31, kioACAccessOwnerMask = (int)0x80000000, kioACAccessBlankAccessBit = 28, kioACAccessBlankAccessMask = 0x10000000, kioACAccessUserWriteBit = 26, kioACAccessUserWriteMask = 0x04000000, kioACAccessUserReadBit = 25, kioACAccessUserReadMask = 0x02000000, kioACAccessUserSearchBit = 24, kioACAccessUserSearchMask = 0x01000000, kioACAccessEveryoneWriteBit = 18, kioACAccessEveryoneWriteMask = 0x00040000, kioACAccessEveryoneReadBit = 17, kioACAccessEveryoneReadMask = 0x00020000, kioACAccessEveryoneSearchBit = 16, kioACAccessEveryoneSearchMask = 0x00010000, kioACAccessGroupWriteBit = 10, kioACAccessGroupWriteMask = 0x00000400, kioACAccessGroupReadBit = 9, kioACAccessGroupReadMask = 0x00000200, kioACAccessGroupSearchBit = 8, kioACAccessGroupSearchMask = 0x00000100, kioACAccessOwnerWriteBit = 2, kioACAccessOwnerWriteMask = 0x00000004, kioACAccessOwnerReadBit = 1, kioACAccessOwnerReadMask = 0x00000002, kioACAccessOwnerSearchBit = 0, kioACAccessOwnerSearchMask = 0x00000001, kfullPrivileges = 0x00070007, kownerPrivileges = 0x00000007 }; extern OSStatus FSGetVolumeParms(FSVolumeRefNum volume, GetVolParmsInfoBuffer *buffer, ByteCount bufferSize) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSGetVolumeMountInfoSize(FSVolumeRefNum volume, ByteCount *size) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSGetVolumeMountInfo(FSVolumeRefNum volume, BytePtr buffer, ByteCount bufferSize, ByteCount *actualSize) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSVolumeMount(BytePtr buffer, FSVolumeRefNum *mountedVolume) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSFlushVolume(FSVolumeRefNum vRefNum) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus PBFlushVolumeSync(FSRefParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus PBFlushVolumeAsync(FSRefParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus PBFSCopyFileSync(FSRefParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus PBFSCopyFileAsync(FSRefParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSResolveNodeID(FSVolumeRefNum volume, UInt32 nodeID, FSRefPtr newRef) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus PBFSResolveNodeIDSync(FSRefParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus PBFSResolveNodeIDAsync(FSRefParamPtr paramBlock) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); #pragma pack(pop) } extern "C" { typedef SInt16 ResID; typedef SInt16 ResAttributes; typedef SInt16 ResFileAttributes; typedef SInt16 ResourceCount; typedef SInt16 ResourceIndex; typedef FSIORefNum ResFileRefNum; enum { resSysRefBit = 7, resSysHeapBit = 6, resPurgeableBit = 5, resLockedBit = 4, resProtectedBit = 3, resPreloadBit = 2, resChangedBit = 1 }; enum { resSysHeap = 64, resPurgeable = 32, resLocked = 16, resProtected = 8, resPreload = 4, resChanged = 2 }; enum { mapReadOnlyBit = 7, mapCompactBit = 6, mapChangedBit = 5 }; enum { mapReadOnly = 128, mapCompact = 64, mapChanged = 32 }; enum { kResFileNotOpened = -1, kSystemResFile = 0 }; typedef void ( * ResErrProcPtr)(OSErr thErr); typedef ResErrProcPtr ResErrUPP; extern ResErrUPP NewResErrUPP(ResErrProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeResErrUPP(ResErrUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void InvokeResErrUPP( OSErr thErr, ResErrUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline ResErrUPP NewResErrUPP(ResErrProcPtr userRoutine) { return userRoutine; } inline void DisposeResErrUPP(ResErrUPP) { } inline void InvokeResErrUPP(OSErr thErr, ResErrUPP userUPP) { (*userUPP)(thErr); } typedef OSErr ( * ResourceEndianFilterPtr)(Handle theResource, Boolean currentlyNativeEndian); extern void CloseResFile(ResFileRefNum refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr ResError(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResFileRefNum CurResFile(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResFileRefNum HomeResFile(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void UseResFile(ResFileRefNum refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResourceCount CountTypes(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResourceCount Count1Types(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void GetIndType( ResType * theType, ResourceIndex itemIndex) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void Get1IndType( ResType * theType, ResourceIndex itemIndex) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetResLoad(Boolean load) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResourceCount CountResources(ResType theType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResourceCount Count1Resources(ResType theType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle GetIndResource( ResType theType, ResourceIndex itemIndex) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle Get1IndResource( ResType theType, ResourceIndex itemIndex) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle GetResource( ResType theType, ResID theID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle Get1Resource( ResType theType, ResID theID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle GetNamedResource( ResType theType, ConstStr255Param name) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle Get1NamedResource( ResType theType, ConstStr255Param name) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LoadResource(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void ReleaseResource(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DetachResource(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResID UniqueID(ResType theType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResID Unique1ID(ResType theType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResAttributes GetResAttrs(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void GetResInfo( Handle theResource, ResID * theID, ResType * theType, Str255 name) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetResInfo( Handle theResource, ResID theID, ConstStr255Param name) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void AddResource( Handle theData, ResType theType, ResID theID, ConstStr255Param name) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long GetResourceSizeOnDisk(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long GetMaxResourceSize(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetResAttrs( Handle theResource, ResAttributes attrs) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void ChangedResource(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void RemoveResource(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void UpdateResFile(ResFileRefNum refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void WriteResource(Handle theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetResPurge(Boolean install) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResFileAttributes GetResFileAttrs(ResFileRefNum refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetResFileAttrs( ResFileRefNum refNum, ResFileAttributes attrs) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void ReadPartialResource( Handle theResource, long offset, void * buffer, long count) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void WritePartialResource( Handle theResource, long offset, const void * buffer, long count) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetResourceSize( Handle theResource, long newSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle GetNextFOND(Handle fondHandle) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); typedef SInt16 RsrcChainLocation; enum { kRsrcChainBelowSystemMap = 0, kRsrcChainBelowApplicationMap = 1, kRsrcChainAboveApplicationMap = 2, kRsrcChainAboveAllMaps = 4 }; extern OSErr InsertResourceFile( ResFileRefNum refNum, RsrcChainLocation where) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr DetachResourceFile(ResFileRefNum refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetTopResourceFile(ResFileRefNum * refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetNextResourceFile( ResFileRefNum curRefNum, ResFileRefNum * nextRefNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResFileRefNum FSOpenResFile( const FSRef * ref, SInt8 permission) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void FSCreateResFile( const FSRef * parentRef, UniCharCount nameLength, const UniChar * name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo * catalogInfo, FSRef * newRef, FSSpecPtr newSpec) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean FSResourceFileAlreadyOpen( const FSRef * resourceFileRef, Boolean * inChain, ResFileRefNum * refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSOpenOrphanResFile( const FSRef * ref, SignedByte permission, ResFileRefNum * refNum) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSErr FSCreateResourceFile( const FSRef * parentRef, UniCharCount nameLength, const UniChar * name, FSCatalogInfoBitmap whichInfo, const FSCatalogInfo * catalogInfo, UniCharCount forkNameLength, const UniChar * forkName, FSRef * newRef, FSSpecPtr newSpec) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSCreateResourceFork( const FSRef * ref, UniCharCount forkNameLength, const UniChar * forkName, UInt32 flags) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSErr FSOpenResourceFile( const FSRef * ref, UniCharCount forkNameLength, const UniChar * forkName, SInt8 permissions, ResFileRefNum * refNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); } extern "C" { #pragma pack(push, 2) enum { kAppleManufacturer = 'appl', kComponentResourceType = 'thng', kComponentAliasResourceType = 'thga' }; enum { kAnyComponentType = 0, kAnyComponentSubType = 0, kAnyComponentManufacturer = 0, kAnyComponentFlagsMask = 0 }; enum { cmpThreadSafe = 1UL << 28, cmpIsMissing = 1UL << 29, cmpWantsRegisterMessage = 1UL << 31 }; enum { kComponentOpenSelect = -1, kComponentCloseSelect = -2, kComponentCanDoSelect = -3, kComponentVersionSelect = -4, kComponentRegisterSelect = -5, kComponentTargetSelect = -6, kComponentUnregisterSelect = -7, kComponentGetMPWorkFunctionSelect = -8, kComponentExecuteWiredActionSelect = -9, kComponentGetPublicResourceSelect = -10 }; enum { componentDoAutoVersion = (1 << 0), componentWantsUnregister = (1 << 1), componentAutoVersionIncludeFlags = (1 << 2), componentHasMultiplePlatforms = (1 << 3), componentLoadResident = (1 << 4) }; enum { defaultComponentIdentical = 0, defaultComponentAnyFlags = 1, defaultComponentAnyManufacturer = 2, defaultComponentAnySubType = 4, defaultComponentAnyFlagsAnyManufacturer = (defaultComponentAnyFlags + defaultComponentAnyManufacturer), defaultComponentAnyFlagsAnyManufacturerAnySubType = (defaultComponentAnyFlags + defaultComponentAnyManufacturer + defaultComponentAnySubType) }; enum { registerComponentGlobal = 1, registerComponentNoDuplicates = 2, registerComponentAfterExisting = 4, registerComponentAliasesOnly = 8 }; struct ComponentDescription { OSType componentType; OSType componentSubType; OSType componentManufacturer; UInt32 componentFlags; UInt32 componentFlagsMask; }; typedef struct ComponentDescription ComponentDescription; struct ResourceSpec { OSType resType; SInt16 resID; }; typedef struct ResourceSpec ResourceSpec; struct ComponentResource { ComponentDescription cd; ResourceSpec component; ResourceSpec componentName; ResourceSpec componentInfo; ResourceSpec componentIcon; }; typedef struct ComponentResource ComponentResource; typedef ComponentResource * ComponentResourcePtr; typedef ComponentResourcePtr * ComponentResourceHandle; struct ComponentPlatformInfo { SInt32 componentFlags; ResourceSpec component; SInt16 platformType; }; typedef struct ComponentPlatformInfo ComponentPlatformInfo; struct ComponentResourceExtension { SInt32 componentVersion; SInt32 componentRegisterFlags; SInt16 componentIconFamily; }; typedef struct ComponentResourceExtension ComponentResourceExtension; struct ComponentPlatformInfoArray { SInt32 count; ComponentPlatformInfo platformArray[1]; }; typedef struct ComponentPlatformInfoArray ComponentPlatformInfoArray; struct ExtComponentResource { ComponentDescription cd; ResourceSpec component; ResourceSpec componentName; ResourceSpec componentInfo; ResourceSpec componentIcon; SInt32 componentVersion; SInt32 componentRegisterFlags; SInt16 componentIconFamily; SInt32 count; ComponentPlatformInfo platformArray[1]; }; typedef struct ExtComponentResource ExtComponentResource; typedef ExtComponentResource * ExtComponentResourcePtr; typedef ExtComponentResourcePtr * ExtComponentResourceHandle; struct ComponentAliasResource { ComponentResource cr; ComponentDescription aliasCD; }; typedef struct ComponentAliasResource ComponentAliasResource; struct ComponentParameters { UInt8 flags; UInt8 paramSize; SInt16 what; UInt32 padding; long params[1]; }; typedef struct ComponentParameters ComponentParameters; struct ComponentRecord { long data[1]; }; typedef struct ComponentRecord ComponentRecord; typedef ComponentRecord * Component; struct ComponentInstanceRecord { long data[1]; }; typedef struct ComponentInstanceRecord ComponentInstanceRecord; typedef ComponentInstanceRecord * ComponentInstance; struct RegisteredComponentRecord { long data[1]; }; typedef struct RegisteredComponentRecord RegisteredComponentRecord; typedef RegisteredComponentRecord * RegisteredComponentRecordPtr; struct RegisteredComponentInstanceRecord { long data[1]; }; typedef struct RegisteredComponentInstanceRecord RegisteredComponentInstanceRecord; typedef RegisteredComponentInstanceRecord * RegisteredComponentInstanceRecordPtr; typedef SInt32 ComponentResult; enum { platform68k = 1, platformPowerPC = 2, platformInterpreted = 3, platformWin32 = 4, platformPowerPCNativeEntryPoint = 5, platformIA32NativeEntryPoint = 6, platformPowerPC64NativeEntryPoint = 7, platformX86_64NativeEntryPoint = 8, platformArm64NativeEntryPoint = 9 }; enum { platformIRIXmips = 1000, platformSunOSsparc = 1100, platformSunOSintel = 1101, platformLinuxppc = 1200, platformLinuxintel = 1201, platformAIXppc = 1300, platformNeXTIntel = 1400, platformNeXTppc = 1401, platformNeXTsparc = 1402, platformNeXT68k = 1403, platformMacOSx86 = 1500 }; enum { mpWorkFlagDoWork = (1 << 0), mpWorkFlagDoCompletion = (1 << 1), mpWorkFlagCopyWorkBlock = (1 << 2), mpWorkFlagDontBlock = (1 << 3), mpWorkFlagGetProcessorCount = (1 << 4), mpWorkFlagGetIsRunning = (1 << 6) }; enum { cmpAliasNoFlags = 0, cmpAliasOnlyThisFile = 1 }; typedef UInt32 CSComponentsThreadMode; enum { kCSAcceptAllComponentsMode = 0, kCSAcceptThreadSafeComponentsOnlyMode = 1 }; extern void CSSetComponentsThreadMode(CSComponentsThreadMode mode) __attribute__((availability(macosx,introduced=10.3,deprecated=10.8))); extern CSComponentsThreadMode CSGetComponentsThreadMode(void) __attribute__((availability(macosx,introduced=10.3,deprecated=10.8))); struct ComponentMPWorkFunctionHeaderRecord { UInt32 headerSize; UInt32 recordSize; UInt32 workFlags; UInt16 processorCount; UInt8 unused; UInt8 isRunning; }; typedef struct ComponentMPWorkFunctionHeaderRecord ComponentMPWorkFunctionHeaderRecord; typedef ComponentMPWorkFunctionHeaderRecord * ComponentMPWorkFunctionHeaderRecordPtr; typedef ComponentResult ( * ComponentMPWorkFunctionProcPtr)(void *globalRefCon, ComponentMPWorkFunctionHeaderRecordPtr header); typedef ComponentResult ( * ComponentRoutineProcPtr)(ComponentParameters *cp, Handle componentStorage); typedef OSErr ( * GetMissingComponentResourceProcPtr)(Component c, OSType resType, SInt16 resID, void *refCon, Handle *resource); typedef ComponentMPWorkFunctionProcPtr ComponentMPWorkFunctionUPP; typedef ComponentRoutineProcPtr ComponentRoutineUPP; typedef GetMissingComponentResourceProcPtr GetMissingComponentResourceUPP; typedef UniversalProcPtr ComponentFunctionUPP; extern ComponentFunctionUPP NewComponentFunctionUPP( ProcPtr userRoutine, ProcInfoType procInfo) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeComponentFunctionUPP(ComponentFunctionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Component RegisterComponent( ComponentDescription * cd, ComponentRoutineUPP componentEntryPoint, SInt16 global, Handle componentName, Handle componentInfo, Handle componentIcon) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Component RegisterComponentResource( ComponentResourceHandle cr, SInt16 global) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr UnregisterComponent(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Component FindNextComponent( Component aComponent, ComponentDescription * looking) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long CountComponents(ComponentDescription * looking) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentInfo( Component aComponent, ComponentDescription * cd, Handle componentName, Handle componentInfo, Handle componentIcon) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 GetComponentListModSeed(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 GetComponentTypeModSeed(OSType componentType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr OpenAComponent( Component aComponent, ComponentInstance * ci) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentInstance OpenComponent(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr CloseComponent(ComponentInstance aComponentInstance) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentInstanceError(ComponentInstance aComponentInstance) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Component ResolveComponentAlias(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentPublicResource( Component aComponent, OSType resourceType, SInt16 resourceID, Handle * theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentPublicResourceList( OSType resourceType, SInt16 resourceID, SInt32 flags, ComponentDescription * cd, GetMissingComponentResourceUPP missingProc, void * refCon, void * atomContainerPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentPublicIndString( Component aComponent, Str255 theString, SInt16 strListID, SInt16 index) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetComponentInstanceError( ComponentInstance aComponentInstance, OSErr theError) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long GetComponentRefcon(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetComponentRefcon( Component aComponent, long theRefcon) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ResFileRefNum OpenComponentResFile(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr OpenAComponentResFile( Component aComponent, ResFileRefNum * resRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr CloseComponentResFile(ResFileRefNum refnum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentResource( Component aComponent, OSType resType, SInt16 resID, Handle * theResource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetComponentIndString( Component aComponent, Str255 theString, SInt16 strListID, SInt16 index) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Handle GetComponentInstanceStorage(ComponentInstance aComponentInstance) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void SetComponentInstanceStorage( ComponentInstance aComponentInstance, Handle theStorage) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long CountComponentInstances(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentFunction( ComponentParameters * params, ComponentFunctionUPP func) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentFunctionWithStorage( Handle storage, ComponentParameters * params, ComponentFunctionUPP func) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentFunctionWithStorageProcInfo( Handle storage, ComponentParameters * params, ProcPtr func, ProcInfoType funcProcInfo) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult DelegateComponentCall( ComponentParameters * originalParams, ComponentInstance ci) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr SetDefaultComponent( Component aComponent, SInt16 flags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentInstance OpenDefaultComponent( OSType componentType, OSType componentSubType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr OpenADefaultComponent( OSType componentType, OSType componentSubType, ComponentInstance * ci) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Component CaptureComponent( Component capturedComponent, Component capturingComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr UncaptureComponent(Component aComponent) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 RegisterComponentResourceFile( SInt16 resRefNum, SInt16 global) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr RegisterComponentFileRef( const FSRef * ref, SInt16 global) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr RegisterComponentFileRefEntries( const FSRef * ref, SInt16 global, const ComponentDescription * toRegister, UInt32 registerCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentOpen( ComponentInstance ci, ComponentInstance self) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentClose( ComponentInstance ci, ComponentInstance self) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentCanDo( ComponentInstance ci, SInt16 ftnNumber) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentVersion(ComponentInstance ci) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentRegister(ComponentInstance ci) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentTarget( ComponentInstance ci, ComponentInstance target) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentUnregister(ComponentInstance ci) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentGetMPWorkFunction( ComponentInstance ci, ComponentMPWorkFunctionUPP * workFunction, void ** refCon) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentGetPublicResource( ComponentInstance ci, OSType resourceType, SInt16 resourceID, Handle * resource) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult CallComponentDispatch(ComponentParameters * cp) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentMPWorkFunctionUPP NewComponentMPWorkFunctionUPP(ComponentMPWorkFunctionProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentRoutineUPP NewComponentRoutineUPP(ComponentRoutineProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern GetMissingComponentResourceUPP NewGetMissingComponentResourceUPP(GetMissingComponentResourceProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeComponentMPWorkFunctionUPP(ComponentMPWorkFunctionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeComponentRoutineUPP(ComponentRoutineUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeGetMissingComponentResourceUPP(GetMissingComponentResourceUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult InvokeComponentMPWorkFunctionUPP( void * globalRefCon, ComponentMPWorkFunctionHeaderRecordPtr header, ComponentMPWorkFunctionUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern ComponentResult InvokeComponentRoutineUPP( ComponentParameters * cp, Handle componentStorage, ComponentRoutineUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr InvokeGetMissingComponentResourceUPP( Component c, OSType resType, SInt16 resID, void * refCon, Handle * resource, GetMissingComponentResourceUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline ComponentMPWorkFunctionUPP NewComponentMPWorkFunctionUPP(ComponentMPWorkFunctionProcPtr userRoutine) { return userRoutine; } inline ComponentRoutineUPP NewComponentRoutineUPP(ComponentRoutineProcPtr userRoutine) { return userRoutine; } inline GetMissingComponentResourceUPP NewGetMissingComponentResourceUPP(GetMissingComponentResourceProcPtr userRoutine) { return userRoutine; } inline void DisposeComponentMPWorkFunctionUPP(ComponentMPWorkFunctionUPP) { } inline void DisposeComponentRoutineUPP(ComponentRoutineUPP) { } inline void DisposeGetMissingComponentResourceUPP(GetMissingComponentResourceUPP) { } inline ComponentResult InvokeComponentMPWorkFunctionUPP(void * globalRefCon, ComponentMPWorkFunctionHeaderRecordPtr header, ComponentMPWorkFunctionUPP userUPP) { return (*userUPP)(globalRefCon, header); } inline ComponentResult InvokeComponentRoutineUPP(ComponentParameters * cp, Handle componentStorage, ComponentRoutineUPP userUPP) { return (*userUPP)(cp, componentStorage); } inline OSErr InvokeGetMissingComponentResourceUPP(Component c, OSType resType, SInt16 resID, void * refCon, Handle * resource, GetMissingComponentResourceUPP userUPP) { return (*userUPP)(c, resType, resID, refCon, resource); } enum { uppComponentFunctionImplementedProcInfo = 0x000002F0, uppGetComponentVersionProcInfo = 0x000000F0, uppComponentSetTargetProcInfo = 0x000003F0, uppCallComponentOpenProcInfo = 0x000003F0, uppCallComponentCloseProcInfo = 0x000003F0, uppCallComponentCanDoProcInfo = 0x000002F0, uppCallComponentVersionProcInfo = 0x000000F0, uppCallComponentRegisterProcInfo = 0x000000F0, uppCallComponentTargetProcInfo = 0x000003F0, uppCallComponentUnregisterProcInfo = 0x000000F0, uppCallComponentGetMPWorkFunctionProcInfo = 0x00000FF0, uppCallComponentGetPublicResourceProcInfo = 0x00003BF0 }; #pragma pack(pop) } extern "C" { #pragma options align=power enum { MPLibrary_MajorVersion = 2, MPLibrary_MinorVersion = 3, MPLibrary_Release = 1, MPLibrary_DevelopmentRevision = 1 }; typedef struct OpaqueMPProcessID* MPProcessID; typedef struct OpaqueMPTaskID* MPTaskID; typedef struct OpaqueMPQueueID* MPQueueID; typedef struct OpaqueMPSemaphoreID* MPSemaphoreID; typedef struct OpaqueMPCriticalRegionID* MPCriticalRegionID; typedef struct OpaqueMPTimerID* MPTimerID; typedef struct OpaqueMPEventID* MPEventID; typedef struct OpaqueMPAddressSpaceID* MPAddressSpaceID; typedef struct OpaqueMPNotificationID* MPNotificationID; typedef struct OpaqueMPCoherenceID* MPCoherenceID; typedef struct OpaqueMPCpuID* MPCpuID; typedef struct OpaqueMPAreaID* MPAreaID; typedef struct OpaqueMPConsoleID* MPConsoleID; typedef struct OpaqueMPOpaqueID* MPOpaqueID; enum { kOpaqueAnyID = 0, kOpaqueProcessID = 1, kOpaqueTaskID = 2, kOpaqueTimerID = 3, kOpaqueQueueID = 4, kOpaqueSemaphoreID = 5, kOpaqueCriticalRegionID = 6, kOpaqueCpuID = 7, kOpaqueAddressSpaceID = 8, kOpaqueEventID = 9, kOpaqueCoherenceID = 10, kOpaqueAreaID = 11, kOpaqueNotificationID = 12, kOpaqueConsoleID = 13 }; typedef UInt32 MPOpaqueIDClass; enum { kMPNoID = 0 }; typedef OptionBits MPTaskOptions; typedef ItemCount TaskStorageIndex; typedef LogicalAddress TaskStorageValue; typedef ItemCount MPSemaphoreCount; typedef UInt32 MPTaskWeight; typedef UInt32 MPEventFlags; typedef UInt32 MPExceptionKind; typedef UInt32 MPTaskStateKind; typedef UInt32 MPPageSizeClass; enum { kDurationImmediate = 0, kDurationForever = 0x7FFFFFFF, kDurationMillisecond = 1, kDurationMicrosecond = -1 }; extern ItemCount MPProcessors(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use sysctl(hw.ncpu)"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern ItemCount MPProcessorsScheduled(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use sysctl(hw.activecpu)"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); enum { kMPCreateTaskSuspendedMask = 1L << 0, kMPCreateTaskTakesAllExceptionsMask = 1L << 1, kMPCreateTaskNotDebuggableMask = 1L << 2, kMPCreateTaskValidOptionsMask = kMPCreateTaskSuspendedMask | kMPCreateTaskTakesAllExceptionsMask | kMPCreateTaskNotDebuggableMask }; typedef OSStatus ( * TaskProc)(void * parameter); extern OSStatus MPCreateTask( TaskProc entryPoint, void * parameter, ByteCount stackSize, MPQueueID notifyQueue, void * terminationParameter1, void * terminationParameter2, MPTaskOptions options, MPTaskID * task) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPTerminateTask( MPTaskID task, OSStatus terminationStatus) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetTaskWeight( MPTaskID task, MPTaskWeight weight) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern Boolean MPTaskIsPreemptive(MPTaskID taskID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void MPExit(OSStatus status) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void MPYield(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern MPTaskID MPCurrentTaskID(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetTaskType( MPTaskID task, OSType taskType) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPAllocateTaskStorageIndex(TaskStorageIndex * taskIndex) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeallocateTaskStorageIndex(TaskStorageIndex taskIndex) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetTaskStorageValue( TaskStorageIndex taskIndex, TaskStorageValue value) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern TaskStorageValue MPGetTaskStorageValue(TaskStorageIndex taskIndex) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCreateQueue(MPQueueID * queue) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeleteQueue(MPQueueID queue) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPNotifyQueue( MPQueueID queue, void * param1, void * param2, void * param3) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPWaitOnQueue( MPQueueID queue, void ** param1, void ** param2, void ** param3, Duration timeout) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetQueueReserve( MPQueueID queue, ItemCount count) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCreateSemaphore( MPSemaphoreCount maximumValue, MPSemaphoreCount initialValue, MPSemaphoreID * semaphore) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeleteSemaphore(MPSemaphoreID semaphore) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSignalSemaphore(MPSemaphoreID semaphore) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPWaitOnSemaphore( MPSemaphoreID semaphore, Duration timeout) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCreateCriticalRegion(MPCriticalRegionID * criticalRegion) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeleteCriticalRegion(MPCriticalRegionID criticalRegion) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPEnterCriticalRegion( MPCriticalRegionID criticalRegion, Duration timeout) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPExitCriticalRegion(MPCriticalRegionID criticalRegion) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCreateEvent(MPEventID * event) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeleteEvent(MPEventID event) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetEvent( MPEventID event, MPEventFlags flags) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPWaitForEvent( MPEventID event, MPEventFlags * flags, Duration timeout) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCreateNotification(MPNotificationID * notificationID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeleteNotification(MPNotificationID notificationID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPModifyNotification( MPNotificationID notificationID, MPOpaqueID anID, void * notifyParam1, void * notifyParam2, void * notifyParam3) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPModifyNotificationParameters( MPNotificationID notificationID, MPOpaqueIDClass kind, void * notifyParam1, void * notifyParam2, void * notifyParam3) __attribute__((availability(macosx,introduced=10.1,deprecated=10.7))); extern OSStatus MPCauseNotification(MPNotificationID notificationID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); enum { kMPPreserveTimerIDMask = 1L << 0, kMPTimeIsDeltaMask = 1L << 1, kMPTimeIsDurationMask = 1L << 2 }; extern OSStatus MPDelayUntil(AbsoluteTime * expirationTime) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCreateTimer(MPTimerID * timerID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDeleteTimer(MPTimerID timerID) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetTimerNotify( MPTimerID timerID, MPOpaqueID anID, void * notifyParam1, void * notifyParam2, void * notifyParam3) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPArmTimer( MPTimerID timerID, AbsoluteTime * expirationTime, OptionBits options) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPCancelTimer( MPTimerID timerID, AbsoluteTime * timeRemaining) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); enum { kMPMaxAllocSize = 1024L * 1024 * 1024 }; enum { kMPAllocateDefaultAligned = 0, kMPAllocate8ByteAligned = 3, kMPAllocate16ByteAligned = 4, kMPAllocate32ByteAligned = 5, kMPAllocate1024ByteAligned = 10, kMPAllocate4096ByteAligned = 12, kMPAllocateMaxAlignment = 16, kMPAllocateAltiVecAligned = kMPAllocate16ByteAligned, kMPAllocateVMXAligned = kMPAllocateAltiVecAligned, kMPAllocateVMPageAligned = 254, kMPAllocateInterlockAligned = 255 }; enum { kMPAllocateClearMask = 0x0001, kMPAllocateGloballyMask = 0x0002, kMPAllocateResidentMask = 0x0004, kMPAllocateNoGrowthMask = 0x0010, kMPAllocateNoCreateMask = 0x0020 }; extern LogicalAddress MPAllocateAligned( ByteCount size, UInt8 alignment, OptionBits options) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use aligned_alloc()"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern LogicalAddress MPAllocate(ByteCount size) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use malloc()"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void MPFree(LogicalAddress object) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use free()"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern ByteCount MPGetAllocatedBlockSize(LogicalAddress object) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use malloc_size()"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void MPBlockCopy( LogicalAddress source, LogicalAddress destination, ByteCount size) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use memcpy()"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void MPBlockClear( LogicalAddress address, ByteCount size) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use bzero()"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); enum { kMPTaskStateRegisters = 0, kMPTaskStateFPU = 1, kMPTaskStateVectors = 2, kMPTaskStateMachine = 3, kMPTaskState32BitMemoryException = 4, kMPTaskStateTaskInfo = 5 }; enum { kMPTaskPropagate = 0, kMPTaskResumeStep = 1, kMPTaskResumeBranch = 2, kMPTaskResumeMask = 0x0000, kMPTaskPropagateMask = 1 << kMPTaskPropagate, kMPTaskResumeStepMask = 1 << kMPTaskResumeStep, kMPTaskResumeBranchMask = 1 << kMPTaskResumeBranch }; enum { kMPTaskBlocked = 0, kMPTaskReady = 1, kMPTaskRunning = 2 }; enum { kMPTaskInfoVersion = 3 }; struct MPTaskInfoVersion2 { PBVersion version; OSType name; OSType queueName; UInt16 runState; UInt16 lastCPU; UInt32 weight; MPProcessID processID; AbsoluteTime cpuTime; AbsoluteTime schedTime; AbsoluteTime creationTime; ItemCount codePageFaults; ItemCount dataPageFaults; ItemCount preemptions; MPCpuID cpuID; }; typedef struct MPTaskInfoVersion2 MPTaskInfoVersion2; struct MPTaskInfo { PBVersion version; OSType name; OSType queueName; UInt16 runState; UInt16 lastCPU; UInt32 weight; MPProcessID processID; AbsoluteTime cpuTime; AbsoluteTime schedTime; AbsoluteTime creationTime; ItemCount codePageFaults; ItemCount dataPageFaults; ItemCount preemptions; MPCpuID cpuID; MPOpaqueID blockedObject; MPAddressSpaceID spaceID; LogicalAddress stackBase; LogicalAddress stackLimit; LogicalAddress stackCurr; }; typedef struct MPTaskInfo MPTaskInfo; extern OSStatus MPSetExceptionHandler( MPTaskID task, MPQueueID exceptionQ) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPDisposeTaskException( MPTaskID task, OptionBits action) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPExtractTaskState( MPTaskID task, MPTaskStateKind kind, void * info) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPSetTaskState( MPTaskID task, MPTaskStateKind kind, void * info) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPThrowException( MPTaskID task, MPExceptionKind kind) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef UInt32 MPDebuggerLevel; enum { kMPLowLevelDebugger = 0x00000000, kMPMidLevelDebugger = 0x10000000, kMPHighLevelDebugger = 0x20000000 }; extern OSStatus MPRegisterDebugger( MPQueueID queue, MPDebuggerLevel level) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus MPUnregisterDebugger(MPQueueID queue) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef void * ( * MPRemoteProcedure)(void * parameter); typedef UInt8 MPRemoteContext; enum { kMPAnyRemoteContext = 0, kMPOwningProcessRemoteContext = 1, kMPInterruptRemoteContext = 2, kMPAsyncInterruptRemoteContext = 3 }; extern void * MPRemoteCall( MPRemoteProcedure remoteProc, void * parameter, MPRemoteContext context) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void * MPRemoteCallCFM( MPRemoteProcedure remoteProc, void * parameter, MPRemoteContext context) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern Boolean _MPIsFullyInitialized(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer useful (always true)"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef Boolean ( * MPIsFullyInitializedProc)(void); extern void _MPLibraryVersion( const char ** versionCString, UInt32 * major, UInt32 * minor, UInt32 * release, UInt32 * revision) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="No longer useful"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern Boolean _MPLibraryIsCompatible( const char * versionCString, UInt32 major, UInt32 minor, UInt32 release, UInt32 revision) __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Use libDispatch"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma options align=reset } extern "C" { #pragma pack(push, 2) #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef UInt32 FSAliasInfoBitmap; enum { kFSAliasInfoNone = 0x00000000, kFSAliasInfoVolumeCreateDate = 0x00000001, kFSAliasInfoTargetCreateDate = 0x00000002, kFSAliasInfoFinderInfo = 0x00000004, kFSAliasInfoIsDirectory = 0x00000008, kFSAliasInfoIDs = 0x00000010, kFSAliasInfoFSInfo = 0x00000020, kFSAliasInfoVolumeFlags = 0x00000040 }; enum { rAliasType = 'alis' }; enum { kARMMountVol = 0x00000001, kARMNoUI = 0x00000002, kARMMultVols = 0x00000008, kARMSearch = 0x00000100, kARMSearchMore = 0x00000200, kARMSearchRelFirst = 0x00000400, kARMTryFileIDFirst = 0x00000800 }; enum { asiZoneName = -3, asiServerName = -2, asiVolumeName = -1, asiAliasName = 0, asiParentName = 1 }; enum { kResolveAliasFileNoUI = 0x00000001, kResolveAliasTryFileIDFirst = 0x00000002 }; struct AliasRecord { UInt8 hidden[6]; }; typedef struct AliasRecord AliasRecord; typedef AliasRecord * AliasPtr; typedef AliasPtr * AliasHandle; struct FSAliasInfo { UTCDateTime volumeCreateDate; UTCDateTime targetCreateDate; OSType fileType; OSType fileCreator; UInt32 parentDirID; UInt32 nodeID; UInt16 filesystemID; UInt16 signature; Boolean volumeIsBootVolume; Boolean volumeIsAutomounted; Boolean volumeIsEjectable; Boolean volumeHasPersistentFileIDs; Boolean isDirectory; }; typedef struct FSAliasInfo FSAliasInfo; typedef FSAliasInfo * FSAliasInfoPtr; typedef short AliasInfoType; typedef Boolean ( * FSAliasFilterProcPtr)(const FSRef *ref, Boolean *quitFlag, Ptr myDataPtr); extern OSErr FSNewAlias( const FSRef * fromFile, const FSRef * target, AliasHandle * inAlias) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSNewAliasMinimal( const FSRef * target, AliasHandle * inAlias) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSIsAliasFile( const FSRef * fileRef, Boolean * aliasFileFlag, Boolean * folderFlag) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSResolveAliasWithMountFlags( const FSRef * fromFile, AliasHandle inAlias, FSRef * target, Boolean * wasChanged, unsigned long mountFlags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSResolveAlias( const FSRef * fromFile, AliasHandle alias, FSRef * target, Boolean * wasChanged) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSResolveAliasFileWithMountFlags( FSRef * theRef, Boolean resolveAliasChains, Boolean * targetIsFolder, Boolean * wasAliased, unsigned long mountFlags) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSResolveAliasFile( FSRef * theRef, Boolean resolveAliasChains, Boolean * targetIsFolder, Boolean * wasAliased) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSFollowFinderAlias( FSRef * fromFile, AliasHandle alias, Boolean logon, FSRef * target, Boolean * wasChanged) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSUpdateAlias( const FSRef * fromFile, const FSRef * target, AliasHandle alias, Boolean * wasChanged) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSNewAliasUnicode( const FSRef * fromFile, const FSRef * targetParentRef, UniCharCount targetNameLength, const UniChar * targetName, AliasHandle * inAlias, Boolean * isDirectory) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSErr FSNewAliasMinimalUnicode( const FSRef * targetParentRef, UniCharCount targetNameLength, const UniChar * targetName, AliasHandle * inAlias, Boolean * isDirectory) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern OSStatus FSNewAliasFromPath( const char * fromFilePath, const char * targetPath, OptionBits flags, AliasHandle * inAlias, Boolean * isDirectory) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSMatchAliasBulk( const FSRef * fromFile, unsigned long rulesMask, AliasHandle inAlias, short * aliasCount, FSRef * aliasList, Boolean * needsUpdate, FSAliasFilterProcPtr aliasFilter, void * yourDataPtr) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSStatus FSCopyAliasInfo( AliasHandle inAlias, HFSUniStr255 * targetName, HFSUniStr255 * volumeName, CFStringRef * pathString, FSAliasInfoBitmap * whichInfo, FSAliasInfo * info) __attribute__((availability(macosx,introduced=10.2,deprecated=10.8))); extern Size GetAliasSize(AliasHandle alias) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSType GetAliasUserType(AliasHandle alias) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern void SetAliasUserType( AliasHandle alias, OSType userType) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern Size GetAliasSizeFromPtr(const AliasRecord * alias) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSType GetAliasUserTypeFromPtr(const AliasRecord * alias) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern void SetAliasUserTypeWithPtr( AliasPtr alias, OSType userType) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef struct OpaqueLocaleRef* LocaleRef; typedef UInt32 LocalePartMask; enum { kLocaleLanguageMask = 1L << 0, kLocaleLanguageVariantMask = 1L << 1, kLocaleScriptMask = 1L << 2, kLocaleScriptVariantMask = 1L << 3, kLocaleRegionMask = 1L << 4, kLocaleRegionVariantMask = 1L << 5, kLocaleAllPartsMask = 0x0000003F }; typedef FourCharCode LocaleOperationClass; typedef FourCharCode LocaleOperationVariant; struct LocaleAndVariant { LocaleRef locale; LocaleOperationVariant opVariant; }; typedef struct LocaleAndVariant LocaleAndVariant; typedef UInt32 LocaleNameMask; enum { kLocaleNameMask = 1L << 0, kLocaleOperationVariantNameMask = 1L << 1, kLocaleAndVariantNameMask = 0x00000003 }; extern OSStatus LocaleRefFromLangOrRegionCode( LangCode lang, RegionCode region, LocaleRef * locale) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus LocaleRefFromLocaleString( const char localeString[], LocaleRef * locale) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus LocaleRefGetPartString( LocaleRef locale, LocalePartMask partMask, ByteCount maxStringLen, char partString[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus LocaleStringToLangAndRegionCodes( const char localeString[], LangCode * lang, RegionCode * region) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus LocaleOperationCountLocales( LocaleOperationClass opClass, ItemCount * localeCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus LocaleOperationGetLocales( LocaleOperationClass opClass, ItemCount maxLocaleCount, ItemCount * actualLocaleCount, LocaleAndVariant localeVariantList[]) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus LocaleGetName( LocaleRef locale, LocaleOperationVariant opVariant, LocaleNameMask nameMask, LocaleRef displayLocale, UniCharCount maxNameLen, UniCharCount * actualNameLen, UniChar displayName[]) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus LocaleCountNames( LocaleRef locale, LocaleOperationVariant opVariant, LocaleNameMask nameMask, ItemCount * nameCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus LocaleGetIndName( LocaleRef locale, LocaleOperationVariant opVariant, LocaleNameMask nameMask, ItemCount nameIndex, UniCharCount maxNameLen, UniCharCount * actualNameLen, UniChar displayName[], LocaleRef * displayLocale) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus LocaleOperationGetName( LocaleOperationClass opClass, LocaleRef displayLocale, UniCharCount maxNameLen, UniCharCount * actualNameLen, UniChar displayName[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus LocaleOperationCountNames( LocaleOperationClass opClass, ItemCount * nameCount) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus LocaleOperationGetIndName( LocaleOperationClass opClass, ItemCount nameIndex, UniCharCount maxNameLen, UniCharCount * actualNameLen, UniChar displayName[], LocaleRef * displayLocale) __attribute__((availability(macosx,introduced=10.0))); #pragma pack(pop) } extern "C" { enum { kBlessedBusErrorBait = 0x68F168F1 }; extern void DebugAssert( OSType componentSignature, UInt32 options, const char * assertionString, const char * exceptionLabelString, const char * errorString, const char * fileName, long lineNumber, void * value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { k68kInterruptLevelMask = 0x00000007, kInVBLTaskMask = 0x00000010, kInDeferredTaskMask = 0x00000020, kInSecondaryIntHandlerMask = 0x00000040, kInNestedInterruptMask = 0x00000080 }; extern UInt32 TaskLevel(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { kComponentDebugOption = 0 }; enum { kGetDebugOption = 1, kSetDebugOption = 2 }; typedef void ( * DebugComponentCallbackProcPtr)(SInt32 optionSelectorNum, UInt32 command, Boolean *optionSetting); typedef DebugComponentCallbackProcPtr DebugComponentCallbackUPP; extern OSStatus NewDebugComponent( OSType componentSignature, ConstStr255Param componentName, DebugComponentCallbackUPP componentCallback) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus NewDebugOption( OSType componentSignature, SInt32 optionSelectorNum, ConstStr255Param optionName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus DisposeDebugComponent(OSType componentSignature) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus GetDebugComponentInfo( UInt32 itemIndex, OSType * componentSignature, Str255 componentName) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus GetDebugOptionInfo( UInt32 itemIndex, OSType componentSignature, SInt32 * optionSelectorNum, Str255 optionName, Boolean * optionSetting) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus SetDebugOptionValue( OSType componentSignature, SInt32 optionSelectorNum, Boolean newOptionSetting) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); typedef void ( * DebugAssertOutputHandlerProcPtr)(OSType componentSignature, UInt32 options, const char *assertionString, const char *exceptionLabelString, const char *errorString, const char *fileName, long lineNumber, void *value, ConstStr255Param outputMsg); typedef DebugAssertOutputHandlerProcPtr DebugAssertOutputHandlerUPP; extern void InstallDebugAssertOutputHandler(DebugAssertOutputHandlerUPP handler) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern const char * GetMacOSStatusErrorString(OSStatus err) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern const char * GetMacOSStatusCommentString(OSStatus err) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern DebugComponentCallbackUPP NewDebugComponentCallbackUPP(DebugComponentCallbackProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern DebugAssertOutputHandlerUPP NewDebugAssertOutputHandlerUPP(DebugAssertOutputHandlerProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeDebugComponentCallbackUPP(DebugComponentCallbackUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeDebugAssertOutputHandlerUPP(DebugAssertOutputHandlerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void InvokeDebugComponentCallbackUPP( SInt32 optionSelectorNum, UInt32 command, Boolean * optionSetting, DebugComponentCallbackUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void InvokeDebugAssertOutputHandlerUPP( OSType componentSignature, UInt32 options, const char * assertionString, const char * exceptionLabelString, const char * errorString, const char * fileName, long lineNumber, void * value, ConstStr255Param outputMsg, DebugAssertOutputHandlerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline DebugComponentCallbackUPP NewDebugComponentCallbackUPP(DebugComponentCallbackProcPtr userRoutine) { return userRoutine; } inline DebugAssertOutputHandlerUPP NewDebugAssertOutputHandlerUPP(DebugAssertOutputHandlerProcPtr userRoutine) { return userRoutine; } inline void DisposeDebugComponentCallbackUPP(DebugComponentCallbackUPP) { } inline void DisposeDebugAssertOutputHandlerUPP(DebugAssertOutputHandlerUPP) { } inline void InvokeDebugComponentCallbackUPP(SInt32 optionSelectorNum, UInt32 command, Boolean * optionSetting, DebugComponentCallbackUPP userUPP) { (*userUPP)(optionSelectorNum, command, optionSetting); } inline void InvokeDebugAssertOutputHandlerUPP(OSType componentSignature, UInt32 options, const char * assertionString, const char * exceptionLabelString, const char * errorString, const char * fileName, long lineNumber, void * value, ConstStr255Param outputMsg, DebugAssertOutputHandlerUPP userUPP) { (*userUPP)(componentSignature, options, assertionString, exceptionLabelString, errorString, fileName, lineNumber, value, outputMsg); } } extern "C" { extern short PLstrcmp( ConstStr255Param str1, ConstStr255Param str2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern short PLstrncmp( ConstStr255Param str1, ConstStr255Param str2, short num) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern StringPtr PLstrcpy( StringPtr dest, ConstStr255Param source) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern StringPtr PLstrncpy( StringPtr dest, ConstStr255Param source, short num) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern StringPtr PLstrcat( StringPtr str, ConstStr255Param append) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern StringPtr PLstrncat( StringPtr str1, ConstStr255Param append, short num) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern Ptr PLstrchr( ConstStr255Param str1, short ch1) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern Ptr PLstrrchr( ConstStr255Param str1, short ch1) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern Ptr PLstrpbrk( ConstStr255Param str1, ConstStr255Param charSet) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern short PLstrspn( ConstStr255Param str1, ConstStr255Param charSet) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern Ptr PLstrstr( ConstStr255Param str1, ConstStr255Param searchStr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern short PLstrlen(ConstStr255Param str) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern short PLpos( ConstStr255Param str1, ConstStr255Param searchStr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); } extern "C" { extern Boolean CompareAndSwap( UInt32 oldValue, UInt32 newValue, UInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean TestAndClear( UInt32 bit, UInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Boolean TestAndSet( UInt32 bit, UInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt8 IncrementAtomic8(SInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt8 DecrementAtomic8(SInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt8 AddAtomic8( SInt32 amount, SInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt8 BitAndAtomic8( UInt32 mask, UInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt8 BitOrAtomic8( UInt32 mask, UInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt8 BitXorAtomic8( UInt32 mask, UInt8 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt16 IncrementAtomic16(SInt16 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt16 DecrementAtomic16(SInt16 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt16 AddAtomic16( SInt32 amount, SInt16 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt16 BitAndAtomic16( UInt32 mask, UInt16 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt16 BitOrAtomic16( UInt32 mask, UInt16 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt16 BitXorAtomic16( UInt32 mask, UInt16 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 IncrementAtomic(SInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 DecrementAtomic(SInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt32 AddAtomic( SInt32 amount, SInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt32 BitAndAtomic( UInt32 mask, UInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt32 BitOrAtomic( UInt32 mask, UInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt32 BitXorAtomic( UInt32 mask, UInt32 * address) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); } typedef long long __m64 __attribute__((__vector_size__(8), __aligned__(8))); typedef long long __v1di __attribute__((__vector_size__(8))); typedef int __v2si __attribute__((__vector_size__(8))); typedef short __v4hi __attribute__((__vector_size__(8))); typedef char __v8qi __attribute__((__vector_size__(8))); static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("mmx"))) _mm_empty(void) { __builtin_ia32_emms(); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtsi32_si64(int __i) { return (__m64)__builtin_ia32_vec_init_v2si(__i, 0); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtsi64_si32(__m64 __m) { return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtsi64_m64(long long __i) { return (__m64)__i; } static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cvtm64_si64(__m64 __m) { return (long long)__m; } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_packs_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_packs_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_packs_pu16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpackhi_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpackhi_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpackhi_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpacklo_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpacklo_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_unpacklo_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_punpckldq((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_add_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_add_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_add_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddd((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddsb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddsw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pu8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddusb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_adds_pu16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_paddusw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sub_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sub_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sub_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubd((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubsb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubsw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pu8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubusb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_subs_pu16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_psubusw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_madd_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pmaddwd((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_mulhi_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pmulhw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_mullo_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pmullw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sll_pi16(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psllw((__v4hi)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_slli_pi16(__m64 __m, int __count) { return (__m64)__builtin_ia32_psllwi((__v4hi)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sll_pi32(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_pslld((__v2si)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_slli_pi32(__m64 __m, int __count) { return (__m64)__builtin_ia32_pslldi((__v2si)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sll_si64(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psllq((__v1di)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_slli_si64(__m64 __m, int __count) { return (__m64)__builtin_ia32_psllqi((__v1di)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sra_pi16(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psraw((__v4hi)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srai_pi16(__m64 __m, int __count) { return (__m64)__builtin_ia32_psrawi((__v4hi)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_sra_pi32(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psrad((__v2si)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srai_pi32(__m64 __m, int __count) { return (__m64)__builtin_ia32_psradi((__v2si)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srl_pi16(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psrlw((__v4hi)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srli_pi16(__m64 __m, int __count) { return (__m64)__builtin_ia32_psrlwi((__v4hi)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srl_pi32(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psrld((__v2si)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srli_pi32(__m64 __m, int __count) { return (__m64)__builtin_ia32_psrldi((__v2si)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srl_si64(__m64 __m, __m64 __count) { return (__m64)__builtin_ia32_psrlq((__v1di)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_srli_si64(__m64 __m, int __count) { return (__m64)__builtin_ia32_psrlqi((__v1di)__m, __count); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_and_si64(__m64 __m1, __m64 __m2) { return __builtin_ia32_pand((__v1di)__m1, (__v1di)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_andnot_si64(__m64 __m1, __m64 __m2) { return __builtin_ia32_pandn((__v1di)__m1, (__v1di)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_or_si64(__m64 __m1, __m64 __m2) { return __builtin_ia32_por((__v1di)__m1, (__v1di)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_xor_si64(__m64 __m1, __m64 __m2) { return __builtin_ia32_pxor((__v1di)__m1, (__v1di)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpeq_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pcmpeqb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpeq_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pcmpeqw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpeq_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pcmpeqd((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpgt_pi8(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pcmpgtb((__v8qi)__m1, (__v8qi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpgt_pi16(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pcmpgtw((__v4hi)__m1, (__v4hi)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_cmpgt_pi32(__m64 __m1, __m64 __m2) { return (__m64)__builtin_ia32_pcmpgtd((__v2si)__m1, (__v2si)__m2); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setzero_si64(void) { return __extension__ (__m64){ 0LL }; } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set_pi32(int __i1, int __i0) { return (__m64)__builtin_ia32_vec_init_v2si(__i0, __i1); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set_pi16(short __s3, short __s2, short __s1, short __s0) { return (__m64)__builtin_ia32_vec_init_v4hi(__s0, __s1, __s2, __s3); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set_pi8(char __b7, char __b6, char __b5, char __b4, char __b3, char __b2, char __b1, char __b0) { return (__m64)__builtin_ia32_vec_init_v8qi(__b0, __b1, __b2, __b3, __b4, __b5, __b6, __b7); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set1_pi32(int __i) { return _mm_set_pi32(__i, __i); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set1_pi16(short __w) { return _mm_set_pi16(__w, __w, __w, __w); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_set1_pi8(char __b) { return _mm_set_pi8(__b, __b, __b, __b, __b, __b, __b, __b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setr_pi32(int __i0, int __i1) { return _mm_set_pi32(__i1, __i0); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setr_pi16(short __w0, short __w1, short __w2, short __w3) { return _mm_set_pi16(__w3, __w2, __w1, __w0); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx"), __min_vector_width__(64))) _mm_setr_pi8(char __b0, char __b1, char __b2, char __b3, char __b4, char __b5, char __b6, char __b7) { return _mm_set_pi8(__b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0); } typedef int __v4si __attribute__((__vector_size__(16))); typedef float __v4sf __attribute__((__vector_size__(16))); typedef float __m128 __attribute__((__vector_size__(16), __aligned__(16))); typedef float __m128_u __attribute__((__vector_size__(16), __aligned__(1))); typedef unsigned int __v4su __attribute__((__vector_size__(16))); extern "C" int posix_memalign(void **__memptr, size_t __alignment, size_t __size); static __inline__ void *__attribute__((__always_inline__, __nodebug__, __malloc__)) _mm_malloc(size_t __size, size_t __align) { if (__align == 1) { return malloc(__size); } if (!(__align & (__align - 1)) && __align < sizeof(void *)) __align = sizeof(void *); void *__mallocedMemory; if (posix_memalign(&__mallocedMemory, __align, __size)) return 0; return __mallocedMemory; } static __inline__ void __attribute__((__always_inline__, __nodebug__)) _mm_free(void *__p) { free(__p); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_add_ss(__m128 __a, __m128 __b) { __a[0] += __b[0]; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_add_ps(__m128 __a, __m128 __b) { return (__m128)((__v4sf)__a + (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sub_ss(__m128 __a, __m128 __b) { __a[0] -= __b[0]; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sub_ps(__m128 __a, __m128 __b) { return (__m128)((__v4sf)__a - (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_mul_ss(__m128 __a, __m128 __b) { __a[0] *= __b[0]; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_mul_ps(__m128 __a, __m128 __b) { return (__m128)((__v4sf)__a * (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_div_ss(__m128 __a, __m128 __b) { __a[0] /= __b[0]; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_div_ps(__m128 __a, __m128 __b) { return (__m128)((__v4sf)__a / (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sqrt_ss(__m128 __a) { return (__m128)__builtin_ia32_sqrtss((__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_sqrt_ps(__m128 __a) { return __builtin_ia32_sqrtps((__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rcp_ss(__m128 __a) { return (__m128)__builtin_ia32_rcpss((__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rcp_ps(__m128 __a) { return (__m128)__builtin_ia32_rcpps((__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rsqrt_ss(__m128 __a) { return __builtin_ia32_rsqrtss((__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_rsqrt_ps(__m128 __a) { return __builtin_ia32_rsqrtps((__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_min_ss(__m128 __a, __m128 __b) { return __builtin_ia32_minss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_min_ps(__m128 __a, __m128 __b) { return __builtin_ia32_minps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_max_ss(__m128 __a, __m128 __b) { return __builtin_ia32_maxss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_max_ps(__m128 __a, __m128 __b) { return __builtin_ia32_maxps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_and_ps(__m128 __a, __m128 __b) { return (__m128)((__v4su)__a & (__v4su)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_andnot_ps(__m128 __a, __m128 __b) { return (__m128)(~(__v4su)__a & (__v4su)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_or_ps(__m128 __a, __m128 __b) { return (__m128)((__v4su)__a | (__v4su)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_xor_ps(__m128 __a, __m128 __b) { return (__m128)((__v4su)__a ^ (__v4su)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpeq_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpeqss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpeq_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpeqps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmplt_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpltss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmplt_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpltps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmple_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpless((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmple_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpleps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpgt_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_shufflevector((__v4sf)__a, (__v4sf)__builtin_ia32_cmpltss((__v4sf)__b, (__v4sf)__a), 4, 1, 2, 3); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpgt_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpltps((__v4sf)__b, (__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpge_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_shufflevector((__v4sf)__a, (__v4sf)__builtin_ia32_cmpless((__v4sf)__b, (__v4sf)__a), 4, 1, 2, 3); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpge_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpleps((__v4sf)__b, (__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpneq_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpneqss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpneq_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpneqps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpnlt_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpnltss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpnlt_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpnltps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpnle_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpnless((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpnle_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpnleps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpngt_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_shufflevector((__v4sf)__a, (__v4sf)__builtin_ia32_cmpnltss((__v4sf)__b, (__v4sf)__a), 4, 1, 2, 3); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpngt_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpnltps((__v4sf)__b, (__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpnge_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_shufflevector((__v4sf)__a, (__v4sf)__builtin_ia32_cmpnless((__v4sf)__b, (__v4sf)__a), 4, 1, 2, 3); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpnge_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpnleps((__v4sf)__b, (__v4sf)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpord_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpordss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpord_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpordps((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpunord_ss(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpunordss((__v4sf)__a, (__v4sf)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cmpunord_ps(__m128 __a, __m128 __b) { return (__m128)__builtin_ia32_cmpunordps((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_comieq_ss(__m128 __a, __m128 __b) { return __builtin_ia32_comieq((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_comilt_ss(__m128 __a, __m128 __b) { return __builtin_ia32_comilt((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_comile_ss(__m128 __a, __m128 __b) { return __builtin_ia32_comile((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_comigt_ss(__m128 __a, __m128 __b) { return __builtin_ia32_comigt((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_comige_ss(__m128 __a, __m128 __b) { return __builtin_ia32_comige((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_comineq_ss(__m128 __a, __m128 __b) { return __builtin_ia32_comineq((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_ucomieq_ss(__m128 __a, __m128 __b) { return __builtin_ia32_ucomieq((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_ucomilt_ss(__m128 __a, __m128 __b) { return __builtin_ia32_ucomilt((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_ucomile_ss(__m128 __a, __m128 __b) { return __builtin_ia32_ucomile((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_ucomigt_ss(__m128 __a, __m128 __b) { return __builtin_ia32_ucomigt((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_ucomige_ss(__m128 __a, __m128 __b) { return __builtin_ia32_ucomige((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_ucomineq_ss(__m128 __a, __m128 __b) { return __builtin_ia32_ucomineq((__v4sf)__a, (__v4sf)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtss_si32(__m128 __a) { return __builtin_ia32_cvtss2si((__v4sf)__a); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvt_ss2si(__m128 __a) { return _mm_cvtss_si32(__a); } static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtss_si64(__m128 __a) { return __builtin_ia32_cvtss2si64((__v4sf)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtps_pi32(__m128 __a) { return (__m64)__builtin_ia32_cvtps2pi((__v4sf)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvt_ps2pi(__m128 __a) { return _mm_cvtps_pi32(__a); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvttss_si32(__m128 __a) { return __builtin_ia32_cvttss2si((__v4sf)__a); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtt_ss2si(__m128 __a) { return _mm_cvttss_si32(__a); } static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvttss_si64(__m128 __a) { return __builtin_ia32_cvttss2si64((__v4sf)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvttps_pi32(__m128 __a) { return (__m64)__builtin_ia32_cvttps2pi((__v4sf)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtt_ps2pi(__m128 __a) { return _mm_cvttps_pi32(__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtsi32_ss(__m128 __a, int __b) { __a[0] = __b; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvt_si2ss(__m128 __a, int __b) { return _mm_cvtsi32_ss(__a, __b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtsi64_ss(__m128 __a, long long __b) { __a[0] = __b; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtpi32_ps(__m128 __a, __m64 __b) { return __builtin_ia32_cvtpi2ps((__v4sf)__a, (__v2si)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvt_pi2ps(__m128 __a, __m64 __b) { return _mm_cvtpi32_ps(__a, __b); } static __inline__ float __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_cvtss_f32(__m128 __a) { return __a[0]; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_loadh_pi(__m128 __a, const __m64 *__p) { typedef float __mm_loadh_pi_v2f32 __attribute__((__vector_size__(8))); struct __mm_loadh_pi_struct { __mm_loadh_pi_v2f32 __u; } __attribute__((__packed__, __may_alias__)); __mm_loadh_pi_v2f32 __b = ((const struct __mm_loadh_pi_struct*)__p)->__u; __m128 __bb = __builtin_shufflevector(__b, __b, 0, 1, 0, 1); return __builtin_shufflevector(__a, __bb, 0, 1, 4, 5); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_loadl_pi(__m128 __a, const __m64 *__p) { typedef float __mm_loadl_pi_v2f32 __attribute__((__vector_size__(8))); struct __mm_loadl_pi_struct { __mm_loadl_pi_v2f32 __u; } __attribute__((__packed__, __may_alias__)); __mm_loadl_pi_v2f32 __b = ((const struct __mm_loadl_pi_struct*)__p)->__u; __m128 __bb = __builtin_shufflevector(__b, __b, 0, 1, 0, 1); return __builtin_shufflevector(__a, __bb, 4, 5, 2, 3); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_load_ss(const float *__p) { struct __mm_load_ss_struct { float __u; } __attribute__((__packed__, __may_alias__)); float __u = ((const struct __mm_load_ss_struct*)__p)->__u; return __extension__ (__m128){ __u, 0, 0, 0 }; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_load1_ps(const float *__p) { struct __mm_load1_ps_struct { float __u; } __attribute__((__packed__, __may_alias__)); float __u = ((const struct __mm_load1_ps_struct*)__p)->__u; return __extension__ (__m128){ __u, __u, __u, __u }; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_load_ps(const float *__p) { return *(const __m128*)__p; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_loadu_ps(const float *__p) { struct __loadu_ps { __m128_u __v; } __attribute__((__packed__, __may_alias__)); return ((const struct __loadu_ps*)__p)->__v; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_loadr_ps(const float *__p) { __m128 __a = _mm_load_ps(__p); return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 3, 2, 1, 0); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_undefined_ps(void) { return (__m128)__builtin_ia32_undef128(); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_set_ss(float __w) { return __extension__ (__m128){ __w, 0, 0, 0 }; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_set1_ps(float __w) { return __extension__ (__m128){ __w, __w, __w, __w }; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_set_ps1(float __w) { return _mm_set1_ps(__w); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_set_ps(float __z, float __y, float __x, float __w) { return __extension__ (__m128){ __w, __x, __y, __z }; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_setr_ps(float __z, float __y, float __x, float __w) { return __extension__ (__m128){ __z, __y, __x, __w }; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_setzero_ps(void) { return __extension__ (__m128){ 0, 0, 0, 0 }; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_storeh_pi(__m64 *__p, __m128 __a) { typedef float __mm_storeh_pi_v2f32 __attribute__((__vector_size__(8))); struct __mm_storeh_pi_struct { __mm_storeh_pi_v2f32 __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_storeh_pi_struct*)__p)->__u = __builtin_shufflevector(__a, __a, 2, 3); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_storel_pi(__m64 *__p, __m128 __a) { typedef float __mm_storeh_pi_v2f32 __attribute__((__vector_size__(8))); struct __mm_storeh_pi_struct { __mm_storeh_pi_v2f32 __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_storeh_pi_struct*)__p)->__u = __builtin_shufflevector(__a, __a, 0, 1); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_store_ss(float *__p, __m128 __a) { struct __mm_store_ss_struct { float __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_store_ss_struct*)__p)->__u = __a[0]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_storeu_ps(float *__p, __m128 __a) { struct __storeu_ps { __m128_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_ps*)__p)->__v = __a; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_store_ps(float *__p, __m128 __a) { *(__m128*)__p = __a; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_store1_ps(float *__p, __m128 __a) { __a = __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 0, 0, 0, 0); _mm_store_ps(__p, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_store_ps1(float *__p, __m128 __a) { _mm_store1_ps(__p, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_storer_ps(float *__p, __m128 __a) { __a = __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 3, 2, 1, 0); _mm_store_ps(__p, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_stream_pi(__m64 *__p, __m64 __a) { __builtin_ia32_movntq(__p, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_stream_ps(float *__p, __m128 __a) { __builtin_nontemporal_store((__v4sf)__a, (__v4sf*)__p); } extern "C" { void _mm_sfence(void); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_max_pi16(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pmaxsw((__v4hi)__a, (__v4hi)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_max_pu8(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pmaxub((__v8qi)__a, (__v8qi)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_min_pi16(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pminsw((__v4hi)__a, (__v4hi)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_min_pu8(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pminub((__v8qi)__a, (__v8qi)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_movemask_pi8(__m64 __a) { return __builtin_ia32_pmovmskb((__v8qi)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_mulhi_pu16(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pmulhuw((__v4hi)__a, (__v4hi)__b); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_maskmove_si64(__m64 __d, __m64 __n, char *__p) { __builtin_ia32_maskmovq((__v8qi)__d, (__v8qi)__n, __p); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_avg_pu8(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pavgb((__v8qi)__a, (__v8qi)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_avg_pu16(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_pavgw((__v4hi)__a, (__v4hi)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_sad_pu8(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_psadbw((__v8qi)__a, (__v8qi)__b); } extern "C" { unsigned int _mm_getcsr(void); void _mm_setcsr(unsigned int __i); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_unpackhi_ps(__m128 __a, __m128 __b) { return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 2, 6, 3, 7); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_unpacklo_ps(__m128 __a, __m128 __b) { return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 0, 4, 1, 5); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_move_ss(__m128 __a, __m128 __b) { __a[0] = __b[0]; return __a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_movehl_ps(__m128 __a, __m128 __b) { return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 6, 7, 2, 3); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_movelh_ps(__m128 __a, __m128 __b) { return __builtin_shufflevector((__v4sf)__a, (__v4sf)__b, 0, 1, 4, 5); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtpi16_ps(__m64 __a) { __m64 __b, __c; __m128 __r; __b = _mm_setzero_si64(); __b = _mm_cmpgt_pi16(__b, __a); __c = _mm_unpackhi_pi16(__a, __b); __r = _mm_setzero_ps(); __r = _mm_cvtpi32_ps(__r, __c); __r = _mm_movelh_ps(__r, __r); __c = _mm_unpacklo_pi16(__a, __b); __r = _mm_cvtpi32_ps(__r, __c); return __r; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtpu16_ps(__m64 __a) { __m64 __b, __c; __m128 __r; __b = _mm_setzero_si64(); __c = _mm_unpackhi_pi16(__a, __b); __r = _mm_setzero_ps(); __r = _mm_cvtpi32_ps(__r, __c); __r = _mm_movelh_ps(__r, __r); __c = _mm_unpacklo_pi16(__a, __b); __r = _mm_cvtpi32_ps(__r, __c); return __r; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtpi8_ps(__m64 __a) { __m64 __b; __b = _mm_setzero_si64(); __b = _mm_cmpgt_pi8(__b, __a); __b = _mm_unpacklo_pi8(__a, __b); return _mm_cvtpi16_ps(__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtpu8_ps(__m64 __a) { __m64 __b; __b = _mm_setzero_si64(); __b = _mm_unpacklo_pi8(__a, __b); return _mm_cvtpi16_ps(__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtpi32x2_ps(__m64 __a, __m64 __b) { __m128 __c; __c = _mm_setzero_ps(); __c = _mm_cvtpi32_ps(__c, __b); __c = _mm_movelh_ps(__c, __c); return _mm_cvtpi32_ps(__c, __a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtps_pi16(__m128 __a) { __m64 __b, __c; __b = _mm_cvtps_pi32(__a); __a = _mm_movehl_ps(__a, __a); __c = _mm_cvtps_pi32(__a); return _mm_packs_pi32(__b, __c); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse"), __min_vector_width__(64))) _mm_cvtps_pi8(__m128 __a) { __m64 __b, __c; __b = _mm_cvtps_pi16(__a); __c = _mm_setzero_si64(); return _mm_packs_pi16(__b, __c); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse"), __min_vector_width__(128))) _mm_movemask_ps(__m128 __a) { return __builtin_ia32_movmskps((__v4sf)__a); } typedef double __m128d __attribute__((__vector_size__(16), __aligned__(16))); typedef long long __m128i __attribute__((__vector_size__(16), __aligned__(16))); typedef double __m128d_u __attribute__((__vector_size__(16), __aligned__(1))); typedef long long __m128i_u __attribute__((__vector_size__(16), __aligned__(1))); typedef double __v2df __attribute__ ((__vector_size__ (16))); typedef long long __v2di __attribute__ ((__vector_size__ (16))); typedef short __v8hi __attribute__((__vector_size__(16))); typedef char __v16qi __attribute__((__vector_size__(16))); typedef unsigned long long __v2du __attribute__ ((__vector_size__ (16))); typedef unsigned short __v8hu __attribute__((__vector_size__(16))); typedef unsigned char __v16qu __attribute__((__vector_size__(16))); typedef signed char __v16qs __attribute__((__vector_size__(16))); static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_sd(__m128d __a, __m128d __b) { __a[0] += __b[0]; return __a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2df)__a + (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_sd(__m128d __a, __m128d __b) { __a[0] -= __b[0]; return __a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2df)__a - (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mul_sd(__m128d __a, __m128d __b) { __a[0] *= __b[0]; return __a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mul_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2df)__a * (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_div_sd(__m128d __a, __m128d __b) { __a[0] /= __b[0]; return __a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_div_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2df)__a / (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sqrt_sd(__m128d __a, __m128d __b) { __m128d __c = __builtin_ia32_sqrtsd((__v2df)__b); return __extension__ (__m128d) { __c[0], __a[1] }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sqrt_pd(__m128d __a) { return __builtin_ia32_sqrtpd((__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_min_sd(__m128d __a, __m128d __b) { return __builtin_ia32_minsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_min_pd(__m128d __a, __m128d __b) { return __builtin_ia32_minpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_max_sd(__m128d __a, __m128d __b) { return __builtin_ia32_maxsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_max_pd(__m128d __a, __m128d __b) { return __builtin_ia32_maxpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_and_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2du)__a & (__v2du)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_andnot_pd(__m128d __a, __m128d __b) { return (__m128d)(~(__v2du)__a & (__v2du)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_or_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2du)__a | (__v2du)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_xor_pd(__m128d __a, __m128d __b) { return (__m128d)((__v2du)__a ^ (__v2du)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpeq_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpeqpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmplt_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpltpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmple_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmplepd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpgt_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpltpd((__v2df)__b, (__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpge_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmplepd((__v2df)__b, (__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpord_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpordpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpunord_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpunordpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpneq_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpneqpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpnlt_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpnltpd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpnle_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpnlepd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpngt_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpnltpd((__v2df)__b, (__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpnge_pd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpnlepd((__v2df)__b, (__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpeq_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpeqsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmplt_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpltsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmple_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmplesd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpgt_sd(__m128d __a, __m128d __b) { __m128d __c = __builtin_ia32_cmpltsd((__v2df)__b, (__v2df)__a); return __extension__ (__m128d) { __c[0], __a[1] }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpge_sd(__m128d __a, __m128d __b) { __m128d __c = __builtin_ia32_cmplesd((__v2df)__b, (__v2df)__a); return __extension__ (__m128d) { __c[0], __a[1] }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpord_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpordsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpunord_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpunordsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpneq_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpneqsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpnlt_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpnltsd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpnle_sd(__m128d __a, __m128d __b) { return (__m128d)__builtin_ia32_cmpnlesd((__v2df)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpngt_sd(__m128d __a, __m128d __b) { __m128d __c = __builtin_ia32_cmpnltsd((__v2df)__b, (__v2df)__a); return __extension__ (__m128d) { __c[0], __a[1] }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpnge_sd(__m128d __a, __m128d __b) { __m128d __c = __builtin_ia32_cmpnlesd((__v2df)__b, (__v2df)__a); return __extension__ (__m128d) { __c[0], __a[1] }; } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_comieq_sd(__m128d __a, __m128d __b) { return __builtin_ia32_comisdeq((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_comilt_sd(__m128d __a, __m128d __b) { return __builtin_ia32_comisdlt((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_comile_sd(__m128d __a, __m128d __b) { return __builtin_ia32_comisdle((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_comigt_sd(__m128d __a, __m128d __b) { return __builtin_ia32_comisdgt((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_comige_sd(__m128d __a, __m128d __b) { return __builtin_ia32_comisdge((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_comineq_sd(__m128d __a, __m128d __b) { return __builtin_ia32_comisdneq((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_ucomieq_sd(__m128d __a, __m128d __b) { return __builtin_ia32_ucomisdeq((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_ucomilt_sd(__m128d __a, __m128d __b) { return __builtin_ia32_ucomisdlt((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_ucomile_sd(__m128d __a, __m128d __b) { return __builtin_ia32_ucomisdle((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_ucomigt_sd(__m128d __a, __m128d __b) { return __builtin_ia32_ucomisdgt((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_ucomige_sd(__m128d __a, __m128d __b) { return __builtin_ia32_ucomisdge((__v2df)__a, (__v2df)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_ucomineq_sd(__m128d __a, __m128d __b) { return __builtin_ia32_ucomisdneq((__v2df)__a, (__v2df)__b); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtpd_ps(__m128d __a) { return __builtin_ia32_cvtpd2ps((__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtps_pd(__m128 __a) { return (__m128d) __builtin_convertvector( __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 0, 1), __v2df); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtepi32_pd(__m128i __a) { return (__m128d) __builtin_convertvector( __builtin_shufflevector((__v4si)__a, (__v4si)__a, 0, 1), __v2df); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtpd_epi32(__m128d __a) { return __builtin_ia32_cvtpd2dq((__v2df)__a); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsd_si32(__m128d __a) { return __builtin_ia32_cvtsd2si((__v2df)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsd_ss(__m128 __a, __m128d __b) { return (__m128)__builtin_ia32_cvtsd2ss((__v4sf)__a, (__v2df)__b); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsi32_sd(__m128d __a, int __b) { __a[0] = __b; return __a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtss_sd(__m128d __a, __m128 __b) { __a[0] = __b[0]; return __a; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvttpd_epi32(__m128d __a) { return (__m128i)__builtin_ia32_cvttpd2dq((__v2df)__a); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvttsd_si32(__m128d __a) { return __builtin_ia32_cvttsd2si((__v2df)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_cvtpd_pi32(__m128d __a) { return (__m64)__builtin_ia32_cvtpd2pi((__v2df)__a); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_cvttpd_pi32(__m128d __a) { return (__m64)__builtin_ia32_cvttpd2pi((__v2df)__a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_cvtpi32_pd(__m64 __a) { return __builtin_ia32_cvtpi2pd((__v2si)__a); } static __inline__ double __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsd_f64(__m128d __a) { return __a[0]; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_load_pd(double const *__dp) { return *(const __m128d*)__dp; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_load1_pd(double const *__dp) { struct __mm_load1_pd_struct { double __u; } __attribute__((__packed__, __may_alias__)); double __u = ((const struct __mm_load1_pd_struct*)__dp)->__u; return __extension__ (__m128d){ __u, __u }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadr_pd(double const *__dp) { __m128d __u = *(const __m128d*)__dp; return __builtin_shufflevector((__v2df)__u, (__v2df)__u, 1, 0); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadu_pd(double const *__dp) { struct __loadu_pd { __m128d_u __v; } __attribute__((__packed__, __may_alias__)); return ((const struct __loadu_pd*)__dp)->__v; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadu_si64(void const *__a) { struct __loadu_si64 { long long __v; } __attribute__((__packed__, __may_alias__)); long long __u = ((const struct __loadu_si64*)__a)->__v; return __extension__ (__m128i)(__v2di){__u, 0LL}; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadu_si32(void const *__a) { struct __loadu_si32 { int __v; } __attribute__((__packed__, __may_alias__)); int __u = ((const struct __loadu_si32*)__a)->__v; return __extension__ (__m128i)(__v4si){__u, 0, 0, 0}; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadu_si16(void const *__a) { struct __loadu_si16 { short __v; } __attribute__((__packed__, __may_alias__)); short __u = ((const struct __loadu_si16*)__a)->__v; return __extension__ (__m128i)(__v8hi){__u, 0, 0, 0, 0, 0, 0, 0}; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_load_sd(double const *__dp) { struct __mm_load_sd_struct { double __u; } __attribute__((__packed__, __may_alias__)); double __u = ((const struct __mm_load_sd_struct*)__dp)->__u; return __extension__ (__m128d){ __u, 0 }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadh_pd(__m128d __a, double const *__dp) { struct __mm_loadh_pd_struct { double __u; } __attribute__((__packed__, __may_alias__)); double __u = ((const struct __mm_loadh_pd_struct*)__dp)->__u; return __extension__ (__m128d){ __a[0], __u }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadl_pd(__m128d __a, double const *__dp) { struct __mm_loadl_pd_struct { double __u; } __attribute__((__packed__, __may_alias__)); double __u = ((const struct __mm_loadl_pd_struct*)__dp)->__u; return __extension__ (__m128d){ __u, __a[1] }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_undefined_pd(void) { return (__m128d)__builtin_ia32_undef128(); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_sd(double __w) { return __extension__ (__m128d){ __w, 0 }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set1_pd(double __w) { return __extension__ (__m128d){ __w, __w }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_pd1(double __w) { return _mm_set1_pd(__w); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_pd(double __w, double __x) { return __extension__ (__m128d){ __x, __w }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setr_pd(double __w, double __x) { return __extension__ (__m128d){ __w, __x }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setzero_pd(void) { return __extension__ (__m128d){ 0, 0 }; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_move_sd(__m128d __a, __m128d __b) { __a[0] = __b[0]; return __a; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_store_sd(double *__dp, __m128d __a) { struct __mm_store_sd_struct { double __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_store_sd_struct*)__dp)->__u = __a[0]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_store_pd(double *__dp, __m128d __a) { *(__m128d*)__dp = __a; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_store1_pd(double *__dp, __m128d __a) { __a = __builtin_shufflevector((__v2df)__a, (__v2df)__a, 0, 0); _mm_store_pd(__dp, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_store_pd1(double *__dp, __m128d __a) { _mm_store1_pd(__dp, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeu_pd(double *__dp, __m128d __a) { struct __storeu_pd { __m128d_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_pd*)__dp)->__v = __a; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storer_pd(double *__dp, __m128d __a) { __a = __builtin_shufflevector((__v2df)__a, (__v2df)__a, 1, 0); *(__m128d *)__dp = __a; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeh_pd(double *__dp, __m128d __a) { struct __mm_storeh_pd_struct { double __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_storeh_pd_struct*)__dp)->__u = __a[1]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storel_pd(double *__dp, __m128d __a) { struct __mm_storeh_pd_struct { double __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_storeh_pd_struct*)__dp)->__u = __a[0]; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi8(__m128i __a, __m128i __b) { return (__m128i)((__v16qu)__a + (__v16qu)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi16(__m128i __a, __m128i __b) { return (__m128i)((__v8hu)__a + (__v8hu)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi32(__m128i __a, __m128i __b) { return (__m128i)((__v4su)__a + (__v4su)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_add_si64(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_paddq((__v1di)__a, (__v1di)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_add_epi64(__m128i __a, __m128i __b) { return (__m128i)((__v2du)__a + (__v2du)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epi8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_paddsb128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_paddsw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epu8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_paddusb128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_adds_epu16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_paddusw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_avg_epu8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pavgb128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_avg_epu16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pavgw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_madd_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pmaddwd128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_max_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pmaxsw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_max_epu8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pmaxub128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_min_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pminsw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_min_epu8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pminub128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mulhi_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pmulhw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mulhi_epu16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_pmulhuw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mullo_epi16(__m128i __a, __m128i __b) { return (__m128i)((__v8hu)__a * (__v8hu)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_mul_su32(__m64 __a, __m64 __b) { return __builtin_ia32_pmuludq((__v2si)__a, (__v2si)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_mul_epu32(__m128i __a, __m128i __b) { return __builtin_ia32_pmuludq128((__v4si)__a, (__v4si)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sad_epu8(__m128i __a, __m128i __b) { return __builtin_ia32_psadbw128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi8(__m128i __a, __m128i __b) { return (__m128i)((__v16qu)__a - (__v16qu)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi16(__m128i __a, __m128i __b) { return (__m128i)((__v8hu)__a - (__v8hu)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi32(__m128i __a, __m128i __b) { return (__m128i)((__v4su)__a - (__v4su)__b); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("mmx,sse2"), __min_vector_width__(64))) _mm_sub_si64(__m64 __a, __m64 __b) { return (__m64)__builtin_ia32_psubq((__v1di)__a, (__v1di)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sub_epi64(__m128i __a, __m128i __b) { return (__m128i)((__v2du)__a - (__v2du)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_subs_epi8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_psubsb128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_subs_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_psubsw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_subs_epu8(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_psubusb128((__v16qi)__a, (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_subs_epu16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_psubusw128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_and_si128(__m128i __a, __m128i __b) { return (__m128i)((__v2du)__a & (__v2du)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_andnot_si128(__m128i __a, __m128i __b) { return (__m128i)(~(__v2du)__a & (__v2du)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_or_si128(__m128i __a, __m128i __b) { return (__m128i)((__v2du)__a | (__v2du)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_xor_si128(__m128i __a, __m128i __b) { return (__m128i)((__v2du)__a ^ (__v2du)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_slli_epi16(__m128i __a, int __count) { return (__m128i)__builtin_ia32_psllwi128((__v8hi)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sll_epi16(__m128i __a, __m128i __count) { return (__m128i)__builtin_ia32_psllw128((__v8hi)__a, (__v8hi)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_slli_epi32(__m128i __a, int __count) { return (__m128i)__builtin_ia32_pslldi128((__v4si)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sll_epi32(__m128i __a, __m128i __count) { return (__m128i)__builtin_ia32_pslld128((__v4si)__a, (__v4si)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_slli_epi64(__m128i __a, int __count) { return __builtin_ia32_psllqi128((__v2di)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sll_epi64(__m128i __a, __m128i __count) { return __builtin_ia32_psllq128((__v2di)__a, (__v2di)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srai_epi16(__m128i __a, int __count) { return (__m128i)__builtin_ia32_psrawi128((__v8hi)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sra_epi16(__m128i __a, __m128i __count) { return (__m128i)__builtin_ia32_psraw128((__v8hi)__a, (__v8hi)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srai_epi32(__m128i __a, int __count) { return (__m128i)__builtin_ia32_psradi128((__v4si)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_sra_epi32(__m128i __a, __m128i __count) { return (__m128i)__builtin_ia32_psrad128((__v4si)__a, (__v4si)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srli_epi16(__m128i __a, int __count) { return (__m128i)__builtin_ia32_psrlwi128((__v8hi)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srl_epi16(__m128i __a, __m128i __count) { return (__m128i)__builtin_ia32_psrlw128((__v8hi)__a, (__v8hi)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srli_epi32(__m128i __a, int __count) { return (__m128i)__builtin_ia32_psrldi128((__v4si)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srl_epi32(__m128i __a, __m128i __count) { return (__m128i)__builtin_ia32_psrld128((__v4si)__a, (__v4si)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srli_epi64(__m128i __a, int __count) { return __builtin_ia32_psrlqi128((__v2di)__a, __count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_srl_epi64(__m128i __a, __m128i __count) { return __builtin_ia32_psrlq128((__v2di)__a, (__v2di)__count); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpeq_epi8(__m128i __a, __m128i __b) { return (__m128i)((__v16qi)__a == (__v16qi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpeq_epi16(__m128i __a, __m128i __b) { return (__m128i)((__v8hi)__a == (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpeq_epi32(__m128i __a, __m128i __b) { return (__m128i)((__v4si)__a == (__v4si)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpgt_epi8(__m128i __a, __m128i __b) { return (__m128i)((__v16qs)__a > (__v16qs)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpgt_epi16(__m128i __a, __m128i __b) { return (__m128i)((__v8hi)__a > (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmpgt_epi32(__m128i __a, __m128i __b) { return (__m128i)((__v4si)__a > (__v4si)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmplt_epi8(__m128i __a, __m128i __b) { return _mm_cmpgt_epi8(__b, __a); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmplt_epi16(__m128i __a, __m128i __b) { return _mm_cmpgt_epi16(__b, __a); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cmplt_epi32(__m128i __a, __m128i __b) { return _mm_cmpgt_epi32(__b, __a); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsi64_sd(__m128d __a, long long __b) { __a[0] = __b; return __a; } static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsd_si64(__m128d __a) { return __builtin_ia32_cvtsd2si64((__v2df)__a); } static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvttsd_si64(__m128d __a) { return __builtin_ia32_cvttsd2si64((__v2df)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtepi32_ps(__m128i __a) { return (__m128)__builtin_convertvector((__v4si)__a, __v4sf); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtps_epi32(__m128 __a) { return (__m128i)__builtin_ia32_cvtps2dq((__v4sf)__a); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvttps_epi32(__m128 __a) { return (__m128i)__builtin_ia32_cvttps2dq((__v4sf)__a); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsi32_si128(int __a) { return __extension__ (__m128i)(__v4si){ __a, 0, 0, 0 }; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsi64_si128(long long __a) { return __extension__ (__m128i)(__v2di){ __a, 0 }; } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsi128_si32(__m128i __a) { __v4si __b = (__v4si)__a; return __b[0]; } static __inline__ long long __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_cvtsi128_si64(__m128i __a) { return __a[0]; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_load_si128(__m128i const *__p) { return *__p; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadu_si128(__m128i_u const *__p) { struct __loadu_si128 { __m128i_u __v; } __attribute__((__packed__, __may_alias__)); return ((const struct __loadu_si128*)__p)->__v; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_loadl_epi64(__m128i_u const *__p) { struct __mm_loadl_epi64_struct { long long __u; } __attribute__((__packed__, __may_alias__)); return __extension__ (__m128i) { ((const struct __mm_loadl_epi64_struct*)__p)->__u, 0}; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_undefined_si128(void) { return (__m128i)__builtin_ia32_undef128(); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_epi64x(long long __q1, long long __q0) { return __extension__ (__m128i)(__v2di){ __q0, __q1 }; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_epi64(__m64 __q1, __m64 __q0) { return _mm_set_epi64x((long long)__q1, (long long)__q0); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_epi32(int __i3, int __i2, int __i1, int __i0) { return __extension__ (__m128i)(__v4si){ __i0, __i1, __i2, __i3}; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_epi16(short __w7, short __w6, short __w5, short __w4, short __w3, short __w2, short __w1, short __w0) { return __extension__ (__m128i)(__v8hi){ __w0, __w1, __w2, __w3, __w4, __w5, __w6, __w7 }; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set_epi8(char __b15, char __b14, char __b13, char __b12, char __b11, char __b10, char __b9, char __b8, char __b7, char __b6, char __b5, char __b4, char __b3, char __b2, char __b1, char __b0) { return __extension__ (__m128i)(__v16qi){ __b0, __b1, __b2, __b3, __b4, __b5, __b6, __b7, __b8, __b9, __b10, __b11, __b12, __b13, __b14, __b15 }; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set1_epi64x(long long __q) { return _mm_set_epi64x(__q, __q); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set1_epi64(__m64 __q) { return _mm_set_epi64(__q, __q); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set1_epi32(int __i) { return _mm_set_epi32(__i, __i, __i, __i); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set1_epi16(short __w) { return _mm_set_epi16(__w, __w, __w, __w, __w, __w, __w, __w); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_set1_epi8(char __b) { return _mm_set_epi8(__b, __b, __b, __b, __b, __b, __b, __b, __b, __b, __b, __b, __b, __b, __b, __b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setr_epi64(__m64 __q0, __m64 __q1) { return _mm_set_epi64(__q1, __q0); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setr_epi32(int __i0, int __i1, int __i2, int __i3) { return _mm_set_epi32(__i3, __i2, __i1, __i0); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setr_epi16(short __w0, short __w1, short __w2, short __w3, short __w4, short __w5, short __w6, short __w7) { return _mm_set_epi16(__w7, __w6, __w5, __w4, __w3, __w2, __w1, __w0); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setr_epi8(char __b0, char __b1, char __b2, char __b3, char __b4, char __b5, char __b6, char __b7, char __b8, char __b9, char __b10, char __b11, char __b12, char __b13, char __b14, char __b15) { return _mm_set_epi8(__b15, __b14, __b13, __b12, __b11, __b10, __b9, __b8, __b7, __b6, __b5, __b4, __b3, __b2, __b1, __b0); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_setzero_si128(void) { return __extension__ (__m128i)(__v2di){ 0LL, 0LL }; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_store_si128(__m128i *__p, __m128i __b) { *__p = __b; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeu_si128(__m128i_u *__p, __m128i __b) { struct __storeu_si128 { __m128i_u __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si128*)__p)->__v = __b; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeu_si64(void *__p, __m128i __b) { struct __storeu_si64 { long long __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si64*)__p)->__v = ((__v2di)__b)[0]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeu_si32(void *__p, __m128i __b) { struct __storeu_si32 { int __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si32*)__p)->__v = ((__v4si)__b)[0]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storeu_si16(void *__p, __m128i __b) { struct __storeu_si16 { short __v; } __attribute__((__packed__, __may_alias__)); ((struct __storeu_si16*)__p)->__v = ((__v8hi)__b)[0]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_maskmoveu_si128(__m128i __d, __m128i __n, char *__p) { __builtin_ia32_maskmovdqu((__v16qi)__d, (__v16qi)__n, __p); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_storel_epi64(__m128i_u *__p, __m128i __a) { struct __mm_storel_epi64_struct { long long __u; } __attribute__((__packed__, __may_alias__)); ((struct __mm_storel_epi64_struct*)__p)->__u = __a[0]; } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_stream_pd(double *__p, __m128d __a) { __builtin_nontemporal_store((__v2df)__a, (__v2df*)__p); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_stream_si128(__m128i *__p, __m128i __a) { __builtin_nontemporal_store((__v2di)__a, (__v2di*)__p); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"))) _mm_stream_si32(int *__p, int __a) { __builtin_ia32_movnti(__p, __a); } static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("sse2"))) _mm_stream_si64(long long *__p, long long __a) { __builtin_ia32_movnti64(__p, __a); } extern "C" { void _mm_clflush(void const * __p); void _mm_lfence(void); void _mm_mfence(void); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_packs_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_packsswb128((__v8hi)__a, (__v8hi)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_packs_epi32(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_packssdw128((__v4si)__a, (__v4si)__b); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_packus_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_ia32_packuswb128((__v8hi)__a, (__v8hi)__b); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_movemask_epi8(__m128i __a) { return __builtin_ia32_pmovmskb128((__v16qi)__a); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpackhi_epi8(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v16qi)__a, (__v16qi)__b, 8, 16+8, 9, 16+9, 10, 16+10, 11, 16+11, 12, 16+12, 13, 16+13, 14, 16+14, 15, 16+15); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpackhi_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v8hi)__a, (__v8hi)__b, 4, 8+4, 5, 8+5, 6, 8+6, 7, 8+7); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpackhi_epi32(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v4si)__a, (__v4si)__b, 2, 4+2, 3, 4+3); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpackhi_epi64(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v2di)__a, (__v2di)__b, 1, 2+1); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpacklo_epi8(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v16qi)__a, (__v16qi)__b, 0, 16+0, 1, 16+1, 2, 16+2, 3, 16+3, 4, 16+4, 5, 16+5, 6, 16+6, 7, 16+7); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpacklo_epi16(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v8hi)__a, (__v8hi)__b, 0, 8+0, 1, 8+1, 2, 8+2, 3, 8+3); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpacklo_epi32(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v4si)__a, (__v4si)__b, 0, 4+0, 1, 4+1); } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpacklo_epi64(__m128i __a, __m128i __b) { return (__m128i)__builtin_shufflevector((__v2di)__a, (__v2di)__b, 0, 2+0); } static __inline__ __m64 __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_movepi64_pi64(__m128i __a) { return (__m64)__a[0]; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_movpi64_epi64(__m64 __a) { return __extension__ (__m128i)(__v2di){ (long long)__a, 0 }; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_move_epi64(__m128i __a) { return __builtin_shufflevector((__v2di)__a, _mm_setzero_si128(), 0, 2); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpackhi_pd(__m128d __a, __m128d __b) { return __builtin_shufflevector((__v2df)__a, (__v2df)__b, 1, 2+1); } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_unpacklo_pd(__m128d __a, __m128d __b) { return __builtin_shufflevector((__v2df)__a, (__v2df)__b, 0, 2+0); } static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_movemask_pd(__m128d __a) { return __builtin_ia32_movmskpd((__v2df)__a); } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_castpd_ps(__m128d __a) { return (__m128)__a; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_castpd_si128(__m128d __a) { return (__m128i)__a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_castps_pd(__m128 __a) { return (__m128d)__a; } static __inline__ __m128i __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_castps_si128(__m128 __a) { return (__m128i)__a; } static __inline__ __m128 __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_castsi128_ps(__m128i __a) { return (__m128)__a; } static __inline__ __m128d __attribute__((__always_inline__, __nodebug__, __target__("sse2"), __min_vector_width__(128))) _mm_castsi128_pd(__m128i __a) { return (__m128d)__a; } extern "C" { void _mm_pause(void); } extern "C" { #pragma options align=power typedef struct OpaqueAreaID* AreaID; struct MachineInformationPowerPC { UnsignedWide CTR; UnsignedWide LR; UnsignedWide PC; unsigned long CRRegister; unsigned long XER; unsigned long MSR; unsigned long MQ; unsigned long ExceptKind; unsigned long DSISR; UnsignedWide DAR; UnsignedWide Reserved; }; typedef struct MachineInformationPowerPC MachineInformationPowerPC; struct RegisterInformationPowerPC { UnsignedWide R0; UnsignedWide R1; UnsignedWide R2; UnsignedWide R3; UnsignedWide R4; UnsignedWide R5; UnsignedWide R6; UnsignedWide R7; UnsignedWide R8; UnsignedWide R9; UnsignedWide R10; UnsignedWide R11; UnsignedWide R12; UnsignedWide R13; UnsignedWide R14; UnsignedWide R15; UnsignedWide R16; UnsignedWide R17; UnsignedWide R18; UnsignedWide R19; UnsignedWide R20; UnsignedWide R21; UnsignedWide R22; UnsignedWide R23; UnsignedWide R24; UnsignedWide R25; UnsignedWide R26; UnsignedWide R27; UnsignedWide R28; UnsignedWide R29; UnsignedWide R30; UnsignedWide R31; }; typedef struct RegisterInformationPowerPC RegisterInformationPowerPC; struct FPUInformationPowerPC { UnsignedWide Registers[32]; unsigned long FPSCR; unsigned long Reserved; }; typedef struct FPUInformationPowerPC FPUInformationPowerPC; union Vector128 { unsigned long l[4]; unsigned short s[8]; unsigned char c[16]; }; typedef union Vector128 Vector128; struct VectorInformationPowerPC { Vector128 Registers[32]; Vector128 VSCR; UInt32 VRsave; }; typedef struct VectorInformationPowerPC VectorInformationPowerPC; enum { kWriteReference = 0, kReadReference = 1, kFetchReference = 2, writeReference = kWriteReference, readReference = kReadReference, fetchReference = kFetchReference }; typedef unsigned long MemoryReferenceKind; struct MemoryExceptionInformation { AreaID theArea; LogicalAddress theAddress; OSStatus theError; MemoryReferenceKind theReference; }; typedef struct MemoryExceptionInformation MemoryExceptionInformation; enum { kUnknownException = 0, kIllegalInstructionException = 1, kTrapException = 2, kAccessException = 3, kUnmappedMemoryException = 4, kExcludedMemoryException = 5, kReadOnlyMemoryException = 6, kUnresolvablePageFaultException = 7, kPrivilegeViolationException = 8, kTraceException = 9, kInstructionBreakpointException = 10, kDataBreakpointException = 11, kIntegerException = 12, kFloatingPointException = 13, kStackOverflowException = 14, kTaskTerminationException = 15, kTaskCreationException = 16, kDataAlignmentException = 17 }; typedef unsigned long ExceptionKind; union ExceptionInfo { MemoryExceptionInformation * memoryInfo; }; typedef union ExceptionInfo ExceptionInfo; struct ExceptionInformationPowerPC { ExceptionKind theKind; MachineInformationPowerPC * machineState; RegisterInformationPowerPC * registerImage; FPUInformationPowerPC * FPUImage; ExceptionInfo info; VectorInformationPowerPC * vectorImage; }; typedef struct ExceptionInformationPowerPC ExceptionInformationPowerPC; union Vector128Intel { __m128 s; __m128i si; __m128d sd; unsigned char c[16]; }; typedef union Vector128Intel Vector128Intel; struct MachineInformationIntel64 { unsigned long CS; unsigned long FS; unsigned long GS; unsigned long RFLAGS; unsigned long RIP; unsigned long ExceptTrap; unsigned long ExceptErr; unsigned long ExceptAddr; }; typedef struct MachineInformationIntel64 MachineInformationIntel64; struct RegisterInformationIntel64 { unsigned long RAX; unsigned long RBX; unsigned long RCX; unsigned long RDX; unsigned long RDI; unsigned long RSI; unsigned long RBP; unsigned long RSP; unsigned long R8; unsigned long R9; unsigned long R10; unsigned long R11; unsigned long R12; unsigned long R13; unsigned long R14; unsigned long R15; }; typedef struct RegisterInformationIntel64 RegisterInformationIntel64; typedef unsigned char FPRegIntel[10]; struct FPUInformationIntel64 { FPRegIntel Registers[8]; unsigned short Control; unsigned short Status; unsigned short Tag; unsigned short Opcode; unsigned int IP; unsigned int DP; unsigned int DS; }; typedef struct FPUInformationIntel64 FPUInformationIntel64; struct VectorInformationIntel64 { Vector128Intel Registers[16]; }; typedef struct VectorInformationIntel64 VectorInformationIntel64; typedef MachineInformationIntel64 MachineInformation; typedef RegisterInformationIntel64 RegisterInformation; typedef FPUInformationIntel64 FPUInformation; typedef VectorInformationIntel64 VectorInformation; struct ExceptionInformation { ExceptionKind theKind; MachineInformation * machineState; RegisterInformation * registerImage; FPUInformation * FPUImage; ExceptionInfo info; VectorInformation * vectorImage; }; typedef struct ExceptionInformation ExceptionInformation; typedef OSStatus ( * ExceptionHandlerProcPtr)(ExceptionInformation * theException); typedef ExceptionHandlerProcPtr ExceptionHandlerUPP; extern ExceptionHandlerUPP NewExceptionHandlerUPP(ExceptionHandlerProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern void DisposeExceptionHandlerUPP(ExceptionHandlerUPP userUPP) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus InvokeExceptionHandlerUPP( ExceptionInformation * theException, ExceptionHandlerUPP userUPP) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); inline ExceptionHandlerUPP NewExceptionHandlerUPP(ExceptionHandlerProcPtr userRoutine) { return userRoutine; } inline void DisposeExceptionHandlerUPP(ExceptionHandlerUPP) { } inline OSStatus InvokeExceptionHandlerUPP(ExceptionInformation * theException, ExceptionHandlerUPP userUPP) { return (*userUPP)(theException); } typedef ExceptionHandlerUPP ExceptionHandlerTPP; typedef ExceptionHandlerTPP ExceptionHandler; extern ExceptionHandlerTPP InstallExceptionHandler(ExceptionHandlerTPP theHandler) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer support"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma options align=reset } extern "C" { #pragma options align=power enum { durationMicrosecond = -1L, durationMillisecond = 1, durationSecond = 1000, durationMinute = 60000, durationHour = 3600000, durationDay = 86400000, durationNoWait = 0, durationForever = 0x7FFFFFFF }; typedef UnsignedWide Nanoseconds; extern AbsoluteTime UpTime(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Nanoseconds AbsoluteToNanoseconds(AbsoluteTime absoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Duration AbsoluteToDuration(AbsoluteTime absoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime NanosecondsToAbsolute(Nanoseconds nanoseconds) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime DurationToAbsolute(Duration duration) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime AddAbsoluteToAbsolute( AbsoluteTime absoluteTime1, AbsoluteTime absoluteTime2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime SubAbsoluteFromAbsolute( AbsoluteTime leftAbsoluteTime, AbsoluteTime rightAbsoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime AddNanosecondsToAbsolute( Nanoseconds nanoseconds, AbsoluteTime absoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime AddDurationToAbsolute( Duration duration, AbsoluteTime absoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime SubNanosecondsFromAbsolute( Nanoseconds nanoseconds, AbsoluteTime absoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern AbsoluteTime SubDurationFromAbsolute( Duration duration, AbsoluteTime absoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Nanoseconds AbsoluteDeltaToNanoseconds( AbsoluteTime leftAbsoluteTime, AbsoluteTime rightAbsoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Duration AbsoluteDeltaToDuration( AbsoluteTime leftAbsoluteTime, AbsoluteTime rightAbsoluteTime) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Nanoseconds DurationToNanoseconds(Duration theDuration) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Duration NanosecondsToDuration(Nanoseconds theNanoseconds) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); #pragma options align=reset } extern "C" { #pragma pack(push, 2) struct NumFormatString { UInt8 fLength; UInt8 fVersion; char data[254]; }; typedef struct NumFormatString NumFormatString; typedef NumFormatString NumFormatStringRec; typedef short FormatStatus; enum { fVNumber = 0 }; typedef SInt8 FormatClass; enum { fPositive = 0, fNegative = 1, fZero = 2 }; typedef SInt8 FormatResultType; enum { fFormatOK = 0, fBestGuess = 1, fOutOfSynch = 2, fSpuriousChars = 3, fMissingDelimiter = 4, fExtraDecimal = 5, fMissingLiteral = 6, fExtraExp = 7, fFormatOverflow = 8, fFormStrIsNAN = 9, fBadPartsTable = 10, fExtraPercent = 11, fExtraSeparator = 12, fEmptyFormatString = 13 }; struct FVector { short start; short length; }; typedef struct FVector FVector; typedef FVector TripleInt[3]; extern void numtostring( long theNum, char * theString) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); #pragma pack(pop) } extern "C" { enum { systemCurLang = -2, systemDefLang = -3, currentCurLang = -4, currentDefLang = -5, scriptCurLang = -6, scriptDefLang = -7 }; enum { iuSystemCurLang = systemCurLang, iuSystemDefLang = systemDefLang, iuCurrentCurLang = currentCurLang, iuCurrentDefLang = currentDefLang, iuScriptCurLang = scriptCurLang, iuScriptDefLang = scriptDefLang }; } extern "C" { #pragma pack(push, 2) extern long Munger( Handle h, long offset, const void * ptr1, long len1, const void * ptr2, long len2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.6))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) extern Boolean BitTst( const void * bytePtr, long bitNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void BitSet( void * bytePtr, long bitNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void BitClr( void * bytePtr, long bitNum) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long BitAnd( long value1, long value2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long BitOr( long value1, long value2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long BitXor( long value1, long value2) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long BitNot(long value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long BitShift( long value, short count) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef UInt16 UCKeyOutput; typedef UInt16 UCKeyCharSeq; enum { kUCKeyOutputStateIndexMask = 0x4000, kUCKeyOutputSequenceIndexMask = 0x8000, kUCKeyOutputTestForIndexMask = 0xC000, kUCKeyOutputGetIndexMask = 0x3FFF }; struct UCKeyStateRecord { UCKeyCharSeq stateZeroCharData; UInt16 stateZeroNextState; UInt16 stateEntryCount; UInt16 stateEntryFormat; UInt32 stateEntryData[1]; }; typedef struct UCKeyStateRecord UCKeyStateRecord; enum { kUCKeyStateEntryTerminalFormat = 0x0001, kUCKeyStateEntryRangeFormat = 0x0002 }; struct UCKeyStateEntryTerminal { UInt16 curState; UCKeyCharSeq charData; }; typedef struct UCKeyStateEntryTerminal UCKeyStateEntryTerminal; struct UCKeyStateEntryRange { UInt16 curStateStart; UInt8 curStateRange; UInt8 deltaMultiplier; UCKeyCharSeq charData; UInt16 nextState; }; typedef struct UCKeyStateEntryRange UCKeyStateEntryRange; struct UCKeyboardTypeHeader { UInt32 keyboardTypeFirst; UInt32 keyboardTypeLast; UInt32 keyModifiersToTableNumOffset; UInt32 keyToCharTableIndexOffset; UInt32 keyStateRecordsIndexOffset; UInt32 keyStateTerminatorsOffset; UInt32 keySequenceDataIndexOffset; }; typedef struct UCKeyboardTypeHeader UCKeyboardTypeHeader; struct UCKeyboardLayout { UInt16 keyLayoutHeaderFormat; UInt16 keyLayoutDataVersion; UInt32 keyLayoutFeatureInfoOffset; UInt32 keyboardTypeCount; UCKeyboardTypeHeader keyboardTypeList[1]; }; typedef struct UCKeyboardLayout UCKeyboardLayout; struct UCKeyLayoutFeatureInfo { UInt16 keyLayoutFeatureInfoFormat; UInt16 reserved; UInt32 maxOutputStringLength; }; typedef struct UCKeyLayoutFeatureInfo UCKeyLayoutFeatureInfo; struct UCKeyModifiersToTableNum { UInt16 keyModifiersToTableNumFormat; UInt16 defaultTableNum; UInt32 modifiersCount; UInt8 tableNum[1]; }; typedef struct UCKeyModifiersToTableNum UCKeyModifiersToTableNum; struct UCKeyToCharTableIndex { UInt16 keyToCharTableIndexFormat; UInt16 keyToCharTableSize; UInt32 keyToCharTableCount; UInt32 keyToCharTableOffsets[1]; }; typedef struct UCKeyToCharTableIndex UCKeyToCharTableIndex; struct UCKeyStateRecordsIndex { UInt16 keyStateRecordsIndexFormat; UInt16 keyStateRecordCount; UInt32 keyStateRecordOffsets[1]; }; typedef struct UCKeyStateRecordsIndex UCKeyStateRecordsIndex; struct UCKeyStateTerminators { UInt16 keyStateTerminatorsFormat; UInt16 keyStateTerminatorCount; UCKeyCharSeq keyStateTerminators[1]; }; typedef struct UCKeyStateTerminators UCKeyStateTerminators; struct UCKeySequenceDataIndex { UInt16 keySequenceDataIndexFormat; UInt16 charSequenceCount; UInt16 charSequenceOffsets[1]; }; typedef struct UCKeySequenceDataIndex UCKeySequenceDataIndex; enum { kUCKeyLayoutHeaderFormat = 0x1002, kUCKeyLayoutFeatureInfoFormat = 0x2001, kUCKeyModifiersToTableNumFormat = 0x3001, kUCKeyToCharTableIndexFormat = 0x4001, kUCKeyStateRecordsIndexFormat = 0x5001, kUCKeyStateTerminatorsFormat = 0x6001, kUCKeySequenceDataIndexFormat = 0x7001 }; enum { kUCKeyActionDown = 0, kUCKeyActionUp = 1, kUCKeyActionAutoKey = 2, kUCKeyActionDisplay = 3 }; enum { kUCKeyTranslateNoDeadKeysBit = 0 }; enum { kUCKeyTranslateNoDeadKeysMask = 1L << kUCKeyTranslateNoDeadKeysBit }; enum { kUnicodeCollationClass = 'ucol' }; typedef struct OpaqueCollatorRef* CollatorRef; typedef UInt32 UCCollateOptions; enum { kUCCollateComposeInsensitiveMask = 1L << 1, kUCCollateWidthInsensitiveMask = 1L << 2, kUCCollateCaseInsensitiveMask = 1L << 3, kUCCollateDiacritInsensitiveMask = 1L << 4, kUCCollatePunctuationSignificantMask = 1L << 15, kUCCollateDigitsOverrideMask = 1L << 16, kUCCollateDigitsAsNumberMask = 1L << 17 }; enum { kUCCollateStandardOptions = kUCCollateComposeInsensitiveMask | kUCCollateWidthInsensitiveMask }; enum { kUCCollateTypeHFSExtended = 1 }; enum { kUCCollateTypeSourceMask = 0x000000FF, kUCCollateTypeShiftBits = 24 }; enum { kUCCollateTypeMask = (UInt32)kUCCollateTypeSourceMask << kUCCollateTypeShiftBits }; typedef UInt32 UCCollationValue; typedef struct OpaqueUCTypeSelectRef* UCTypeSelectRef; typedef SInt32 UCTypeSelectCompareResult; typedef UInt16 UCTSWalkDirection; enum { kUCTSDirectionNext = 0, kUCTSDirectionPrevious = 1 }; typedef UInt16 UCTypeSelectOptions; enum { kUCTSOptionsNoneMask = 0, kUCTSOptionsReleaseStringMask = 1, kUCTSOptionsDataIsOrderedMask = 2 }; typedef Boolean ( * IndexToUCStringProcPtr)(UInt32 index, void *listDataPtr, void *refcon, CFStringRef *outString, UCTypeSelectOptions *tsOptions); typedef IndexToUCStringProcPtr IndexToUCStringUPP; extern IndexToUCStringUPP NewIndexToUCStringUPP(IndexToUCStringProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.4))); extern void DisposeIndexToUCStringUPP(IndexToUCStringUPP userUPP) __attribute__((availability(macosx,introduced=10.4))); extern Boolean InvokeIndexToUCStringUPP( UInt32 index, void * listDataPtr, void * refcon, CFStringRef * outString, UCTypeSelectOptions * tsOptions, IndexToUCStringUPP userUPP) __attribute__((availability(macosx,introduced=10.4))); inline IndexToUCStringUPP NewIndexToUCStringUPP(IndexToUCStringProcPtr userRoutine) { return userRoutine; } inline void DisposeIndexToUCStringUPP(IndexToUCStringUPP) { } inline Boolean InvokeIndexToUCStringUPP(UInt32 index, void * listDataPtr, void * refcon, CFStringRef * outString, UCTypeSelectOptions * tsOptions, IndexToUCStringUPP userUPP) { return (*userUPP)(index, listDataPtr, refcon, outString, tsOptions); } enum { kUCTypeSelectMaxListSize = (UInt32)0xFFFFFFFF }; enum { kUnicodeTextBreakClass = 'ubrk' }; typedef struct OpaqueTextBreakLocatorRef* TextBreakLocatorRef; typedef UInt32 UCTextBreakType; enum { kUCTextBreakCharMask = 1L << 0, kUCTextBreakClusterMask = 1L << 2, kUCTextBreakWordMask = 1L << 4, kUCTextBreakLineMask = 1L << 6, kUCTextBreakParagraphMask = 1L << 8 }; typedef UInt32 UCTextBreakOptions; enum { kUCTextBreakLeadingEdgeMask = 1L << 0, kUCTextBreakGoBackwardsMask = 1L << 1, kUCTextBreakIterateMask = 1L << 2 }; extern OSStatus UCKeyTranslate( const UCKeyboardLayout * keyLayoutPtr, UInt16 virtualKeyCode, UInt16 keyAction, UInt32 modifierKeyState, UInt32 keyboardType, OptionBits keyTranslateOptions, UInt32 * deadKeyState, UniCharCount maxStringLength, UniCharCount * actualStringLength, UniChar unicodeString[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCCreateCollator( LocaleRef locale, LocaleOperationVariant opVariant, UCCollateOptions options, CollatorRef * collatorRef) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCGetCollationKey( CollatorRef collatorRef, const UniChar * textPtr, UniCharCount textLength, ItemCount maxKeySize, ItemCount * actualKeySize, UCCollationValue collationKey[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCCompareCollationKeys( const UCCollationValue * key1Ptr, ItemCount key1Length, const UCCollationValue * key2Ptr, ItemCount key2Length, Boolean * equivalent, SInt32 * order) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCCompareText( CollatorRef collatorRef, const UniChar * text1Ptr, UniCharCount text1Length, const UniChar * text2Ptr, UniCharCount text2Length, Boolean * equivalent, SInt32 * order) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCDisposeCollator(CollatorRef * collatorRef) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCCompareTextDefault( UCCollateOptions options, const UniChar * text1Ptr, UniCharCount text1Length, const UniChar * text2Ptr, UniCharCount text2Length, Boolean * equivalent, SInt32 * order) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCCompareTextNoLocale( UCCollateOptions options, const UniChar * text1Ptr, UniCharCount text1Length, const UniChar * text2Ptr, UniCharCount text2Length, Boolean * equivalent, SInt32 * order) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus UCCreateTextBreakLocator( LocaleRef locale, LocaleOperationVariant opVariant, UCTextBreakType breakTypes, TextBreakLocatorRef * breakRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.6))); extern OSStatus UCFindTextBreak( TextBreakLocatorRef breakRef, UCTextBreakType breakType, UCTextBreakOptions options, const UniChar * textPtr, UniCharCount textLength, UniCharArrayOffset startOffset, UniCharArrayOffset * breakOffset) __attribute__((availability(macosx,introduced=10.0,deprecated=10.6))); extern OSStatus UCDisposeTextBreakLocator(TextBreakLocatorRef * breakRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.6))); extern OSStatus UCTypeSelectCreateSelector( LocaleRef locale, LocaleOperationVariant opVariant, UCCollateOptions options, UCTypeSelectRef * newSelector) __attribute__((availability(macosx,introduced=10.4))); extern OSStatus UCTypeSelectFlushSelectorData(UCTypeSelectRef ref) __attribute__((availability(macosx,introduced=10.4))); extern OSStatus UCTypeSelectReleaseSelector(UCTypeSelectRef * ref) __attribute__((availability(macosx,introduced=10.4))); extern Boolean UCTypeSelectWouldResetBuffer( UCTypeSelectRef inRef, CFStringRef inText, double inEventTime) __attribute__((availability(macosx,introduced=10.4))); extern OSStatus UCTypeSelectAddKeyToSelector( UCTypeSelectRef inRef, CFStringRef inText, double inEventTime, Boolean * updateFlag) __attribute__((availability(macosx,introduced=10.4))); extern OSStatus UCTypeSelectCompare( UCTypeSelectRef ref, CFStringRef inText, UCTypeSelectCompareResult * result) __attribute__((availability(macosx,introduced=10.4))); extern OSStatus UCTypeSelectFindItem( UCTypeSelectRef ref, UInt32 listSize, void * listDataPtr, void * refcon, IndexToUCStringUPP userUPP, UInt32 * closestItem) __attribute__((availability(macosx,introduced=10.4))); extern OSStatus UCTypeSelectWalkList( UCTypeSelectRef ref, CFStringRef currSelect, UCTSWalkDirection direction, UInt32 listSize, void * listDataPtr, void * refcon, IndexToUCStringUPP userUPP, UInt32 * closestItem) __attribute__((availability(macosx,introduced=10.4))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) extern const double_t pi __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern double compound(double rate, double periods) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern double annuity(double rate, double periods) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern double_t randomx(double_t * x) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); typedef short relop; enum { GREATERTHAN = 0, LESSTHAN = 1, EQUALTO = 2, UNORDERED = 3 }; extern relop relation(double_t x, double_t y) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); struct decimal { char sgn; char unused; short exp; struct { unsigned char length; unsigned char text[36]; unsigned char unused; } sig; }; typedef struct decimal decimal; struct decform { char style; char unused; short digits; }; typedef struct decform decform; extern void num2dec(const decform *f, double_t x, decimal *d) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern double_t dec2num(const decimal * d) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void dec2str(const decform *f, const decimal *d, char *s) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void str2dec(const char *s, short *ix, decimal *d, short *vp) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern float dec2f(const decimal * d) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern short dec2s(const decimal * d) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern long dec2l(const decimal * d) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern relop relationl(long double x, long double y); extern void num2decl(const decform *f, long double x, decimal *d); extern long double dec2numl(const decimal * d); extern double x80tod(const extended80 * x80) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void dtox80(const double *x, extended80 *x80) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void x80told(const extended80 *x80, long double *x); extern void ldtox80(const long double *x, extended80 *x80); #pragma pack(pop) } extern "C" { typedef struct { unsigned short __control; unsigned short __status; unsigned int __mxcsr; char __reserved[8]; } fenv_t; typedef unsigned short fexcept_t; extern const fenv_t _FE_DFL_ENV; extern const fenv_t _FE_DFL_DISABLE_SSE_DENORMS_ENV; extern int feclearexcept(int ); extern int fegetexceptflag(fexcept_t * , int ); extern int feraiseexcept(int ); extern int fesetexceptflag(const fexcept_t * , int ); extern int fetestexcept(int ); extern int fegetround(void); extern int fesetround(int ); extern int fegetenv(fenv_t * ); extern int feholdexcept(fenv_t * ); extern int fesetenv(const fenv_t * ); extern int feupdateenv(const fenv_t * ); } extern "C" { #pragma pack(push, 2) typedef OSType TECPluginSignature; typedef UInt32 TECPluginVersion; enum { kTECSignature = 'encv', kTECUnicodePluginSignature = 'puni', kTECJapanesePluginSignature = 'pjpn', kTECChinesePluginSignature = 'pzho', kTECKoreanPluginSignature = 'pkor' }; typedef struct OpaqueTECObjectRef* TECObjectRef; typedef struct OpaqueTECSnifferObjectRef* TECSnifferObjectRef; typedef OSType TECPluginSig; struct TECConversionInfo { TextEncoding sourceEncoding; TextEncoding destinationEncoding; UInt16 reserved1; UInt16 reserved2; }; typedef struct TECConversionInfo TECConversionInfo; typedef UInt32 TECInternetNameUsageMask; enum { kTECInternetNameDefaultUsageMask = 0, kTECInternetNameStrictUsageMask = 1, kTECInternetNameTolerantUsageMask = 2 }; enum { kTEC_MIBEnumDontCare = -1 }; enum { kTECDisableFallbacksBit = 16, kTECDisableLooseMappingsBit = 17 }; enum { kTECDisableFallbacksMask = 1L << kTECDisableFallbacksBit, kTECDisableLooseMappingsMask = 1L << kTECDisableLooseMappingsBit }; extern OSStatus TECCountAvailableTextEncodings(ItemCount * numberEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetAvailableTextEncodings( TextEncoding availableEncodings[], ItemCount maxAvailableEncodings, ItemCount * actualAvailableEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCountDirectTextEncodingConversions(ItemCount * numberOfEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetDirectTextEncodingConversions( TECConversionInfo availableConversions[], ItemCount maxAvailableConversions, ItemCount * actualAvailableConversions) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCountDestinationTextEncodings( TextEncoding inputEncoding, ItemCount * numberOfEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetDestinationTextEncodings( TextEncoding inputEncoding, TextEncoding destinationEncodings[], ItemCount maxDestinationEncodings, ItemCount * actualDestinationEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetTextEncodingInternetName( TextEncoding textEncoding, Str255 encodingName) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetTextEncodingFromInternetName( TextEncoding * textEncoding, ConstStr255Param encodingName) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCreateConverter( TECObjectRef * newEncodingConverter, TextEncoding inputEncoding, TextEncoding outputEncoding) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCreateConverterFromPath( TECObjectRef * newEncodingConverter, const TextEncoding inPath[], ItemCount inEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECDisposeConverter(TECObjectRef newEncodingConverter) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECClearConverterContextInfo(TECObjectRef encodingConverter) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECConvertText( TECObjectRef encodingConverter, ConstTextPtr inputBuffer, ByteCount inputBufferLength, ByteCount * actualInputLength, TextPtr outputBuffer, ByteCount outputBufferLength, ByteCount * actualOutputLength) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECFlushText( TECObjectRef encodingConverter, TextPtr outputBuffer, ByteCount outputBufferLength, ByteCount * actualOutputLength) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCountSubTextEncodings( TextEncoding inputEncoding, ItemCount * numberOfEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetSubTextEncodings( TextEncoding inputEncoding, TextEncoding subEncodings[], ItemCount maxSubEncodings, ItemCount * actualSubEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetEncodingList( TECObjectRef encodingConverter, ItemCount * numEncodings, Handle * encodingList) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCreateOneToManyConverter( TECObjectRef * newEncodingConverter, TextEncoding inputEncoding, ItemCount numOutputEncodings, const TextEncoding outputEncodings[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECConvertTextToMultipleEncodings( TECObjectRef encodingConverter, ConstTextPtr inputBuffer, ByteCount inputBufferLength, ByteCount * actualInputLength, TextPtr outputBuffer, ByteCount outputBufferLength, ByteCount * actualOutputLength, TextEncodingRun outEncodingsBuffer[], ItemCount maxOutEncodingRuns, ItemCount * actualOutEncodingRuns) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECFlushMultipleEncodings( TECObjectRef encodingConverter, TextPtr outputBuffer, ByteCount outputBufferLength, ByteCount * actualOutputLength, TextEncodingRun outEncodingsBuffer[], ItemCount maxOutEncodingRuns, ItemCount * actualOutEncodingRuns) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCountWebTextEncodings( RegionCode locale, ItemCount * numberEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetWebTextEncodings( RegionCode locale, TextEncoding availableEncodings[], ItemCount maxAvailableEncodings, ItemCount * actualAvailableEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCountMailTextEncodings( RegionCode locale, ItemCount * numberEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetMailTextEncodings( RegionCode locale, TextEncoding availableEncodings[], ItemCount maxAvailableEncodings, ItemCount * actualAvailableEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCountAvailableSniffers(ItemCount * numberOfEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECGetAvailableSniffers( TextEncoding availableSniffers[], ItemCount maxAvailableSniffers, ItemCount * actualAvailableSniffers) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECCreateSniffer( TECSnifferObjectRef * encodingSniffer, const TextEncoding testEncodings[], ItemCount numTextEncodings) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECSniffTextEncoding( TECSnifferObjectRef encodingSniffer, ConstTextPtr inputBuffer, ByteCount inputBufferLength, TextEncoding testEncodings[], ItemCount numTextEncodings, ItemCount numErrsArray[], ItemCount maxErrs, ItemCount numFeaturesArray[], ItemCount maxFeatures) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECDisposeSniffer(TECSnifferObjectRef encodingSniffer) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECClearSnifferContextInfo(TECSnifferObjectRef encodingSniffer) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TECSetBasicOptions( TECObjectRef encodingConverter, OptionBits controlFlags) __attribute__((availability(macosx,introduced=10.3))); extern OSStatus TECCopyTextEncodingInternetNameAndMIB( TextEncoding textEncoding, TECInternetNameUsageMask usage, CFStringRef * encodingNamePtr, SInt32 * mibEnumPtr) __attribute__((availability(macosx,introduced=10.3))); extern OSStatus TECGetTextEncodingFromInternetNameOrMIB( TextEncoding * textEncodingPtr, TECInternetNameUsageMask usage, CFStringRef encodingName, SInt32 mibEnum) __attribute__((availability(macosx,introduced=10.3))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef struct OpaqueTextToUnicodeInfo* TextToUnicodeInfo; typedef struct OpaqueUnicodeToTextInfo* UnicodeToTextInfo; typedef struct OpaqueUnicodeToTextRunInfo* UnicodeToTextRunInfo; typedef const TextToUnicodeInfo ConstTextToUnicodeInfo; typedef const UnicodeToTextInfo ConstUnicodeToTextInfo; typedef SInt32 UnicodeMapVersion; enum { kUnicodeUseLatestMapping = -1, kUnicodeUseHFSPlusMapping = 4 }; struct UnicodeMapping { TextEncoding unicodeEncoding; TextEncoding otherEncoding; UnicodeMapVersion mappingVersion; }; typedef struct UnicodeMapping UnicodeMapping; typedef UnicodeMapping * UnicodeMappingPtr; typedef const UnicodeMapping * ConstUnicodeMappingPtr; enum { kUnicodeUseFallbacksBit = 0, kUnicodeKeepInfoBit = 1, kUnicodeDirectionalityBits = 2, kUnicodeVerticalFormBit = 4, kUnicodeLooseMappingsBit = 5, kUnicodeStringUnterminatedBit = 6, kUnicodeTextRunBit = 7, kUnicodeKeepSameEncodingBit = 8, kUnicodeForceASCIIRangeBit = 9, kUnicodeNoHalfwidthCharsBit = 10, kUnicodeTextRunHeuristicsBit = 11, kUnicodeMapLineFeedToReturnBit = 12, kUnicodeUseExternalEncodingFormBit = 13 }; enum { kUnicodeUseFallbacksMask = 1L << kUnicodeUseFallbacksBit, kUnicodeKeepInfoMask = 1L << kUnicodeKeepInfoBit, kUnicodeDirectionalityMask = 3L << kUnicodeDirectionalityBits, kUnicodeVerticalFormMask = 1L << kUnicodeVerticalFormBit, kUnicodeLooseMappingsMask = 1L << kUnicodeLooseMappingsBit, kUnicodeStringUnterminatedMask = 1L << kUnicodeStringUnterminatedBit, kUnicodeTextRunMask = 1L << kUnicodeTextRunBit, kUnicodeKeepSameEncodingMask = 1L << kUnicodeKeepSameEncodingBit, kUnicodeForceASCIIRangeMask = 1L << kUnicodeForceASCIIRangeBit, kUnicodeNoHalfwidthCharsMask = 1L << kUnicodeNoHalfwidthCharsBit, kUnicodeTextRunHeuristicsMask = 1L << kUnicodeTextRunHeuristicsBit, kUnicodeMapLineFeedToReturnMask = 1L << kUnicodeMapLineFeedToReturnBit, kUnicodeUseExternalEncodingFormMask = 1L << kUnicodeUseExternalEncodingFormBit }; enum { kUnicodeDefaultDirection = 0, kUnicodeLeftToRight = 1, kUnicodeRightToLeft = 2 }; enum { kUnicodeDefaultDirectionMask = kUnicodeDefaultDirection << kUnicodeDirectionalityBits, kUnicodeLeftToRightMask = kUnicodeLeftToRight << kUnicodeDirectionalityBits, kUnicodeRightToLeftMask = kUnicodeRightToLeft << kUnicodeDirectionalityBits }; enum { kUnicodeMatchUnicodeBaseBit = 0, kUnicodeMatchUnicodeVariantBit = 1, kUnicodeMatchUnicodeFormatBit = 2, kUnicodeMatchOtherBaseBit = 3, kUnicodeMatchOtherVariantBit = 4, kUnicodeMatchOtherFormatBit = 5 }; enum { kUnicodeMatchUnicodeBaseMask = 1L << kUnicodeMatchUnicodeBaseBit, kUnicodeMatchUnicodeVariantMask = 1L << kUnicodeMatchUnicodeVariantBit, kUnicodeMatchUnicodeFormatMask = 1L << kUnicodeMatchUnicodeFormatBit, kUnicodeMatchOtherBaseMask = 1L << kUnicodeMatchOtherBaseBit, kUnicodeMatchOtherVariantMask = 1L << kUnicodeMatchOtherVariantBit, kUnicodeMatchOtherFormatMask = 1L << kUnicodeMatchOtherFormatBit }; enum { kUnicodeFallbackSequencingBits = 0 }; enum { kUnicodeFallbackSequencingMask = 3L << kUnicodeFallbackSequencingBits, kUnicodeFallbackInterruptSafeMask = 1L << 2 }; enum { kUnicodeFallbackDefaultOnly = 0, kUnicodeFallbackCustomOnly = 1, kUnicodeFallbackDefaultFirst = 2, kUnicodeFallbackCustomFirst = 3 }; typedef OSStatus ( * UnicodeToTextFallbackProcPtr)(UniChar *iSrcUniStr, ByteCount iSrcUniStrLen, ByteCount *oSrcConvLen, TextPtr oDestStr, ByteCount iDestStrLen, ByteCount *oDestConvLen, LogicalAddress iInfoPtr, ConstUnicodeMappingPtr iUnicodeMappingPtr); typedef UnicodeToTextFallbackProcPtr UnicodeToTextFallbackUPP; extern UnicodeToTextFallbackUPP NewUnicodeToTextFallbackUPP(UnicodeToTextFallbackProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0))); extern void DisposeUnicodeToTextFallbackUPP(UnicodeToTextFallbackUPP userUPP) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus InvokeUnicodeToTextFallbackUPP( UniChar * iSrcUniStr, ByteCount iSrcUniStrLen, ByteCount * oSrcConvLen, TextPtr oDestStr, ByteCount iDestStrLen, ByteCount * oDestConvLen, LogicalAddress iInfoPtr, ConstUnicodeMappingPtr iUnicodeMappingPtr, UnicodeToTextFallbackUPP userUPP) __attribute__((availability(macosx,introduced=10.0))); inline UnicodeToTextFallbackUPP NewUnicodeToTextFallbackUPP(UnicodeToTextFallbackProcPtr userRoutine) { return userRoutine; } inline void DisposeUnicodeToTextFallbackUPP(UnicodeToTextFallbackUPP) { } inline OSStatus InvokeUnicodeToTextFallbackUPP(UniChar * iSrcUniStr, ByteCount iSrcUniStrLen, ByteCount * oSrcConvLen, TextPtr oDestStr, ByteCount iDestStrLen, ByteCount * oDestConvLen, LogicalAddress iInfoPtr, ConstUnicodeMappingPtr iUnicodeMappingPtr, UnicodeToTextFallbackUPP userUPP) { return (*userUPP)(iSrcUniStr, iSrcUniStrLen, oSrcConvLen, oDestStr, iDestStrLen, oDestConvLen, iInfoPtr, iUnicodeMappingPtr); } extern OSStatus CreateTextToUnicodeInfo( ConstUnicodeMappingPtr iUnicodeMapping, TextToUnicodeInfo * oTextToUnicodeInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CreateTextToUnicodeInfoByEncoding( TextEncoding iEncoding, TextToUnicodeInfo * oTextToUnicodeInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CreateUnicodeToTextInfo( ConstUnicodeMappingPtr iUnicodeMapping, UnicodeToTextInfo * oUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CreateUnicodeToTextInfoByEncoding( TextEncoding iEncoding, UnicodeToTextInfo * oUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CreateUnicodeToTextRunInfo( ItemCount iNumberOfMappings, const UnicodeMapping iUnicodeMappings[], UnicodeToTextRunInfo * oUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CreateUnicodeToTextRunInfoByEncoding( ItemCount iNumberOfEncodings, const TextEncoding iEncodings[], UnicodeToTextRunInfo * oUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CreateUnicodeToTextRunInfoByScriptCode( ItemCount iNumberOfScriptCodes, const ScriptCode iScripts[], UnicodeToTextRunInfo * oUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ChangeTextToUnicodeInfo( TextToUnicodeInfo ioTextToUnicodeInfo, ConstUnicodeMappingPtr iUnicodeMapping) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ChangeUnicodeToTextInfo( UnicodeToTextInfo ioUnicodeToTextInfo, ConstUnicodeMappingPtr iUnicodeMapping) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus DisposeTextToUnicodeInfo(TextToUnicodeInfo * ioTextToUnicodeInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus DisposeUnicodeToTextInfo(UnicodeToTextInfo * ioUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus DisposeUnicodeToTextRunInfo(UnicodeToTextRunInfo * ioUnicodeToTextRunInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ConvertFromTextToUnicode( TextToUnicodeInfo iTextToUnicodeInfo, ByteCount iSourceLen, ConstLogicalAddress iSourceStr, OptionBits iControlFlags, ItemCount iOffsetCount, const ByteOffset iOffsetArray[], ItemCount * oOffsetCount, ByteOffset oOffsetArray[], ByteCount iOutputBufLen, ByteCount * oSourceRead, ByteCount * oUnicodeLen, UniChar oUnicodeStr[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ConvertFromUnicodeToText( UnicodeToTextInfo iUnicodeToTextInfo, ByteCount iUnicodeLen, const UniChar iUnicodeStr[], OptionBits iControlFlags, ItemCount iOffsetCount, const ByteOffset iOffsetArray[], ItemCount * oOffsetCount, ByteOffset oOffsetArray[], ByteCount iOutputBufLen, ByteCount * oInputRead, ByteCount * oOutputLen, LogicalAddress oOutputStr) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ConvertFromUnicodeToTextRun( UnicodeToTextRunInfo iUnicodeToTextInfo, ByteCount iUnicodeLen, const UniChar iUnicodeStr[], OptionBits iControlFlags, ItemCount iOffsetCount, const ByteOffset iOffsetArray[], ItemCount * oOffsetCount, ByteOffset oOffsetArray[], ByteCount iOutputBufLen, ByteCount * oInputRead, ByteCount * oOutputLen, LogicalAddress oOutputStr, ItemCount iEncodingRunBufLen, ItemCount * oEncodingRunOutLen, TextEncodingRun oEncodingRuns[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ConvertFromUnicodeToScriptCodeRun( UnicodeToTextRunInfo iUnicodeToTextInfo, ByteCount iUnicodeLen, const UniChar iUnicodeStr[], OptionBits iControlFlags, ItemCount iOffsetCount, const ByteOffset iOffsetArray[], ItemCount * oOffsetCount, ByteOffset oOffsetArray[], ByteCount iOutputBufLen, ByteCount * oInputRead, ByteCount * oOutputLen, LogicalAddress oOutputStr, ItemCount iScriptRunBufLen, ItemCount * oScriptRunOutLen, ScriptCodeRun oScriptCodeRuns[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TruncateForTextToUnicode( ConstTextToUnicodeInfo iTextToUnicodeInfo, ByteCount iSourceLen, ConstLogicalAddress iSourceStr, ByteCount iMaxLen, ByteCount * oTruncatedLen) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus TruncateForUnicodeToText( ConstUnicodeToTextInfo iUnicodeToTextInfo, ByteCount iSourceLen, const UniChar iSourceStr[], OptionBits iControlFlags, ByteCount iMaxLen, ByteCount * oTruncatedLen) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ConvertFromPStringToUnicode( TextToUnicodeInfo iTextToUnicodeInfo, ConstStr255Param iPascalStr, ByteCount iOutputBufLen, ByteCount * oUnicodeLen, UniChar oUnicodeStr[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ConvertFromUnicodeToPString( UnicodeToTextInfo iUnicodeToTextInfo, ByteCount iUnicodeLen, const UniChar iUnicodeStr[], Str255 oPascalStr) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus CountUnicodeMappings( OptionBits iFilter, ConstUnicodeMappingPtr iFindMapping, ItemCount * oActualCount) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus QueryUnicodeMappings( OptionBits iFilter, ConstUnicodeMappingPtr iFindMapping, ItemCount iMaxCount, ItemCount * oActualCount, UnicodeMapping oReturnedMappings[]) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus SetFallbackUnicodeToText( UnicodeToTextInfo iUnicodeToTextInfo, UnicodeToTextFallbackUPP iFallback, OptionBits iControlFlags, LogicalAddress iInfoPtr) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus SetFallbackUnicodeToTextRun( UnicodeToTextRunInfo iUnicodeToTextRunInfo, UnicodeToTextFallbackUPP iFallback, OptionBits iControlFlags, LogicalAddress iInfoPtr) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ResetTextToUnicodeInfo(TextToUnicodeInfo ioTextToUnicodeInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ResetUnicodeToTextInfo(UnicodeToTextInfo ioUnicodeToTextInfo) __attribute__((availability(macosx,introduced=10.0))); extern OSStatus ResetUnicodeToTextRunInfo(UnicodeToTextRunInfo ioUnicodeToTextRunInfo) __attribute__((availability(macosx,introduced=10.0))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef UInt16 ThreadState; enum { kReadyThreadState = 0, kStoppedThreadState = 1, kRunningThreadState = 2 }; typedef void * ThreadTaskRef; typedef UInt32 ThreadStyle; enum { kCooperativeThread = 1L << 0, kPreemptiveThread = 1L << 1 }; typedef unsigned long ThreadID; enum { kNoThreadID = 0, kCurrentThreadID = 1, kApplicationThreadID = 2 }; typedef UInt32 ThreadOptions; enum { kNewSuspend = (1 << 0), kUsePremadeThread = (1 << 1), kCreateIfNeeded = (1 << 2), kFPUNotNeeded = (1 << 3), kExactMatchThread = (1 << 4) }; struct SchedulerInfoRec { UInt32 InfoRecSize; ThreadID CurrentThreadID; ThreadID SuggestedThreadID; ThreadID InterruptedCoopThreadID; }; typedef struct SchedulerInfoRec SchedulerInfoRec; typedef SchedulerInfoRec * SchedulerInfoRecPtr; typedef void * voidPtr; typedef voidPtr ( * ThreadEntryProcPtr)(void * threadParam); typedef ThreadID ( * ThreadSchedulerProcPtr)(SchedulerInfoRecPtr schedulerInfo); typedef void ( * ThreadSwitchProcPtr)(ThreadID threadBeingSwitched, void *switchProcParam); typedef void ( * ThreadTerminationProcPtr)(ThreadID threadTerminated, void *terminationProcParam); typedef void ( * DebuggerNewThreadProcPtr)(ThreadID threadCreated); typedef void ( * DebuggerDisposeThreadProcPtr)(ThreadID threadDeleted); typedef ThreadID ( * DebuggerThreadSchedulerProcPtr)(SchedulerInfoRecPtr schedulerInfo); typedef ThreadEntryProcPtr ThreadEntryUPP; typedef ThreadSchedulerProcPtr ThreadSchedulerUPP; typedef ThreadSwitchProcPtr ThreadSwitchUPP; typedef ThreadTerminationProcPtr ThreadTerminationUPP; typedef DebuggerNewThreadProcPtr DebuggerNewThreadUPP; typedef DebuggerDisposeThreadProcPtr DebuggerDisposeThreadUPP; typedef DebuggerThreadSchedulerProcPtr DebuggerThreadSchedulerUPP; extern ThreadEntryUPP NewThreadEntryUPP(ThreadEntryProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern ThreadSchedulerUPP NewThreadSchedulerUPP(ThreadSchedulerProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern ThreadSwitchUPP NewThreadSwitchUPP(ThreadSwitchProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern ThreadTerminationUPP NewThreadTerminationUPP(ThreadTerminationProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern DebuggerNewThreadUPP NewDebuggerNewThreadUPP(DebuggerNewThreadProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern DebuggerDisposeThreadUPP NewDebuggerDisposeThreadUPP(DebuggerDisposeThreadProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern DebuggerThreadSchedulerUPP NewDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeThreadEntryUPP(ThreadEntryUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeThreadSchedulerUPP(ThreadSchedulerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeThreadSwitchUPP(ThreadSwitchUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeThreadTerminationUPP(ThreadTerminationUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeDebuggerNewThreadUPP(DebuggerNewThreadUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeDebuggerDisposeThreadUPP(DebuggerDisposeThreadUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void DisposeDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern voidPtr InvokeThreadEntryUPP( void * threadParam, ThreadEntryUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern ThreadID InvokeThreadSchedulerUPP( SchedulerInfoRecPtr schedulerInfo, ThreadSchedulerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void InvokeThreadSwitchUPP( ThreadID threadBeingSwitched, void * switchProcParam, ThreadSwitchUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void InvokeThreadTerminationUPP( ThreadID threadTerminated, void * terminationProcParam, ThreadTerminationUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void InvokeDebuggerNewThreadUPP( ThreadID threadCreated, DebuggerNewThreadUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern void InvokeDebuggerDisposeThreadUPP( ThreadID threadDeleted, DebuggerDisposeThreadUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern ThreadID InvokeDebuggerThreadSchedulerUPP( SchedulerInfoRecPtr schedulerInfo, DebuggerThreadSchedulerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); inline ThreadEntryUPP NewThreadEntryUPP(ThreadEntryProcPtr userRoutine) { return userRoutine; } inline ThreadSchedulerUPP NewThreadSchedulerUPP(ThreadSchedulerProcPtr userRoutine) { return userRoutine; } inline ThreadSwitchUPP NewThreadSwitchUPP(ThreadSwitchProcPtr userRoutine) { return userRoutine; } inline ThreadTerminationUPP NewThreadTerminationUPP(ThreadTerminationProcPtr userRoutine) { return userRoutine; } inline DebuggerNewThreadUPP NewDebuggerNewThreadUPP(DebuggerNewThreadProcPtr userRoutine) { return userRoutine; } inline DebuggerDisposeThreadUPP NewDebuggerDisposeThreadUPP(DebuggerDisposeThreadProcPtr userRoutine) { return userRoutine; } inline DebuggerThreadSchedulerUPP NewDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerProcPtr userRoutine) { return userRoutine; } inline void DisposeThreadEntryUPP(ThreadEntryUPP) { } inline void DisposeThreadSchedulerUPP(ThreadSchedulerUPP) { } inline void DisposeThreadSwitchUPP(ThreadSwitchUPP) { } inline void DisposeThreadTerminationUPP(ThreadTerminationUPP) { } inline void DisposeDebuggerNewThreadUPP(DebuggerNewThreadUPP) { } inline void DisposeDebuggerDisposeThreadUPP(DebuggerDisposeThreadUPP) { } inline void DisposeDebuggerThreadSchedulerUPP(DebuggerThreadSchedulerUPP) { } inline voidPtr InvokeThreadEntryUPP(void * threadParam, ThreadEntryUPP userUPP) { return (*userUPP)(threadParam); } inline ThreadID InvokeThreadSchedulerUPP(SchedulerInfoRecPtr schedulerInfo, ThreadSchedulerUPP userUPP) { return (*userUPP)(schedulerInfo); } inline void InvokeThreadSwitchUPP(ThreadID threadBeingSwitched, void * switchProcParam, ThreadSwitchUPP userUPP) { (*userUPP)(threadBeingSwitched, switchProcParam); } inline void InvokeThreadTerminationUPP(ThreadID threadTerminated, void * terminationProcParam, ThreadTerminationUPP userUPP) { (*userUPP)(threadTerminated, terminationProcParam); } inline void InvokeDebuggerNewThreadUPP(ThreadID threadCreated, DebuggerNewThreadUPP userUPP) { (*userUPP)(threadCreated); } inline void InvokeDebuggerDisposeThreadUPP(ThreadID threadDeleted, DebuggerDisposeThreadUPP userUPP) { (*userUPP)(threadDeleted); } inline ThreadID InvokeDebuggerThreadSchedulerUPP(SchedulerInfoRecPtr schedulerInfo, DebuggerThreadSchedulerUPP userUPP) { return (*userUPP)(schedulerInfo); } typedef ThreadEntryUPP ThreadEntryTPP; typedef ThreadSchedulerUPP ThreadSchedulerTPP; typedef ThreadSwitchUPP ThreadSwitchTPP; typedef ThreadTerminationUPP ThreadTerminationTPP; typedef DebuggerNewThreadUPP DebuggerNewThreadTPP; typedef DebuggerDisposeThreadUPP DebuggerDisposeThreadTPP; typedef DebuggerThreadSchedulerUPP DebuggerThreadSchedulerTPP; extern OSErr NewThread( ThreadStyle threadStyle, ThreadEntryTPP threadEntry, void * threadParam, Size stackSize, ThreadOptions options, void ** threadResult, ThreadID * threadMade) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetThreadScheduler(ThreadSchedulerTPP threadScheduler) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetThreadSwitcher( ThreadID thread, ThreadSwitchTPP threadSwitcher, void * switchProcParam, Boolean inOrOut) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetThreadTerminator( ThreadID thread, ThreadTerminationTPP threadTerminator, void * terminationProcParam) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetDebuggerNotificationProcs( DebuggerNewThreadTPP notifyNewThread, DebuggerDisposeThreadTPP notifyDisposeThread, DebuggerThreadSchedulerTPP notifyThreadScheduler) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr CreateThreadPool( ThreadStyle threadStyle, SInt16 numToCreate, Size stackSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr GetDefaultThreadStackSize( ThreadStyle threadStyle, Size * stackSize) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr ThreadCurrentStackSpace( ThreadID thread, ByteCount * freeStack) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr DisposeThread( ThreadID threadToDump, void * threadResult, Boolean recycleThread) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr YieldToThread(ThreadID suggestedThread) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr YieldToAnyThread(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr GetCurrentThread(ThreadID * currentThreadID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr GetThreadState( ThreadID threadToGet, ThreadState * threadState) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetThreadState( ThreadID threadToSet, ThreadState newState, ThreadID suggestedThread) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetThreadStateEndCritical( ThreadID threadToSet, ThreadState newState, ThreadID suggestedThread) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr ThreadBeginCritical(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr ThreadEndCritical(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr GetThreadCurrentTaskRef(ThreadTaskRef * threadTRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr GetThreadStateGivenTaskRef( ThreadTaskRef threadTRef, ThreadID threadToGet, ThreadState * threadState) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); extern OSErr SetThreadReadyGivenTaskRef( ThreadTaskRef threadTRef, ThreadID threadToSet) __attribute__((availability(macosx,introduced=10.0,deprecated=10.7))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) enum { kOnSystemDisk = -32768L, kOnAppropriateDisk = -32767, kSystemDomain = -32766, kLocalDomain = -32765, kNetworkDomain = -32764, kUserDomain = -32763, kClassicDomain = -32762, kFolderManagerLastDomain = -32760 }; enum { kLastDomainConstant = -32760 }; enum { kCreateFolder = true, kDontCreateFolder = false }; extern OSErr FindFolder( FSVolumeRefNum vRefNum, OSType folderType, Boolean createFolder, FSVolumeRefNum * foundVRefNum, SInt32 * foundDirID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr ReleaseFolder( FSVolumeRefNum vRefNum, OSType folderType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.3))); extern OSErr FSFindFolder( FSVolumeRefNum vRefNum, OSType folderType, Boolean createFolder, FSRef * foundRef) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { kDesktopFolderType = 'desk', kTrashFolderType = 'trsh', kWhereToEmptyTrashFolderType = 'empt', kFontsFolderType = 'font', kPreferencesFolderType = 'pref', kSystemPreferencesFolderType = 'sprf', kTemporaryFolderType = 'temp', kChewableItemsFolderType = 'flnt', kTemporaryItemsInCacheDataFolderType = 'vtmp', kApplicationsFolderType = 'apps', kVolumeRootFolderType = 'root', kDomainTopLevelFolderType = 'dtop', kDomainLibraryFolderType = 'dlib', kUsersFolderType = 'usrs', kCurrentUserFolderType = 'cusr', kSharedUserDataFolderType = 'sdat' }; enum { kDocumentsFolderType = 'docs', kPictureDocumentsFolderType = 'pdoc', kMovieDocumentsFolderType = 'mdoc', kMusicDocumentsFolderType = 0xB5646F63 , kInternetSitesFolderType = 'site', kPublicFolderType = 'pubb' }; enum { kDropBoxFolderType = 'drop' }; enum { kSharedLibrariesFolderType = 0xC46C6962 , kVoicesFolderType = 'fvoc', kUtilitiesFolderType = 0x757469C4 , kThemesFolderType = 'thme', kFavoritesFolderType = 'favs', kInternetSearchSitesFolderType = 'issf', kInstallerLogsFolderType = 'ilgf', kScriptsFolderType = 0x736372C4 , kFolderActionsFolderType = 'fasf', kSpeakableItemsFolderType = 'spki', kKeychainFolderType = 'kchn' }; enum { kColorSyncFolderType = 'sync', kColorSyncCMMFolderType = 'ccmm', kColorSyncScriptingFolderType = 'cscr', kPrintersFolderType = 'impr', kSpeechFolderType = 'spch', kCarbonLibraryFolderType = 'carb', kDocumentationFolderType = 'info', kISSDownloadsFolderType = 'issd', kUserSpecificTmpFolderType = 'utmp', kCachedDataFolderType = 'cach', kFrameworksFolderType = 'fram', kPrivateFrameworksFolderType = 'pfrm', kClassicDesktopFolderType = 'sdsk', kSystemSoundsFolderType = 'ssnd', kComponentsFolderType = 'cmpd', kQuickTimeComponentsFolderType = 'wcmp', kCoreServicesFolderType = 'csrv', kAudioSupportFolderType = 'adio', kAudioPresetsFolderType = 'apst', kAudioSoundsFolderType = 'asnd', kAudioSoundBanksFolderType = 'bank', kAudioAlertSoundsFolderType = 'alrt', kAudioPlugInsFolderType = 'aplg', kAudioComponentsFolderType = 'acmp', kKernelExtensionsFolderType = 'kext', kDirectoryServicesFolderType = 'dsrv', kDirectoryServicesPlugInsFolderType = 'dplg', kInstallerReceiptsFolderType = 'rcpt', kFileSystemSupportFolderType = 'fsys', kAppleShareSupportFolderType = 'shar', kAppleShareAuthenticationFolderType = 'auth', kMIDIDriversFolderType = 'midi', kKeyboardLayoutsFolderType = 'klay', kIndexFilesFolderType = 'indx', kFindByContentIndexesFolderType = 'fbcx', kManagedItemsFolderType = 'mang', kBootTimeStartupItemsFolderType = 'empz', kAutomatorWorkflowsFolderType = 'flow', kAutosaveInformationFolderType = 'asav', kSpotlightSavedSearchesFolderType = 'spot', kSpotlightImportersFolderType = 'simp', kSpotlightMetadataCacheFolderType = 'scch', kInputManagersFolderType = 'inpt', kInputMethodsFolderType = 'inpf', kLibraryAssistantsFolderType = 'astl', kAudioDigidesignFolderType = 'adig', kAudioVSTFolderType = 'avst', kColorPickersFolderType = 'cpkr', kCompositionsFolderType = 'cmps', kFontCollectionsFolderType = 'fncl', kiMovieFolderType = 'imov', kiMoviePlugInsFolderType = 'impi', kiMovieSoundEffectsFolderType = 'imse', kDownloadsFolderType = 'down' }; enum { kColorSyncProfilesFolderType = 'prof', kApplicationSupportFolderType = 'asup', kTextEncodingsFolderType = 0xC4746578 , kPrinterDescriptionFolderType = 'ppdf', kPrinterDriverFolderType = 0xC4707264 , kScriptingAdditionsFolderType = 0xC4736372 }; enum { kClassicPreferencesFolderType = 'cprf' }; enum { kQuickLookFolderType = 'qlck' }; enum { kServicesFolderType = 'svcs' }; enum { kSystemFolderType = 'macs', kSystemDesktopFolderType = 'sdsk', kSystemTrashFolderType = 'strs', kPrintMonitorDocsFolderType = 'prnt', kALMModulesFolderType = 'walk', kALMPreferencesFolderType = 'trip', kALMLocationsFolderType = 'fall', kAppleExtrasFolderType = 0x616578C4 , kContextualMenuItemsFolderType = 'cmnu', kMacOSReadMesFolderType = 0x6D6F72C4 , kStartupFolderType = 'strt', kShutdownFolderType = 'shdf', kAppleMenuFolderType = 'amnu', kControlPanelFolderType = 'ctrl', kSystemControlPanelFolderType = 'sctl', kExtensionFolderType = 'extn', kExtensionDisabledFolderType = 'extD', kControlPanelDisabledFolderType = 'ctrD', kSystemExtensionDisabledFolderType = 'macD', kStartupItemsDisabledFolderType = 'strD', kShutdownItemsDisabledFolderType = 'shdD', kAssistantsFolderType = 0x617374C4 , kStationeryFolderType = 'odst', kOpenDocFolderType = 'odod', kOpenDocShellPlugInsFolderType = 'odsp', kEditorsFolderType = 'oded', kOpenDocEditorsFolderType = 0xC46F6466 , kOpenDocLibrariesFolderType = 'odlb', kGenEditorsFolderType = 0xC4656469 , kHelpFolderType = 0xC4686C70 , kInternetPlugInFolderType = 0xC46E6574 , kModemScriptsFolderType = 0xC46D6F64 , kControlStripModulesFolderType = 'sdev', kInternetFolderType = 0x696E74C4 , kAppearanceFolderType = 'appr', kSoundSetsFolderType = 'snds', kDesktopPicturesFolderType = 0x647470C4 , kFindSupportFolderType = 'fnds', kRecentApplicationsFolderType = 'rapp', kRecentDocumentsFolderType = 'rdoc', kRecentServersFolderType = 'rsvr', kLauncherItemsFolderType = 'laun', kQuickTimeExtensionsFolderType = 'qtex', kDisplayExtensionsFolderType = 'dspl', kMultiprocessingFolderType = 'mpxf', kPrintingPlugInsFolderType = 'pplg', kAppleshareAutomountServerAliasesFolderType = 0x737276C4 , kVolumeSettingsFolderType = 'vsfd', kPreMacOS91ApplicationsFolderType = 0x8C707073 , kPreMacOS91InstallerLogsFolderType = 0x946C6766 , kPreMacOS91AssistantsFolderType = 0x8C7374C4 , kPreMacOS91UtilitiesFolderType = 0x9F7469C4 , kPreMacOS91AppleExtrasFolderType = 0x8C6578C4 , kPreMacOS91MacOSReadMesFolderType = 0xB56F72C4 , kPreMacOS91InternetFolderType = 0x946E74C4 , kPreMacOS91AutomountedServersFolderType = 0xA77276C4 , kPreMacOS91StationeryFolderType = 0xBF647374 , kLocalesFolderType = 0xC46C6F63 , kFindByContentPluginsFolderType = 'fbcp', kFindByContentFolderType = 'fbcf' }; enum { kMagicTemporaryItemsFolderType = 'mtmp', kTemporaryItemsInUserDomainFolderType = 'temq', kCurrentUserRemoteFolderLocation = 'rusf', kCurrentUserRemoteFolderType = 'rusr' }; enum { kDeveloperDocsFolderType = 'ddoc', kDeveloperHelpFolderType = 'devh', kDeveloperFolderType = 'devf', kDeveloperApplicationsFolderType = 'dapp' }; enum { kCreateFolderAtBoot = 0x00000002, kCreateFolderAtBootBit = 1, kFolderCreatedInvisible = 0x00000004, kFolderCreatedInvisibleBit = 2, kFolderCreatedNameLocked = 0x00000008, kFolderCreatedNameLockedBit = 3, kFolderCreatedAdminPrivs = 0x00000010, kFolderCreatedAdminPrivsBit = 4 }; enum { kFolderInUserFolder = 0x00000020, kFolderInUserFolderBit = 5, kFolderTrackedByAlias = 0x00000040, kFolderTrackedByAliasBit = 6, kFolderInRemoteUserFolderIfAvailable = 0x00000080, kFolderInRemoteUserFolderIfAvailableBit = 7, kFolderNeverMatchedInIdentifyFolder = 0x00000100, kFolderNeverMatchedInIdentifyFolderBit = 8, kFolderMustStayOnSameVolume = 0x00000200, kFolderMustStayOnSameVolumeBit = 9, kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledMask = 0x00000400, kFolderManagerFolderInMacOS9FolderIfMacOSXIsInstalledBit = 10, kFolderInLocalOrRemoteUserFolder = kFolderInUserFolder | kFolderInRemoteUserFolderIfAvailable, kFolderManagerNotCreatedOnRemoteVolumesBit = 11, kFolderManagerNotCreatedOnRemoteVolumesMask = (1 << kFolderManagerNotCreatedOnRemoteVolumesBit), kFolderManagerNewlyCreatedFolderIsLocalizedBit = 12, kFolderManagerNewlyCreatedFolderShouldHaveDotLocalizedCreatedWithinMask = (1 << kFolderManagerNewlyCreatedFolderIsLocalizedBit) }; typedef UInt32 FolderDescFlags; enum { kRelativeFolder = 'relf', kRedirectedRelativeFolder = 'rrel', kSpecialFolder = 'spcf' }; typedef OSType FolderClass; enum { kBlessedFolder = 'blsf', kRootFolder = 'rotf' }; enum { kCurrentUserFolderLocation = 'cusf' }; enum { kDictionariesFolderType = 'dict', kLogsFolderType = 'logs', kPreferencePanesFolderType = 'ppan' }; enum { kWidgetsFolderType = 'wdgt', kScreenSaversFolderType = 'scrn' }; typedef OSType FolderType; typedef OSType FolderLocation; struct FolderDesc { Size descSize; FolderType foldType; FolderDescFlags flags; FolderClass foldClass; FolderType foldLocation; OSType badgeSignature; OSType badgeType; UInt32 reserved; StrFileName name; }; typedef struct FolderDesc FolderDesc; typedef FolderDesc * FolderDescPtr; typedef UInt32 RoutingFlags; struct FolderRouting { Size descSize; OSType fileType; FolderType routeFromFolder; FolderType routeToFolder; RoutingFlags flags; }; typedef struct FolderRouting FolderRouting; typedef FolderRouting * FolderRoutingPtr; extern OSErr AddFolderDescriptor( FolderType foldType, FolderDescFlags flags, FolderClass foldClass, FolderLocation foldLocation, OSType badgeSignature, OSType badgeType, ConstStrFileNameParam name, Boolean replaceFlag) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr GetFolderTypes( UInt32 requestedTypeCount, UInt32 * totalTypeCount, FolderType * theTypes) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr RemoveFolderDescriptor(FolderType foldType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus GetFolderNameUnicode( FSVolumeRefNum vRefNum, OSType foldType, FSVolumeRefNum * foundVRefNum, HFSUniStr255 * name) __attribute__((availability(macosx,introduced=10.5,deprecated=10.8))); extern OSErr InvalidateFolderDescriptorCache( FSVolumeRefNum vRefNum, SInt32 dirID) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr IdentifyFolder( FSVolumeRefNum vRefNum, SInt32 dirID, FolderType * foldType) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSErr FSDetermineIfRefIsEnclosedByFolder( FSVolumeRefNum domainOrVRefNum, OSType folderType, const FSRef * inRef, Boolean * outResult) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); extern OSErr DetermineIfPathIsEnclosedByFolder( FSVolumeRefNum domainOrVRefNum, OSType folderType, const UInt8 * utf8Path, Boolean pathIsRealPath, Boolean * outResult) __attribute__((availability(macosx,introduced=10.4,deprecated=10.8))); typedef OSStatus ( * FolderManagerNotificationProcPtr)(OSType message, void *arg, void *userRefCon); typedef FolderManagerNotificationProcPtr FolderManagerNotificationUPP; extern FolderManagerNotificationUPP NewFolderManagerNotificationUPP(FolderManagerNotificationProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeFolderManagerNotificationUPP(FolderManagerNotificationUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern OSStatus InvokeFolderManagerNotificationUPP( OSType message, void * arg, void * userRefCon, FolderManagerNotificationUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline FolderManagerNotificationUPP NewFolderManagerNotificationUPP(FolderManagerNotificationProcPtr userRoutine) { return userRoutine; } inline void DisposeFolderManagerNotificationUPP(FolderManagerNotificationUPP) { } inline OSStatus InvokeFolderManagerNotificationUPP(OSType message, void * arg, void * userRefCon, FolderManagerNotificationUPP userUPP) { return (*userUPP)(message, arg, userRefCon); } #pragma pack(pop) } extern "C" { #pragma pack(push, 2) extern void Microseconds(UnsignedWide * microTickCount) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); enum { kTMTaskActive = (1L << 15) }; typedef struct TMTask TMTask; typedef TMTask * TMTaskPtr; typedef void ( * TimerProcPtr)(TMTaskPtr tmTaskPtr); typedef TimerProcPtr TimerUPP; struct TMTask { QElemPtr qLink; short qType; TimerUPP tmAddr; long tmCount; long tmWakeUp; long tmReserved; }; extern void InsTime(QElemPtr tmTaskPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern void InsXTime(QElemPtr tmTaskPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern void PrimeTime( QElemPtr tmTaskPtr, long count) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern void RmvTime(QElemPtr tmTaskPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern OSErr InstallTimeTask(QElemPtr tmTaskPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern OSErr InstallXTimeTask(QElemPtr tmTaskPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern OSErr PrimeTimeTask( QElemPtr tmTaskPtr, long count) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern OSErr RemoveTimeTask(QElemPtr tmTaskPtr) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern TimerUPP NewTimerUPP(TimerProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void DisposeTimerUPP(TimerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void InvokeTimerUPP( TMTaskPtr tmTaskPtr, TimerUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); inline TimerUPP NewTimerUPP(TimerProcPtr userRoutine) { return userRoutine; } inline void DisposeTimerUPP(TimerUPP) { } inline void InvokeTimerUPP(TMTaskPtr tmTaskPtr, TimerUPP userUPP) { (*userUPP)(tmTaskPtr); } #pragma pack(pop) } extern "C" { #pragma options align=power extern OSStatus MPGetNextCpuID( MPCoherenceID owningCoherenceID, MPCpuID * cpuID) __attribute__((availability(macosx,introduced=10.4,deprecated=10.7))); extern OSStatus MPGetNextTaskID( MPProcessID owningProcessID, MPTaskID * taskID) __attribute__((availability(macosx,introduced=10.4,deprecated=10.7))); enum { kMPQueueInfoVersion = 1L | (kOpaqueQueueID << 16), kMPSemaphoreInfoVersion = 1L | (kOpaqueSemaphoreID << 16), kMPEventInfoVersion = 1L | (kOpaqueEventID << 16), kMPCriticalRegionInfoVersion = 1L | (kOpaqueCriticalRegionID << 16), kMPNotificationInfoVersion = 1L | (kOpaqueNotificationID << 16), kMPAddressSpaceInfoVersion = 1L | (kOpaqueAddressSpaceID << 16) }; struct MPQueueInfo { PBVersion version; MPProcessID processID; OSType queueName; ItemCount nWaiting; MPTaskID waitingTaskID; ItemCount nMessages; ItemCount nReserved; void * p1; void * p2; void * p3; }; typedef struct MPQueueInfo MPQueueInfo; struct MPSemaphoreInfo { PBVersion version; MPProcessID processID; OSType semaphoreName; ItemCount nWaiting; MPTaskID waitingTaskID; ItemCount maximum; ItemCount count; }; typedef struct MPSemaphoreInfo MPSemaphoreInfo; struct MPEventInfo { PBVersion version; MPProcessID processID; OSType eventName; ItemCount nWaiting; MPTaskID waitingTaskID; MPEventFlags events; }; typedef struct MPEventInfo MPEventInfo; struct MPCriticalRegionInfo { PBVersion version; MPProcessID processID; OSType regionName; ItemCount nWaiting; MPTaskID waitingTaskID; MPTaskID owningTask; ItemCount count; }; typedef struct MPCriticalRegionInfo MPCriticalRegionInfo; struct MPNotificationInfo { PBVersion version; MPProcessID processID; OSType notificationName; MPQueueID queueID; void * p1; void * p2; void * p3; MPEventID eventID; MPEventFlags events; MPSemaphoreID semaphoreID; }; typedef struct MPNotificationInfo MPNotificationInfo; struct MPAddressSpaceInfo { PBVersion version; MPProcessID processID; MPCoherenceID groupID; ItemCount nTasks; UInt32 vsid[16]; }; typedef struct MPAddressSpaceInfo MPAddressSpaceInfo; #pragma options align=reset } extern "C" { #pragma pack(push, 2) extern SInt16 LMGetBootDrive(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetBootDrive(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt16 LMGetApFontID(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern void LMSetApFontID(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern SInt16 LMGetSysMap(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetSysMap(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt8 LMGetResLoad(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetResLoad(UInt8 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern SInt16 LMGetResErr(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetResErr(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern UInt8 LMGetTmpResLoad(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetTmpResLoad(UInt8 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern Ptr LMGetIntlSpec(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetIntlSpec(Ptr value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); extern void LMSetSysFontFam(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern SInt16 LMGetSysFontSize(void) __attribute__((availability(macosx,introduced=10.0,deprecated=10.4))); extern void LMSetSysFontSize(SInt16 value) __attribute__((availability(macosx,introduced=10.0,deprecated=10.8))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef UInt16 AVLVisitStage; enum { kAVLPreOrder = 0, kAVLInOrder = 1, kAVLPostOrder = 2 }; typedef UInt16 AVLOrder; enum { kLeftToRight = 0, kRightToLeft = 1 }; typedef UInt16 AVLNodeType; enum { kAVLIsTree = 0, kAVLIsLeftBranch = 1, kAVLIsRightBranch = 2, kAVLIsLeaf = 3, kAVLNullNode = 4 }; enum { errItemAlreadyInTree = -960, errNotValidTree = -961, errItemNotFoundInTree = -962, errCanNotInsertWhileWalkProcInProgress = -963, errTreeIsLocked = -964 }; struct AVLTreeStruct { OSType signature; unsigned long privateStuff[8]; }; typedef struct AVLTreeStruct AVLTreeStruct; typedef AVLTreeStruct * AVLTreePtr; typedef SInt32 ( * AVLCompareItemsProcPtr)(AVLTreePtr tree, const void *i1, const void *i2, AVLNodeType nd_typ); typedef ByteCount ( * AVLItemSizeProcPtr)(AVLTreePtr tree, const void *itemPtr); typedef void ( * AVLDisposeItemProcPtr)(AVLTreePtr tree, const void *dataP); typedef OSErr ( * AVLWalkProcPtr)(AVLTreePtr tree, const void *dataPtr, AVLVisitStage visitStage, AVLNodeType node, UInt32 level, SInt32 balance, void *refCon); typedef AVLCompareItemsProcPtr AVLCompareItemsUPP; typedef AVLItemSizeProcPtr AVLItemSizeUPP; typedef AVLDisposeItemProcPtr AVLDisposeItemUPP; typedef AVLWalkProcPtr AVLWalkUPP; extern AVLCompareItemsUPP NewAVLCompareItemsUPP(AVLCompareItemsProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern AVLItemSizeUPP NewAVLItemSizeUPP(AVLItemSizeProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern AVLDisposeItemUPP NewAVLDisposeItemUPP(AVLDisposeItemProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern AVLWalkUPP NewAVLWalkUPP(AVLWalkProcPtr userRoutine) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern void DisposeAVLCompareItemsUPP(AVLCompareItemsUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern void DisposeAVLItemSizeUPP(AVLItemSizeUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern void DisposeAVLDisposeItemUPP(AVLDisposeItemUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern void DisposeAVLWalkUPP(AVLWalkUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern SInt32 InvokeAVLCompareItemsUPP( AVLTreePtr tree, const void * i1, const void * i2, AVLNodeType nd_typ, AVLCompareItemsUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern ByteCount InvokeAVLItemSizeUPP( AVLTreePtr tree, const void * itemPtr, AVLItemSizeUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern void InvokeAVLDisposeItemUPP( AVLTreePtr tree, const void * dataP, AVLDisposeItemUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); extern OSErr InvokeAVLWalkUPP( AVLTreePtr tree, const void * dataPtr, AVLVisitStage visitStage, AVLNodeType node, UInt32 level, SInt32 balance, void * refCon, AVLWalkUPP userUPP) __attribute__((availability(macosx,introduced=10.0,deprecated=10.5))); inline AVLCompareItemsUPP NewAVLCompareItemsUPP(AVLCompareItemsProcPtr userRoutine) { return userRoutine; } inline AVLItemSizeUPP NewAVLItemSizeUPP(AVLItemSizeProcPtr userRoutine) { return userRoutine; } inline AVLDisposeItemUPP NewAVLDisposeItemUPP(AVLDisposeItemProcPtr userRoutine) { return userRoutine; } inline AVLWalkUPP NewAVLWalkUPP(AVLWalkProcPtr userRoutine) { return userRoutine; } inline void DisposeAVLCompareItemsUPP(AVLCompareItemsUPP) { } inline void DisposeAVLItemSizeUPP(AVLItemSizeUPP) { } inline void DisposeAVLDisposeItemUPP(AVLDisposeItemUPP) { } inline void DisposeAVLWalkUPP(AVLWalkUPP) { } inline SInt32 InvokeAVLCompareItemsUPP(AVLTreePtr tree, const void * i1, const void * i2, AVLNodeType nd_typ, AVLCompareItemsUPP userUPP) { return (*userUPP)(tree, i1, i2, nd_typ); } inline ByteCount InvokeAVLItemSizeUPP(AVLTreePtr tree, const void * itemPtr, AVLItemSizeUPP userUPP) { return (*userUPP)(tree, itemPtr); } inline void InvokeAVLDisposeItemUPP(AVLTreePtr tree, const void * dataP, AVLDisposeItemUPP userUPP) { (*userUPP)(tree, dataP); } inline OSErr InvokeAVLWalkUPP(AVLTreePtr tree, const void * dataPtr, AVLVisitStage visitStage, AVLNodeType node, UInt32 level, SInt32 balance, void * refCon, AVLWalkUPP userUPP) { return (*userUPP)(tree, dataPtr, visitStage, node, level, balance, refCon); } #pragma pack(pop) } #pragma pack(push, 2) struct PEFContainerHeader { OSType tag1; OSType tag2; OSType architecture; UInt32 formatVersion; UInt32 dateTimeStamp; UInt32 oldDefVersion; UInt32 oldImpVersion; UInt32 currentVersion; UInt16 sectionCount; UInt16 instSectionCount; UInt32 reservedA; }; typedef struct PEFContainerHeader PEFContainerHeader; enum { kPEFTag1 = 'Joy!', kPEFTag2 = 'peff', kPEFVersion = 0x00000001 }; enum { kPEFFirstSectionHeaderOffset = sizeof(PEFContainerHeader) }; struct PEFSectionHeader { SInt32 nameOffset; UInt32 defaultAddress; UInt32 totalLength; UInt32 unpackedLength; UInt32 containerLength; UInt32 containerOffset; UInt8 sectionKind; UInt8 shareKind; UInt8 alignment; UInt8 reservedA; }; typedef struct PEFSectionHeader PEFSectionHeader; enum { kPEFCodeSection = 0, kPEFUnpackedDataSection = 1, kPEFPackedDataSection = 2, kPEFConstantSection = 3, kPEFExecDataSection = 6, kPEFLoaderSection = 4, kPEFDebugSection = 5, kPEFExceptionSection = 7, kPEFTracebackSection = 8 }; enum { kPEFProcessShare = 1, kPEFGlobalShare = 4, kPEFProtectedShare = 5 }; enum { kPEFPkDataZero = 0, kPEFPkDataBlock = 1, kPEFPkDataRepeat = 2, kPEFPkDataRepeatBlock = 3, kPEFPkDataRepeatZero = 4 }; enum { kPEFPkDataOpcodeShift = 5, kPEFPkDataCount5Mask = 0x1F, kPEFPkDataMaxCount5 = 31, kPEFPkDataVCountShift = 7, kPEFPkDataVCountMask = 0x7F, kPEFPkDataVCountEndMask = 0x80 }; struct PEFLoaderInfoHeader { SInt32 mainSection; UInt32 mainOffset; SInt32 initSection; UInt32 initOffset; SInt32 termSection; UInt32 termOffset; UInt32 importedLibraryCount; UInt32 totalImportedSymbolCount; UInt32 relocSectionCount; UInt32 relocInstrOffset; UInt32 loaderStringsOffset; UInt32 exportHashOffset; UInt32 exportHashTablePower; UInt32 exportedSymbolCount; }; typedef struct PEFLoaderInfoHeader PEFLoaderInfoHeader; struct PEFImportedLibrary { UInt32 nameOffset; UInt32 oldImpVersion; UInt32 currentVersion; UInt32 importedSymbolCount; UInt32 firstImportedSymbol; UInt8 options; UInt8 reservedA; UInt16 reservedB; }; typedef struct PEFImportedLibrary PEFImportedLibrary; enum { kPEFWeakImportLibMask = 0x40, kPEFInitLibBeforeMask = 0x80 }; struct PEFImportedSymbol { UInt32 classAndName; }; typedef struct PEFImportedSymbol PEFImportedSymbol; enum { kPEFImpSymClassShift = 24, kPEFImpSymNameOffsetMask = 0x00FFFFFF, kPEFImpSymMaxNameOffset = 0x00FFFFFF }; enum { kPEFCodeSymbol = 0x00, kPEFDataSymbol = 0x01, kPEFTVectorSymbol = 0x02, kPEFTOCSymbol = 0x03, kPEFGlueSymbol = 0x04, kPEFUndefinedSymbol = 0x0F, kPEFWeakImportSymMask = 0x80 }; struct PEFExportedSymbolHashSlot { UInt32 countAndStart; }; typedef struct PEFExportedSymbolHashSlot PEFExportedSymbolHashSlot; enum { kPEFHashSlotSymCountShift = 18, kPEFHashSlotFirstKeyMask = 0x0003FFFF, kPEFHashSlotMaxSymbolCount = 0x00003FFF, kPEFHashSlotMaxKeyIndex = 0x0003FFFF }; struct PEFSplitHashWord { UInt16 nameLength; UInt16 hashValue; }; typedef struct PEFSplitHashWord PEFSplitHashWord; struct PEFExportedSymbolKey { union { UInt32 fullHashWord; PEFSplitHashWord splitHashWord; } u; }; typedef struct PEFExportedSymbolKey PEFExportedSymbolKey; enum { kPEFHashLengthShift = 16, kPEFHashValueMask = 0x0000FFFF, kPEFHashMaxLength = 0x0000FFFF }; struct PEFExportedSymbol { UInt32 classAndName; UInt32 symbolValue; SInt16 sectionIndex; }; typedef struct PEFExportedSymbol PEFExportedSymbol; enum { kPEFExpSymClassShift = 24, kPEFExpSymNameOffsetMask = 0x00FFFFFF, kPEFExpSymMaxNameOffset = 0x00FFFFFF }; enum { kPEFAbsoluteExport = -2, kPEFReexportedImport = -3 }; typedef UInt16 PEFRelocChunk; struct PEFLoaderRelocationHeader { UInt16 sectionIndex; UInt16 reservedA; UInt32 relocCount; UInt32 firstRelocOffset; }; typedef struct PEFLoaderRelocationHeader PEFLoaderRelocationHeader; enum { kPEFRelocBasicOpcodeRange = 128 }; enum { kPEFRelocBySectDWithSkip = 0x00, kPEFRelocBySectC = 0x20, kPEFRelocBySectD = 0x21, kPEFRelocTVector12 = 0x22, kPEFRelocTVector8 = 0x23, kPEFRelocVTable8 = 0x24, kPEFRelocImportRun = 0x25, kPEFRelocSmByImport = 0x30, kPEFRelocSmSetSectC = 0x31, kPEFRelocSmSetSectD = 0x32, kPEFRelocSmBySection = 0x33, kPEFRelocIncrPosition = 0x40, kPEFRelocSmRepeat = 0x48, kPEFRelocSetPosition = 0x50, kPEFRelocLgByImport = 0x52, kPEFRelocLgRepeat = 0x58, kPEFRelocLgSetOrBySection = 0x5A, kPEFRelocUndefinedOpcode = 0xFF }; enum { kPEFRelocLgBySectionSubopcode = 0x00, kPEFRelocLgSetSectCSubopcode = 0x01, kPEFRelocLgSetSectDSubopcode = 0x02 }; enum { kPEFRelocWithSkipMaxSkipCount = 255, kPEFRelocWithSkipMaxRelocCount = 63 }; enum { kPEFRelocRunMaxRunLength = 512 }; enum { kPEFRelocSmIndexMaxIndex = 511 }; enum { kPEFRelocIncrPositionMaxOffset = 4096 }; enum { kPEFRelocSmRepeatMaxChunkCount = 16, kPEFRelocSmRepeatMaxRepeatCount = 256 }; enum { kPEFRelocSetPosMaxOffset = 0x03FFFFFF }; enum { kPEFRelocLgByImportMaxIndex = 0x03FFFFFF }; enum { kPEFRelocLgRepeatMaxChunkCount = 16, kPEFRelocLgRepeatMaxRepeatCount = 0x003FFFFF }; enum { kPEFRelocLgSetOrBySectionMaxIndex = 0x003FFFFF }; struct XLibContainerHeader { OSType tag1; OSType tag2; UInt32 currentFormat; UInt32 containerStringsOffset; UInt32 exportHashOffset; UInt32 exportKeyOffset; UInt32 exportSymbolOffset; UInt32 exportNamesOffset; UInt32 exportHashTablePower; UInt32 exportedSymbolCount; UInt32 fragNameOffset; UInt32 fragNameLength; UInt32 dylibPathOffset; UInt32 dylibPathLength; OSType cpuFamily; OSType cpuModel; UInt32 dateTimeStamp; UInt32 currentVersion; UInt32 oldDefVersion; UInt32 oldImpVersion; }; typedef struct XLibContainerHeader XLibContainerHeader; enum { kXLibTag1 = (int)0xF04D6163 , kVLibTag2 = 'VLib', kBLibTag2 = 'BLib', kXLibVersion = 0x00000001 }; typedef PEFExportedSymbolHashSlot XLibExportedSymbolHashSlot; typedef PEFExportedSymbolKey XLibExportedSymbolKey; struct XLibExportedSymbol { UInt32 classAndName; UInt32 bpOffset; }; typedef struct XLibExportedSymbol XLibExportedSymbol; #pragma pack(pop) extern "C" { enum { kHFSSigWord = 0x4244, kHFSPlusSigWord = 0x482B, kHFSXSigWord = 0x4858, kHFSPlusVersion = 0x0004, kHFSXVersion = 0x0005, kHFSPlusMountVersion = 0x31302E30, kHFSJMountVersion = 0x4846534a, kFSKMountVersion = 0x46534b21 }; enum { kHardLinkFileType = 0x686C6E6B, kHFSPlusCreator = 0x6866732B }; enum { kSymLinkFileType = 0x736C6E6B, kSymLinkCreator = 0x72686170 }; enum { kHFSMaxVolumeNameChars = 27, kHFSMaxFileNameChars = 31, kHFSPlusMaxFileNameChars = 255 }; struct HFSExtentKey { u_int8_t keyLength; u_int8_t forkType; u_int32_t fileID; u_int16_t startBlock; } __attribute__((aligned(2), packed)); typedef struct HFSExtentKey HFSExtentKey; struct HFSPlusExtentKey { u_int16_t keyLength; u_int8_t forkType; u_int8_t pad; u_int32_t fileID; u_int32_t startBlock; } __attribute__((aligned(2), packed)); typedef struct HFSPlusExtentKey HFSPlusExtentKey; enum { kHFSExtentDensity = 3, kHFSPlusExtentDensity = 8 }; struct HFSExtentDescriptor { u_int16_t startBlock; u_int16_t blockCount; } __attribute__((aligned(2), packed)); typedef struct HFSExtentDescriptor HFSExtentDescriptor; struct HFSPlusExtentDescriptor { u_int32_t startBlock; u_int32_t blockCount; } __attribute__((aligned(2), packed)); typedef struct HFSPlusExtentDescriptor HFSPlusExtentDescriptor; typedef HFSExtentDescriptor HFSExtentRecord[3]; typedef HFSPlusExtentDescriptor HFSPlusExtentRecord[8]; struct FndrFileInfo { u_int32_t fdType; u_int32_t fdCreator; u_int16_t fdFlags; struct { int16_t v; int16_t h; } fdLocation; int16_t opaque; } __attribute__((aligned(2), packed)); typedef struct FndrFileInfo FndrFileInfo; struct FndrDirInfo { struct { int16_t top; int16_t left; int16_t bottom; int16_t right; } frRect; unsigned short frFlags; struct { u_int16_t v; u_int16_t h; } frLocation; int16_t opaque; } __attribute__((aligned(2), packed)); typedef struct FndrDirInfo FndrDirInfo; struct FndrOpaqueInfo { int8_t opaque[16]; } __attribute__((aligned(2), packed)); typedef struct FndrOpaqueInfo FndrOpaqueInfo; struct FndrExtendedDirInfo { u_int32_t document_id; u_int32_t date_added; u_int16_t extended_flags; u_int16_t reserved3; u_int32_t write_gen_counter; } __attribute__((aligned(2), packed)); struct FndrExtendedFileInfo { u_int32_t document_id; u_int32_t date_added; u_int16_t extended_flags; u_int16_t reserved2; u_int32_t write_gen_counter; } __attribute__((aligned(2), packed)); struct HFSPlusForkData { u_int64_t logicalSize; u_int32_t clumpSize; u_int32_t totalBlocks; HFSPlusExtentRecord extents; } __attribute__((aligned(2), packed)); typedef struct HFSPlusForkData HFSPlusForkData; struct HFSPlusBSDInfo { u_int32_t ownerID; u_int32_t groupID; u_int8_t adminFlags; u_int8_t ownerFlags; u_int16_t fileMode; union { u_int32_t iNodeNum; u_int32_t linkCount; u_int32_t rawDevice; } special; } __attribute__((aligned(2), packed)); typedef struct HFSPlusBSDInfo HFSPlusBSDInfo; enum { kHFSRootParentID = 1, kHFSRootFolderID = 2, kHFSExtentsFileID = 3, kHFSCatalogFileID = 4, kHFSBadBlockFileID = 5, kHFSAllocationFileID = 6, kHFSStartupFileID = 7, kHFSAttributesFileID = 8, kHFSAttributeDataFileID = 13, kHFSRepairCatalogFileID = 14, kHFSBogusExtentFileID = 15, kHFSFirstUserCatalogNodeID = 16 }; struct HFSCatalogKey { u_int8_t keyLength; u_int8_t reserved; u_int32_t parentID; u_int8_t nodeName[kHFSMaxFileNameChars + 1]; } __attribute__((aligned(2), packed)); typedef struct HFSCatalogKey HFSCatalogKey; struct HFSPlusCatalogKey { u_int16_t keyLength; u_int32_t parentID; HFSUniStr255 nodeName; } __attribute__((aligned(2), packed)); typedef struct HFSPlusCatalogKey HFSPlusCatalogKey; enum { kHFSFolderRecord = 0x0100, kHFSFileRecord = 0x0200, kHFSFolderThreadRecord = 0x0300, kHFSFileThreadRecord = 0x0400, kHFSPlusFolderRecord = 1, kHFSPlusFileRecord = 2, kHFSPlusFolderThreadRecord = 3, kHFSPlusFileThreadRecord = 4 }; enum { kHFSFileLockedBit = 0x0000, kHFSFileLockedMask = 0x0001, kHFSThreadExistsBit = 0x0001, kHFSThreadExistsMask = 0x0002, kHFSHasAttributesBit = 0x0002, kHFSHasAttributesMask = 0x0004, kHFSHasSecurityBit = 0x0003, kHFSHasSecurityMask = 0x0008, kHFSHasFolderCountBit = 0x0004, kHFSHasFolderCountMask = 0x0010, kHFSHasLinkChainBit = 0x0005, kHFSHasLinkChainMask = 0x0020, kHFSHasChildLinkBit = 0x0006, kHFSHasChildLinkMask = 0x0040, kHFSHasDateAddedBit = 0x0007, kHFSHasDateAddedMask = 0x0080, kHFSFastDevPinnedBit = 0x0008, kHFSFastDevPinnedMask = 0x0100, kHFSDoNotFastDevPinBit = 0x0009, kHFSDoNotFastDevPinMask = 0x0200, kHFSFastDevCandidateBit = 0x000a, kHFSFastDevCandidateMask = 0x0400, kHFSAutoCandidateBit = 0x000b, kHFSAutoCandidateMask = 0x0800 }; struct HFSCatalogFolder { int16_t recordType; u_int16_t flags; u_int16_t valence; u_int32_t folderID; u_int32_t createDate; u_int32_t modifyDate; u_int32_t backupDate; FndrDirInfo userInfo; FndrOpaqueInfo finderInfo; u_int32_t reserved[4]; } __attribute__((aligned(2), packed)); typedef struct HFSCatalogFolder HFSCatalogFolder; struct HFSPlusCatalogFolder { int16_t recordType; u_int16_t flags; u_int32_t valence; u_int32_t folderID; u_int32_t createDate; u_int32_t contentModDate; u_int32_t attributeModDate; u_int32_t accessDate; u_int32_t backupDate; HFSPlusBSDInfo bsdInfo; FndrDirInfo userInfo; FndrOpaqueInfo finderInfo; u_int32_t textEncoding; u_int32_t folderCount; } __attribute__((aligned(2), packed)); typedef struct HFSPlusCatalogFolder HFSPlusCatalogFolder; struct HFSCatalogFile { int16_t recordType; u_int8_t flags; int8_t fileType; FndrFileInfo userInfo; u_int32_t fileID; u_int16_t dataStartBlock; int32_t dataLogicalSize; int32_t dataPhysicalSize; u_int16_t rsrcStartBlock; int32_t rsrcLogicalSize; int32_t rsrcPhysicalSize; u_int32_t createDate; u_int32_t modifyDate; u_int32_t backupDate; FndrOpaqueInfo finderInfo; u_int16_t clumpSize; HFSExtentRecord dataExtents; HFSExtentRecord rsrcExtents; u_int32_t reserved; } __attribute__((aligned(2), packed)); typedef struct HFSCatalogFile HFSCatalogFile; struct HFSPlusCatalogFile { int16_t recordType; u_int16_t flags; u_int32_t reserved1; u_int32_t fileID; u_int32_t createDate; u_int32_t contentModDate; u_int32_t attributeModDate; u_int32_t accessDate; u_int32_t backupDate; HFSPlusBSDInfo bsdInfo; FndrFileInfo userInfo; FndrOpaqueInfo finderInfo; u_int32_t textEncoding; u_int32_t reserved2; HFSPlusForkData dataFork; HFSPlusForkData resourceFork; } __attribute__((aligned(2), packed)); typedef struct HFSPlusCatalogFile HFSPlusCatalogFile; struct HFSCatalogThread { int16_t recordType; int32_t reserved[2]; u_int32_t parentID; u_int8_t nodeName[kHFSMaxFileNameChars + 1]; } __attribute__((aligned(2), packed)); typedef struct HFSCatalogThread HFSCatalogThread; struct HFSPlusCatalogThread { int16_t recordType; int16_t reserved; u_int32_t parentID; HFSUniStr255 nodeName; } __attribute__((aligned(2), packed)); typedef struct HFSPlusCatalogThread HFSPlusCatalogThread; enum { kHFSPlusAttrInlineData = 0x10, kHFSPlusAttrForkData = 0x20, kHFSPlusAttrExtents = 0x30 }; struct HFSPlusAttrForkData { u_int32_t recordType; u_int32_t reserved; HFSPlusForkData theFork; } __attribute__((aligned(2), packed)); typedef struct HFSPlusAttrForkData HFSPlusAttrForkData; struct HFSPlusAttrExtents { u_int32_t recordType; u_int32_t reserved; HFSPlusExtentRecord extents; } __attribute__((aligned(2), packed)); typedef struct HFSPlusAttrExtents HFSPlusAttrExtents; struct HFSPlusAttrData { u_int32_t recordType; u_int32_t reserved[2]; u_int32_t attrSize; u_int8_t attrData[2]; } __attribute__((aligned(2), packed)); typedef struct HFSPlusAttrData HFSPlusAttrData; struct HFSPlusAttrInlineData { u_int32_t recordType; u_int32_t reserved; u_int32_t logicalSize; u_int8_t userData[2]; } __attribute__((aligned(2), packed)); typedef struct HFSPlusAttrInlineData HFSPlusAttrInlineData; union HFSPlusAttrRecord { u_int32_t recordType; HFSPlusAttrInlineData inlineData; HFSPlusAttrData attrData; HFSPlusAttrForkData forkData; HFSPlusAttrExtents overflowExtents; }; typedef union HFSPlusAttrRecord HFSPlusAttrRecord; enum { kHFSMaxAttrNameLen = 127 }; struct HFSPlusAttrKey { u_int16_t keyLength; u_int16_t pad; u_int32_t fileID; u_int32_t startBlock; u_int16_t attrNameLen; u_int16_t attrName[kHFSMaxAttrNameLen]; } __attribute__((aligned(2), packed)); typedef struct HFSPlusAttrKey HFSPlusAttrKey; enum { kHFSPlusExtentKeyMaximumLength = sizeof(HFSPlusExtentKey) - sizeof(u_int16_t), kHFSExtentKeyMaximumLength = sizeof(HFSExtentKey) - sizeof(u_int8_t), kHFSPlusCatalogKeyMaximumLength = sizeof(HFSPlusCatalogKey) - sizeof(u_int16_t), kHFSPlusCatalogKeyMinimumLength = kHFSPlusCatalogKeyMaximumLength - sizeof(HFSUniStr255) + sizeof(u_int16_t), kHFSCatalogKeyMaximumLength = sizeof(HFSCatalogKey) - sizeof(u_int8_t), kHFSCatalogKeyMinimumLength = kHFSCatalogKeyMaximumLength - (kHFSMaxFileNameChars + 1) + sizeof(u_int8_t), kHFSPlusCatalogMinNodeSize = 4096, kHFSPlusExtentMinNodeSize = 512, kHFSPlusAttrMinNodeSize = 4096 }; enum { kHFSVolumeHardwareLockBit = 7, kHFSVolumeUnmountedBit = 8, kHFSVolumeSparedBlocksBit = 9, kHFSVolumeNoCacheRequiredBit = 10, kHFSBootVolumeInconsistentBit = 11, kHFSCatalogNodeIDsReusedBit = 12, kHFSVolumeJournaledBit = 13, kHFSVolumeInconsistentBit = 14, kHFSVolumeSoftwareLockBit = 15, kHFSUnusedNodeFixBit = 31, kHFSContentProtectionBit = 30, kHFSVolumeHardwareLockMask = 0x00000080, kHFSVolumeUnmountedMask = 0x00000100, kHFSVolumeSparedBlocksMask = 0x00000200, kHFSVolumeNoCacheRequiredMask = 0x00000400, kHFSBootVolumeInconsistentMask = 0x00000800, kHFSCatalogNodeIDsReusedMask = 0x00001000, kHFSVolumeJournaledMask = 0x00002000, kHFSVolumeInconsistentMask = 0x00004000, kHFSVolumeSoftwareLockMask = 0x00008000, kHFSContentProtectionMask = 0x40000000, kHFSUnusedNodeFixMask = 0x80000000, kHFSMDBAttributesMask = 0x8380 }; enum { kHFSUnusedNodesFixDate = 0xc5ef2480 }; struct HFSMasterDirectoryBlock { u_int16_t drSigWord; u_int32_t drCrDate; u_int32_t drLsMod; u_int16_t drAtrb; u_int16_t drNmFls; u_int16_t drVBMSt; u_int16_t drAllocPtr; u_int16_t drNmAlBlks; u_int32_t drAlBlkSiz; u_int32_t drClpSiz; u_int16_t drAlBlSt; u_int32_t drNxtCNID; u_int16_t drFreeBks; u_int8_t drVN[kHFSMaxVolumeNameChars + 1]; u_int32_t drVolBkUp; u_int16_t drVSeqNum; u_int32_t drWrCnt; u_int32_t drXTClpSiz; u_int32_t drCTClpSiz; u_int16_t drNmRtDirs; u_int32_t drFilCnt; u_int32_t drDirCnt; u_int32_t drFndrInfo[8]; u_int16_t drEmbedSigWord; HFSExtentDescriptor drEmbedExtent; u_int32_t drXTFlSize; HFSExtentRecord drXTExtRec; u_int32_t drCTFlSize; HFSExtentRecord drCTExtRec; } __attribute__((aligned(2), packed)); typedef struct HFSMasterDirectoryBlock HFSMasterDirectoryBlock; struct HFSPlusVolumeHeader { u_int16_t signature; u_int16_t version; u_int32_t attributes; u_int32_t lastMountedVersion; u_int32_t journalInfoBlock; u_int32_t createDate; u_int32_t modifyDate; u_int32_t backupDate; u_int32_t checkedDate; u_int32_t fileCount; u_int32_t folderCount; u_int32_t blockSize; u_int32_t totalBlocks; u_int32_t freeBlocks; u_int32_t nextAllocation; u_int32_t rsrcClumpSize; u_int32_t dataClumpSize; u_int32_t nextCatalogID; u_int32_t writeCount; u_int64_t encodingsBitmap; u_int8_t finderInfo[32]; HFSPlusForkData allocationFile; HFSPlusForkData extentsFile; HFSPlusForkData catalogFile; HFSPlusForkData attributesFile; HFSPlusForkData startupFile; } __attribute__((aligned(2), packed)); typedef struct HFSPlusVolumeHeader HFSPlusVolumeHeader; enum BTreeKeyLimits{ kMaxKeyLength = 520 }; union BTreeKey{ u_int8_t length8; u_int16_t length16; u_int8_t rawData [kMaxKeyLength+2]; }; typedef union BTreeKey BTreeKey; struct BTNodeDescriptor { u_int32_t fLink; u_int32_t bLink; int8_t kind; u_int8_t height; u_int16_t numRecords; u_int16_t reserved; } __attribute__((aligned(2), packed)); typedef struct BTNodeDescriptor BTNodeDescriptor; enum { kBTLeafNode = -1, kBTIndexNode = 0, kBTHeaderNode = 1, kBTMapNode = 2 }; struct BTHeaderRec { u_int16_t treeDepth; u_int32_t rootNode; u_int32_t leafRecords; u_int32_t firstLeafNode; u_int32_t lastLeafNode; u_int16_t nodeSize; u_int16_t maxKeyLength; u_int32_t totalNodes; u_int32_t freeNodes; u_int16_t reserved1; u_int32_t clumpSize; u_int8_t btreeType; u_int8_t keyCompareType; u_int32_t attributes; u_int32_t reserved3[16]; } __attribute__((aligned(2), packed)); typedef struct BTHeaderRec BTHeaderRec; enum { kBTBadCloseMask = 0x00000001, kBTBigKeysMask = 0x00000002, kBTVariableIndexKeysMask = 0x00000004 }; enum { kHFSCaseFolding = 0xCF, kHFSBinaryCompare = 0xBC }; struct JournalInfoBlock { u_int32_t flags; u_int32_t device_signature[8]; u_int64_t offset; u_int64_t size; uuid_string_t ext_jnl_uuid; char machine_serial_num[48]; char reserved[((32*sizeof(u_int32_t)) - sizeof(uuid_string_t) - 48)]; } __attribute__((aligned(2), packed)); typedef struct JournalInfoBlock JournalInfoBlock; enum { kJIJournalInFSMask = 0x00000001, kJIJournalOnOtherDeviceMask = 0x00000002, kJIJournalNeedInitMask = 0x00000004 }; } typedef UInt32 HFSCatalogNodeID; #pragma pack(push, 2) enum { AIFFID = 'AIFF', AIFCID = 'AIFC', FormatVersionID = 'FVER', CommonID = 'COMM', FORMID = 'FORM', SoundDataID = 'SSND', MarkerID = 'MARK', InstrumentID = 'INST', MIDIDataID = 'MIDI', AudioRecordingID = 'AESD', ApplicationSpecificID = 'APPL', CommentID = 'COMT', NameID = 'NAME', AuthorID = 'AUTH', CopyrightID = '(c) ', AnnotationID = 'ANNO' }; enum { NoLooping = 0, ForwardLooping = 1, ForwardBackwardLooping = 2 }; enum { AIFCVersion1 = (uint32_t)0xA2805140 }; enum { NoneType = 'NONE', ACE2Type = 'ACE2', ACE8Type = 'ACE8', MACE3Type = 'MAC3', MACE6Type = 'MAC6' }; typedef SInt16 MarkerIdType; struct ChunkHeader { UInt32 ckID; SInt32 ckSize; }; typedef struct ChunkHeader ChunkHeader; struct ContainerChunk { UInt32 ckID; SInt32 ckSize; UInt32 formType; }; typedef struct ContainerChunk ContainerChunk; struct FormatVersionChunk { UInt32 ckID; SInt32 ckSize; UInt32 timestamp; }; typedef struct FormatVersionChunk FormatVersionChunk; typedef FormatVersionChunk * FormatVersionChunkPtr; struct CommonChunk { UInt32 ckID; SInt32 ckSize; SInt16 numChannels; UInt32 numSampleFrames; SInt16 sampleSize; extended80 sampleRate; }; typedef struct CommonChunk CommonChunk; typedef CommonChunk * CommonChunkPtr; struct ExtCommonChunk { UInt32 ckID; SInt32 ckSize; SInt16 numChannels; UInt32 numSampleFrames; SInt16 sampleSize; extended80 sampleRate; UInt32 compressionType; char compressionName[1]; }; typedef struct ExtCommonChunk ExtCommonChunk; typedef ExtCommonChunk * ExtCommonChunkPtr; struct SoundDataChunk { UInt32 ckID; SInt32 ckSize; UInt32 offset; UInt32 blockSize; }; typedef struct SoundDataChunk SoundDataChunk; typedef SoundDataChunk * SoundDataChunkPtr; struct Marker { MarkerIdType id; UInt32 position; Str255 markerName; }; typedef struct Marker Marker; struct MarkerChunk { UInt32 ckID; SInt32 ckSize; UInt16 numMarkers; Marker Markers[1]; }; typedef struct MarkerChunk MarkerChunk; typedef MarkerChunk * MarkerChunkPtr; struct AIFFLoop { SInt16 playMode; MarkerIdType beginLoop; MarkerIdType endLoop; }; typedef struct AIFFLoop AIFFLoop; struct InstrumentChunk { UInt32 ckID; SInt32 ckSize; UInt8 baseFrequency; UInt8 detune; UInt8 lowFrequency; UInt8 highFrequency; UInt8 lowVelocity; UInt8 highVelocity; SInt16 gain; AIFFLoop sustainLoop; AIFFLoop releaseLoop; }; typedef struct InstrumentChunk InstrumentChunk; typedef InstrumentChunk * InstrumentChunkPtr; struct MIDIDataChunk { UInt32 ckID; SInt32 ckSize; UInt8 MIDIdata[1]; }; typedef struct MIDIDataChunk MIDIDataChunk; typedef MIDIDataChunk * MIDIDataChunkPtr; struct AudioRecordingChunk { UInt32 ckID; SInt32 ckSize; UInt8 AESChannelStatus[24]; }; typedef struct AudioRecordingChunk AudioRecordingChunk; typedef AudioRecordingChunk * AudioRecordingChunkPtr; struct ApplicationSpecificChunk { UInt32 ckID; SInt32 ckSize; OSType applicationSignature; UInt8 data[1]; }; typedef struct ApplicationSpecificChunk ApplicationSpecificChunk; typedef ApplicationSpecificChunk * ApplicationSpecificChunkPtr; struct Comment { UInt32 timeStamp; MarkerIdType marker; UInt16 count; char text[1]; }; typedef struct Comment Comment; struct CommentsChunk { UInt32 ckID; SInt32 ckSize; UInt16 numComments; Comment comments[1]; }; typedef struct CommentsChunk CommentsChunk; typedef CommentsChunk * CommentsChunkPtr; struct TextChunk { UInt32 ckID; SInt32 ckSize; char text[1]; }; typedef struct TextChunk TextChunk; typedef TextChunk * TextChunkPtr; #pragma pack(pop) #pragma pack(push, 2) enum { kTECAvailableEncodingsResType = 'cven', kTECAvailableSniffersResType = 'cvsf', kTECSubTextEncodingsResType = 'cvsb', kTECConversionInfoResType = 'cvif', kTECMailEncodingsResType = 'cvml', kTECWebEncodingsResType = 'cvwb', kTECInternetNamesResType = 'cvmm' }; enum { kTECPluginType = 'ecpg', kTECPluginCreator = 'encv', kTECPluginOneToOne = 'otoo', kTECPluginOneToMany = 'otom', kTECPluginManyToOne = 'mtoo', kTECPluginSniffObj = 'snif' }; enum { verUnspecified = 32767, kTECResourceID = 128 }; struct TextEncodingRec { UInt32 base; UInt32 variant; UInt32 format; }; typedef struct TextEncodingRec TextEncodingRec; struct TECEncodingsListRec { UInt32 count; TextEncodingRec encodings; }; typedef struct TECEncodingsListRec TECEncodingsListRec; typedef TECEncodingsListRec * TECEncodingsListPtr; typedef TECEncodingsListPtr * TECEncodingsListHandle; struct TECSubTextEncodingRec { UInt32 offset; TextEncodingRec searchEncoding; UInt32 count; TextEncodingRec subEncodings; }; typedef struct TECSubTextEncodingRec TECSubTextEncodingRec; struct TECSubTextEncodingsRec { UInt32 count; TECSubTextEncodingRec subTextEncodingRec; }; typedef struct TECSubTextEncodingsRec TECSubTextEncodingsRec; typedef TECSubTextEncodingsRec * TECSubTextEncodingsPtr; typedef TECSubTextEncodingsPtr * TECSubTextEncodingsHandle; struct TECEncodingPairRec { TextEncodingRec source; TextEncodingRec dest; }; typedef struct TECEncodingPairRec TECEncodingPairRec; struct TECEncodingPairs { TECEncodingPairRec encodingPair; UInt32 flags; UInt32 speed; }; typedef struct TECEncodingPairs TECEncodingPairs; struct TECEncodingPairsRec { UInt32 count; TECEncodingPairs encodingPairs; }; typedef struct TECEncodingPairsRec TECEncodingPairsRec; typedef TECEncodingPairsRec * TECEncodingPairsPtr; typedef TECEncodingPairsPtr * TECEncodingPairsHandle; struct TECLocaleListToEncodingListRec { UInt32 offset; UInt32 count; RegionCode locales; }; typedef struct TECLocaleListToEncodingListRec TECLocaleListToEncodingListRec; typedef TECLocaleListToEncodingListRec * TECLocaleListToEncodingListPtr; struct TECLocaleToEncodingsListRec { UInt32 count; TECLocaleListToEncodingListRec localeListToEncodingList; }; typedef struct TECLocaleToEncodingsListRec TECLocaleToEncodingsListRec; typedef TECLocaleToEncodingsListRec * TECLocaleToEncodingsListPtr; typedef TECLocaleToEncodingsListPtr * TECLocaleToEncodingsListHandle; struct TECInternetNameRec { UInt32 offset; TextEncodingRec searchEncoding; UInt8 encodingNameLength; UInt8 encodingName[1]; }; typedef struct TECInternetNameRec TECInternetNameRec; struct TECInternetNamesRec { UInt32 count; TECInternetNameRec InternetNames; }; typedef struct TECInternetNamesRec TECInternetNamesRec; typedef TECInternetNamesRec * TECInternetNamesPtr; typedef TECInternetNamesPtr * TECInternetNamesHandle; struct TECBufferContextRec { ConstTextPtr textInputBuffer; ConstTextPtr textInputBufferEnd; TextPtr textOutputBuffer; TextPtr textOutputBufferEnd; ConstTextEncodingRunPtr encodingInputBuffer; ConstTextEncodingRunPtr encodingInputBufferEnd; TextEncodingRunPtr encodingOutputBuffer; TextEncodingRunPtr encodingOutputBufferEnd; }; typedef struct TECBufferContextRec TECBufferContextRec; struct TECPluginStateRec { UInt8 state1; UInt8 state2; UInt8 state3; UInt8 state4; UInt32 longState1; UInt32 longState2; UInt32 longState3; UInt32 longState4; }; typedef struct TECPluginStateRec TECPluginStateRec; struct TECConverterContextRec { Ptr pluginRec; TextEncoding sourceEncoding; TextEncoding destEncoding; UInt32 reserved1; UInt32 reserved2; TECBufferContextRec bufferContext; URefCon contextRefCon; ProcPtr conversionProc; ProcPtr flushProc; ProcPtr clearContextInfoProc; UInt32 options1; UInt32 options2; TECPluginStateRec pluginState; }; typedef struct TECConverterContextRec TECConverterContextRec; struct TECSnifferContextRec { Ptr pluginRec; TextEncoding encoding; ItemCount maxErrors; ItemCount maxFeatures; ConstTextPtr textInputBuffer; ConstTextPtr textInputBufferEnd; ItemCount numFeatures; ItemCount numErrors; URefCon contextRefCon; ProcPtr sniffProc; ProcPtr clearContextInfoProc; TECPluginStateRec pluginState; }; typedef struct TECSnifferContextRec TECSnifferContextRec; typedef OSStatus ( * TECPluginNewEncodingConverterPtr)(TECObjectRef *newEncodingConverter, TECConverterContextRec *plugContext, TextEncoding inputEncoding, TextEncoding outputEncoding); typedef OSStatus ( * TECPluginClearContextInfoPtr)(TECObjectRef encodingConverter, TECConverterContextRec *plugContext); typedef OSStatus ( * TECPluginConvertTextEncodingPtr)(TECObjectRef encodingConverter, TECConverterContextRec *plugContext); typedef OSStatus ( * TECPluginFlushConversionPtr)(TECObjectRef encodingConverter, TECConverterContextRec *plugContext); typedef OSStatus ( * TECPluginDisposeEncodingConverterPtr)(TECObjectRef newEncodingConverter, TECConverterContextRec *plugContext); typedef OSStatus ( * TECPluginNewEncodingSnifferPtr)(TECSnifferObjectRef *encodingSniffer, TECSnifferContextRec *snifContext, TextEncoding inputEncoding); typedef OSStatus ( * TECPluginClearSnifferContextInfoPtr)(TECSnifferObjectRef encodingSniffer, TECSnifferContextRec *snifContext); typedef OSStatus ( * TECPluginSniffTextEncodingPtr)(TECSnifferObjectRef encodingSniffer, TECSnifferContextRec *snifContext); typedef OSStatus ( * TECPluginDisposeEncodingSnifferPtr)(TECSnifferObjectRef encodingSniffer, TECSnifferContextRec *snifContext); typedef OSStatus ( * TECPluginGetCountAvailableTextEncodingsPtr)(TextEncoding *availableEncodings, ItemCount maxAvailableEncodings, ItemCount *actualAvailableEncodings); typedef OSStatus ( * TECPluginGetCountAvailableTextEncodingPairsPtr)(TECConversionInfo *availableEncodings, ItemCount maxAvailableEncodings, ItemCount *actualAvailableEncodings); typedef OSStatus ( * TECPluginGetCountDestinationTextEncodingsPtr)(TextEncoding inputEncoding, TextEncoding *destinationEncodings, ItemCount maxDestinationEncodings, ItemCount *actualDestinationEncodings); typedef OSStatus ( * TECPluginGetCountSubTextEncodingsPtr)(TextEncoding inputEncoding, TextEncoding subEncodings[], ItemCount maxSubEncodings, ItemCount *actualSubEncodings); typedef OSStatus ( * TECPluginGetCountAvailableSniffersPtr)(TextEncoding *availableEncodings, ItemCount maxAvailableEncodings, ItemCount *actualAvailableEncodings); typedef OSStatus ( * TECPluginGetTextEncodingInternetNamePtr)(TextEncoding textEncoding, Str255 encodingName); typedef OSStatus ( * TECPluginGetTextEncodingFromInternetNamePtr)(TextEncoding *textEncoding, ConstStr255Param encodingName); typedef OSStatus ( * TECPluginGetCountWebEncodingsPtr)(TextEncoding *availableEncodings, ItemCount maxAvailableEncodings, ItemCount *actualAvailableEncodings); typedef OSStatus ( * TECPluginGetCountMailEncodingsPtr)(TextEncoding *availableEncodings, ItemCount maxAvailableEncodings, ItemCount *actualAvailableEncodings); enum { kTECPluginDispatchTableVersion1 = 0x00010000, kTECPluginDispatchTableVersion1_1 = 0x00010001, kTECPluginDispatchTableVersion1_2 = 0x00010002, kTECPluginDispatchTableCurrentVersion = kTECPluginDispatchTableVersion1_2 }; struct TECPluginDispatchTable { TECPluginVersion version; TECPluginVersion compatibleVersion; TECPluginSignature PluginID; TECPluginNewEncodingConverterPtr PluginNewEncodingConverter; TECPluginClearContextInfoPtr PluginClearContextInfo; TECPluginConvertTextEncodingPtr PluginConvertTextEncoding; TECPluginFlushConversionPtr PluginFlushConversion; TECPluginDisposeEncodingConverterPtr PluginDisposeEncodingConverter; TECPluginNewEncodingSnifferPtr PluginNewEncodingSniffer; TECPluginClearSnifferContextInfoPtr PluginClearSnifferContextInfo; TECPluginSniffTextEncodingPtr PluginSniffTextEncoding; TECPluginDisposeEncodingSnifferPtr PluginDisposeEncodingSniffer; TECPluginGetCountAvailableTextEncodingsPtr PluginGetCountAvailableTextEncodings; TECPluginGetCountAvailableTextEncodingPairsPtr PluginGetCountAvailableTextEncodingPairs; TECPluginGetCountDestinationTextEncodingsPtr PluginGetCountDestinationTextEncodings; TECPluginGetCountSubTextEncodingsPtr PluginGetCountSubTextEncodings; TECPluginGetCountAvailableSniffersPtr PluginGetCountAvailableSniffers; TECPluginGetCountWebEncodingsPtr PluginGetCountWebTextEncodings; TECPluginGetCountMailEncodingsPtr PluginGetCountMailTextEncodings; TECPluginGetTextEncodingInternetNamePtr PluginGetTextEncodingInternetName; TECPluginGetTextEncodingFromInternetNamePtr PluginGetTextEncodingFromInternetName; }; typedef struct TECPluginDispatchTable TECPluginDispatchTable; typedef TECPluginDispatchTable * ( * TECPluginGetPluginDispatchTablePtr)(void); #pragma pack(pop) extern "C" { #pragma pack(push, 2) typedef ResType DescType; typedef FourCharCode AEKeyword; enum { typeBoolean = 'bool', typeChar = 'TEXT' }; enum { typeStyledUnicodeText = 'sutx', typeEncodedString = 'encs', typeUnicodeText = 'utxt', typeCString = 'cstr', typePString = 'pstr' }; enum { typeUTF16ExternalRepresentation = 'ut16', typeUTF8Text = 'utf8' }; enum { typeSInt16 = 'shor', typeUInt16 = 'ushr', typeSInt32 = 'long', typeUInt32 = 'magn', typeSInt64 = 'comp', typeUInt64 = 'ucom', typeIEEE32BitFloatingPoint = 'sing', typeIEEE64BitFloatingPoint = 'doub', type128BitFloatingPoint = 'ldbl', typeDecimalStruct = 'decm' }; enum { typeAEList = 'list', typeAERecord = 'reco', typeAppleEvent = 'aevt', typeEventRecord = 'evrc', typeTrue = 'true', typeFalse = 'fals', typeAlias = 'alis', typeEnumerated = 'enum', typeType = 'type', typeAppParameters = 'appa', typeProperty = 'prop', typeFSRef = 'fsrf', typeFileURL = 'furl', typeBookmarkData = 'bmrk', typeKeyword = 'keyw', typeSectionH = 'sect', typeWildCard = '****', typeApplSignature = 'sign', typeQDRectangle = 'qdrt', typeFixed = 'fixd', typeProcessSerialNumber = 'psn ', typeApplicationURL = 'aprl', typeNull = 'null' }; enum { typeCFAttributedStringRef = 'cfas', typeCFMutableAttributedStringRef = 'cfaa', typeCFStringRef = 'cfst', typeCFMutableStringRef = 'cfms', typeCFArrayRef = 'cfar', typeCFMutableArrayRef = 'cfma', typeCFDictionaryRef = 'cfdc', typeCFMutableDictionaryRef = 'cfmd', typeCFNumberRef = 'cfnb', typeCFBooleanRef = 'cftf', typeCFTypeRef = 'cfty' }; enum { typeKernelProcessID = 'kpid', typeMachPort = 'port' }; enum { typeAuditToken = 'tokn', }; enum { typeApplicationBundleID = 'bund' }; enum { keyTransactionIDAttr = 'tran', keyReturnIDAttr = 'rtid', keyEventClassAttr = 'evcl', keyEventIDAttr = 'evid', keyAddressAttr = 'addr', keyOptionalKeywordAttr = 'optk', keyTimeoutAttr = 'timo', keyInteractLevelAttr = 'inte', keyEventSourceAttr = 'esrc', keyMissedKeywordAttr = 'miss', keyOriginalAddressAttr = 'from', keyAcceptTimeoutAttr = 'actm', keyReplyRequestedAttr = 'repq', keySenderEUIDAttr = 'seid', keySenderEGIDAttr = 'sgid', keySenderUIDAttr = 'uids', keySenderGIDAttr = 'gids', keySenderPIDAttr = 'spid', keySenderAuditTokenAttr = 'tokn', keySenderApplescriptEntitlementsAttr = 'entl', keySenderApplicationIdentifierEntitlementAttr = 'aiea', keySenderApplicationSandboxed = 'sssb', keyActualSenderAuditToken = 'acat', keyAppleEventAttributesAttr = 'attr', }; enum { kAEDebugPOSTHeader = (1 << 0), kAEDebugReplyHeader = (1 << 1), kAEDebugXMLRequest = (1 << 2), kAEDebugXMLResponse = (1 << 3), kAEDebugXMLDebugAll = (int)0xFFFFFFFF }; enum { kSOAP1999Schema = 'ss99', kSOAP2001Schema = 'ss01' }; enum { keyUserNameAttr = 'unam', keyUserPasswordAttr = 'pass', keyDisableAuthenticationAttr = 'auth', keyXMLDebuggingAttr = 'xdbg', kAERPCClass = 'rpc ', kAEXMLRPCScheme = 'RPC2', kAESOAPScheme = 'SOAP', kAESharedScriptHandler = 'wscp', keyRPCMethodName = 'meth', keyRPCMethodParam = 'parm', keyRPCMethodParamOrder = '/ord', keyAEPOSTHeaderData = 'phed', keyAEReplyHeaderData = 'rhed', keyAEXMLRequestData = 'xreq', keyAEXMLReplyData = 'xrep', keyAdditionalHTTPHeaders = 'ahed', keySOAPAction = 'sact', keySOAPMethodNameSpace = 'mspc', keySOAPMethodNameSpaceURI = 'mspu', keySOAPSchemaVersion = 'ssch' }; enum { keySOAPStructureMetaData = '/smd', keySOAPSMDNamespace = 'ssns', keySOAPSMDNamespaceURI = 'ssnu', keySOAPSMDType = 'sstp' }; enum { kAEUseHTTPProxyAttr = 'xupr', kAEHTTPProxyPortAttr = 'xhtp', kAEHTTPProxyHostAttr = 'xhth' }; enum { kAESocks4Protocol = 4, kAESocks5Protocol = 5 }; enum { kAEUseSocksAttr = 'xscs', kAESocksProxyAttr = 'xsok', kAESocksHostAttr = 'xshs', kAESocksPortAttr = 'xshp', kAESocksUserAttr = 'xshu', kAESocksPasswordAttr = 'xshw' }; enum { kAEDescListFactorNone = 0, kAEDescListFactorType = 4, kAEDescListFactorTypeAndSize = 8 }; enum { kAutoGenerateReturnID = -1, kAnyTransactionID = 0 }; typedef struct OpaqueAEDataStorageType* AEDataStorageType; typedef AEDataStorageType * AEDataStorage; struct AEDesc { DescType descriptorType; AEDataStorage dataHandle; }; typedef struct AEDesc AEDesc; typedef AEDesc * AEDescPtr; struct AEKeyDesc { AEKeyword descKey; AEDesc descContent; }; typedef struct AEKeyDesc AEKeyDesc; typedef AEDesc AEDescList; typedef AEDescList AERecord; typedef AEDesc AEAddressDesc; typedef AERecord AppleEvent; typedef AppleEvent * AppleEventPtr; typedef SInt16 AEReturnID; typedef SInt32 AETransactionID; typedef FourCharCode AEEventClass; typedef FourCharCode AEEventID; typedef SInt8 AEArrayType; enum { kAEDataArray = 0, kAEPackedArray = 1, kAEDescArray = 3, kAEKeyDescArray = 4 }; enum { kAEHandleArray = 2 }; union AEArrayData { SInt16 kAEDataArray[1]; char kAEPackedArray[1]; Handle kAEHandleArray[1]; AEDesc kAEDescArray[1]; AEKeyDesc kAEKeyDescArray[1]; }; typedef union AEArrayData AEArrayData; typedef AEArrayData * AEArrayDataPointer; typedef SInt16 AESendPriority; enum { kAENormalPriority = 0x00000000, kAEHighPriority = 0x00000001 }; typedef SInt32 AESendMode; enum { kAENoReply = 0x00000001, kAEQueueReply = 0x00000002, kAEWaitReply = 0x00000003, kAEDontReconnect = 0x00000080, kAEWantReceipt = 0x00000200, kAENeverInteract = 0x00000010, kAECanInteract = 0x00000020, kAEAlwaysInteract = 0x00000030, kAECanSwitchLayer = 0x00000040, kAEDontRecord = 0x00001000, kAEDontExecute = 0x00002000, kAEProcessNonReplyEvents = 0x00008000, kAEDoNotAutomaticallyAddAnnotationsToEvent = 0x00010000, }; enum { kAEDefaultTimeout = -1, kNoTimeOut = -2 }; typedef OSErr ( * AECoerceDescProcPtr)(const AEDesc *fromDesc, DescType toType, SRefCon handlerRefcon, AEDesc *toDesc); typedef OSErr ( * AECoercePtrProcPtr)(DescType typeCode, const void *dataPtr, Size dataSize, DescType toType, SRefCon handlerRefcon, AEDesc *result); typedef AECoerceDescProcPtr AECoerceDescUPP; typedef AECoercePtrProcPtr AECoercePtrUPP; extern AECoerceDescUPP NewAECoerceDescUPP(AECoerceDescProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern AECoercePtrUPP NewAECoercePtrUPP(AECoercePtrProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeAECoerceDescUPP(AECoerceDescUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeAECoercePtrUPP(AECoercePtrUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeAECoerceDescUPP( const AEDesc * fromDesc, DescType toType, SRefCon handlerRefcon, AEDesc * toDesc, AECoerceDescUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeAECoercePtrUPP( DescType typeCode, const void * dataPtr, Size dataSize, DescType toType, SRefCon handlerRefcon, AEDesc * result, AECoercePtrUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline AECoerceDescUPP NewAECoerceDescUPP(AECoerceDescProcPtr userRoutine) { return userRoutine; } inline AECoercePtrUPP NewAECoercePtrUPP(AECoercePtrProcPtr userRoutine) { return userRoutine; } inline void DisposeAECoerceDescUPP(AECoerceDescUPP) { } inline void DisposeAECoercePtrUPP(AECoercePtrUPP) { } inline OSErr InvokeAECoerceDescUPP(const AEDesc * fromDesc, DescType toType, SRefCon handlerRefcon, AEDesc * toDesc, AECoerceDescUPP userUPP) { return (*userUPP)(fromDesc, toType, handlerRefcon, toDesc); } inline OSErr InvokeAECoercePtrUPP(DescType typeCode, const void * dataPtr, Size dataSize, DescType toType, SRefCon handlerRefcon, AEDesc * result, AECoercePtrUPP userUPP) { return (*userUPP)(typeCode, dataPtr, dataSize, toType, handlerRefcon, result); } typedef AECoerceDescUPP AECoercionHandlerUPP; extern OSErr AEInstallCoercionHandler( DescType fromType, DescType toType, AECoercionHandlerUPP handler, SRefCon handlerRefcon, Boolean fromTypeIsDesc, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AERemoveCoercionHandler( DescType fromType, DescType toType, AECoercionHandlerUPP handler, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetCoercionHandler( DescType fromType, DescType toType, AECoercionHandlerUPP * handler, SRefCon * handlerRefcon, Boolean * fromTypeIsDesc, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AECoercePtr( DescType typeCode, const void * dataPtr, Size dataSize, DescType toType, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AECoerceDesc( const AEDesc * theAEDesc, DescType toType, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void AEInitializeDesc(AEDesc * desc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline void AEInitializeDescInline(AEDesc* d) { d->descriptorType = typeNull; d->dataHandle = __null; } extern OSErr AECreateDesc( DescType typeCode, const void * dataPtr, Size dataSize, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEDisposeDesc(AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEDuplicateDesc( const AEDesc * theAEDesc, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef void ( * AEDisposeExternalProcPtr)(const void *dataPtr, Size dataLength, SRefCon refcon); typedef AEDisposeExternalProcPtr AEDisposeExternalUPP; extern OSStatus AECreateDescFromExternalPtr( OSType descriptorType, const void * dataPtr, Size dataLength, AEDisposeExternalUPP disposeCallback, SRefCon disposeRefcon, AEDesc * theDesc) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AECompareDesc( const AEDesc * desc1, const AEDesc* desc2, Boolean* resultP ) __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AECreateList( const void * factoringPtr, Size factoredSize, Boolean isRecord, AEDescList * resultList) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AECountItems( const AEDescList * theAEDescList, long * theCount) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutPtr( AEDescList * theAEDescList, long index, DescType typeCode, const void * dataPtr, Size dataSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutDesc( AEDescList * theAEDescList, long index, const AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetNthPtr( const AEDescList * theAEDescList, long index, DescType desiredType, AEKeyword * theAEKeyword, DescType * typeCode, void * dataPtr, Size maximumSize, Size * actualSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetNthDesc( const AEDescList * theAEDescList, long index, DescType desiredType, AEKeyword * theAEKeyword, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AESizeOfNthItem( const AEDescList * theAEDescList, long index, DescType * typeCode, Size * dataSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetArray( const AEDescList * theAEDescList, AEArrayType arrayType, AEArrayDataPointer arrayPtr, Size maximumSize, DescType * itemType, Size * itemSize, long * itemCount) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutArray( AEDescList * theAEDescList, AEArrayType arrayType, const AEArrayData * arrayPtr, DescType itemType, Size itemSize, long itemCount) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEDeleteItem( AEDescList * theAEDescList, long index) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean AECheckIsRecord(const AEDesc * theDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AECreateAppleEvent( AEEventClass theAEEventClass, AEEventID theAEEventID, const AEAddressDesc * target, AEReturnID returnID, AETransactionID transactionID, AppleEvent * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutParamPtr( AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void * dataPtr, Size dataSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutParamDesc( AppleEvent * theAppleEvent, AEKeyword theAEKeyword, const AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetParamPtr( const AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType * actualType, void * dataPtr, Size maximumSize, Size * actualSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetParamDesc( const AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AESizeOfParam( const AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType * typeCode, Size * dataSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEDeleteParam( AppleEvent * theAppleEvent, AEKeyword theAEKeyword) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetAttributePtr( const AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, DescType * typeCode, void * dataPtr, Size maximumSize, Size * actualSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetAttributeDesc( const AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType desiredType, AEDesc * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AESizeOfAttribute( const AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType * typeCode, Size * dataSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutAttributePtr( AppleEvent * theAppleEvent, AEKeyword theAEKeyword, DescType typeCode, const void * dataPtr, Size dataSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEPutAttributeDesc( AppleEvent * theAppleEvent, AEKeyword theAEKeyword, const AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Size AESizeOfFlattenedDesc(const AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEFlattenDesc( const AEDesc * theAEDesc, Ptr buffer, Size bufferSize, Size * actualSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEUnflattenDesc( const void * buffer, AEDesc * result) __attribute__((availability(macos,introduced=10.0,deprecated=11.0,replacement="AEUnflattenDescFromBytes"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEUnflattenDescFromBytes( const void* buffer, size_t bufferLen, AEDesc* result ) __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetDescData( const AEDesc * theAEDesc, void * dataPtr, Size maximumSize) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Size AEGetDescDataSize(const AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEReplaceDescData( DescType typeCode, const void * dataPtr, Size dataSize, AEDesc * theAEDesc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEGetDescDataRange( const AEDesc * dataDesc, void * buffer, Size offset, Size length) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef OSErr ( * AEEventHandlerProcPtr)(const AppleEvent *theAppleEvent, AppleEvent *reply, SRefCon handlerRefcon); typedef AEEventHandlerProcPtr AEEventHandlerUPP; extern AEDisposeExternalUPP NewAEDisposeExternalUPP(AEDisposeExternalProcPtr userRoutine) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern AEEventHandlerUPP NewAEEventHandlerUPP(AEEventHandlerProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeAEDisposeExternalUPP(AEDisposeExternalUPP userUPP) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeAEEventHandlerUPP(AEEventHandlerUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void InvokeAEDisposeExternalUPP( const void * dataPtr, Size dataLength, SRefCon refcon, AEDisposeExternalUPP userUPP) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeAEEventHandlerUPP( const AppleEvent * theAppleEvent, AppleEvent * reply, SRefCon handlerRefcon, AEEventHandlerUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline AEDisposeExternalUPP NewAEDisposeExternalUPP(AEDisposeExternalProcPtr userRoutine) { return userRoutine; } inline AEEventHandlerUPP NewAEEventHandlerUPP(AEEventHandlerProcPtr userRoutine) { return userRoutine; } inline void DisposeAEDisposeExternalUPP(AEDisposeExternalUPP) { } inline void DisposeAEEventHandlerUPP(AEEventHandlerUPP) { } inline void InvokeAEDisposeExternalUPP(const void * dataPtr, Size dataLength, SRefCon refcon, AEDisposeExternalUPP userUPP) { (*userUPP)(dataPtr, dataLength, refcon); } inline OSErr InvokeAEEventHandlerUPP(const AppleEvent * theAppleEvent, AppleEvent * reply, SRefCon handlerRefcon, AEEventHandlerUPP userUPP) { return (*userUPP)(theAppleEvent, reply, handlerRefcon); } #pragma pack(pop) } extern "C" { #pragma pack(push, 2) enum { keyDirectObject = '----', keyErrorNumber = 'errn', keyErrorString = 'errs', keyProcessSerialNumber = 'psn ', keyPreDispatch = 'phac', keySelectProc = 'selh', keyAERecorderCount = 'recr', keyAEVersion = 'vers' }; enum { kCoreEventClass = 'aevt' }; enum { kAEOpenApplication = 'oapp', kAEOpenDocuments = 'odoc', kAEPrintDocuments = 'pdoc', kAEOpenContents = 'ocon', kAEQuitApplication = 'quit', kAEAnswer = 'ansr', kAEApplicationDied = 'obit', kAEShowPreferences = 'pref' }; enum { kAEStartRecording = 'reca', kAEStopRecording = 'recc', kAENotifyStartRecording = 'rec1', kAENotifyStopRecording = 'rec0', kAENotifyRecording = 'recr' }; typedef SInt8 AEEventSource; enum { kAEUnknownSource = 0, kAEDirectCall = 1, kAESameProcess = 2, kAELocalProcess = 3, kAERemoteProcess = 4 }; enum { errAETargetAddressNotPermitted = -1742, errAEEventNotPermitted = -1743, }; extern OSErr AEInstallEventHandler( AEEventClass theAEEventClass, AEEventID theAEEventID, AEEventHandlerUPP handler, SRefCon handlerRefcon, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AERemoveEventHandler( AEEventClass theAEEventClass, AEEventID theAEEventID, AEEventHandlerUPP handler, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetEventHandler( AEEventClass theAEEventClass, AEEventID theAEEventID, AEEventHandlerUPP * handler, SRefCon * handlerRefcon, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEInstallSpecialHandler( AEKeyword functionClass, AEEventHandlerUPP handler, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AERemoveSpecialHandler( AEKeyword functionClass, AEEventHandlerUPP handler, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetSpecialHandler( AEKeyword functionClass, AEEventHandlerUPP * handler, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEManagerInfo( AEKeyword keyWord, long * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kAERemoteProcessURLKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kAERemoteProcessNameKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kAERemoteProcessUserIDKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kAERemoteProcessProcessIDKey __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); struct AERemoteProcessResolverContext { CFIndex version; void * info; CFAllocatorRetainCallBack retain; CFAllocatorReleaseCallBack release; CFAllocatorCopyDescriptionCallBack copyDescription; }; typedef struct AERemoteProcessResolverContext AERemoteProcessResolverContext; typedef struct AERemoteProcessResolver* AERemoteProcessResolverRef; extern AERemoteProcessResolverRef AECreateRemoteProcessResolver( CFAllocatorRef allocator, CFURLRef url) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void AEDisposeRemoteProcessResolver(AERemoteProcessResolverRef ref) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef AERemoteProcessResolverGetProcesses( AERemoteProcessResolverRef ref, CFStreamError * outError) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef void ( * AERemoteProcessResolverCallback)(AERemoteProcessResolverRef ref, void *info); extern void AERemoteProcessResolverScheduleWithRunLoop( AERemoteProcessResolverRef ref, CFRunLoopRef runLoop, CFStringRef runLoopMode, AERemoteProcessResolverCallback callback, const AERemoteProcessResolverContext * ctx) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEDeterminePermissionToAutomateTarget( const AEAddressDesc* target, AEEventClass theAEEventClass, AEEventID theAEEventID, Boolean askUserIfNeeded ) __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); enum { errAEEventWouldRequireUserConsent = -1744, }; enum { kAEDoNotPromptForUserConsent = 0x00020000, }; #pragma pack(pop) } extern "C" { extern OSErr CreateOffsetDescriptor( long theOffset, AEDesc * theDescriptor) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr CreateCompDescriptor( DescType comparisonOperator, AEDesc * operand1, AEDesc * operand2, Boolean disposeInputs, AEDesc * theDescriptor) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr CreateLogicalDescriptor( AEDescList * theLogicalTerms, DescType theLogicOperator, Boolean disposeInputs, AEDesc * theDescriptor) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr CreateObjSpecifier( DescType desiredClass, AEDesc * theContainer, DescType keyForm, AEDesc * keyData, Boolean disposeInputs, AEDesc * objSpecifier) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr CreateRangeDescriptor( AEDesc * rangeStart, AEDesc * rangeStop, Boolean disposeInputs, AEDesc * theDescriptor) __attribute__((availability(macos,introduced=10.0))); } extern "C" { #pragma pack(push, 2) enum { kAEAND = 'AND ', kAEOR = 'OR ', kAENOT = 'NOT ', kAEFirst = 'firs', kAELast = 'last', kAEMiddle = 'midd', kAEAny = 'any ', kAEAll = 'all ', kAENext = 'next', kAEPrevious = 'prev', keyAECompOperator = 'relo', keyAELogicalTerms = 'term', keyAELogicalOperator = 'logc', keyAEObject1 = 'obj1', keyAEObject2 = 'obj2', keyAEDesiredClass = 'want', keyAEContainer = 'from', keyAEKeyForm = 'form', keyAEKeyData = 'seld' }; enum { keyAERangeStart = 'star', keyAERangeStop = 'stop', keyDisposeTokenProc = 'xtok', keyAECompareProc = 'cmpr', keyAECountProc = 'cont', keyAEMarkTokenProc = 'mkid', keyAEMarkProc = 'mark', keyAEAdjustMarksProc = 'adjm', keyAEGetErrDescProc = 'indc' }; enum { formAbsolutePosition = 'indx', formRelativePosition = 'rele', formTest = 'test', formRange = 'rang', formPropertyID = 'prop', formName = 'name', formUniqueID = 'ID ', } ; enum { typeObjectSpecifier = 'obj ', typeObjectBeingExamined = 'exmn', typeCurrentContainer = 'ccnt', typeToken = 'toke', typeRelativeDescriptor = 'rel ', typeAbsoluteOrdinal = 'abso', typeIndexDescriptor = 'inde', typeRangeDescriptor = 'rang', typeLogicalDescriptor = 'logi', typeCompDescriptor = 'cmpd', typeOSLTokenList = 'ostl' }; enum { kAEIDoMinimum = 0x0000, kAEIDoWhose = 0x0001, kAEIDoMarking = 0x0004, kAEPassSubDescs = 0x0008, kAEResolveNestedLists = 0x0010, kAEHandleSimpleRanges = 0x0020, kAEUseRelativeIterators = 0x0040 }; enum { typeWhoseDescriptor = 'whos', formWhose = 'whos', typeWhoseRange = 'wrng', keyAEWhoseRangeStart = 'wstr', keyAEWhoseRangeStop = 'wstp', keyAEIndex = 'kidx', keyAETest = 'ktst' }; struct ccntTokenRecord { DescType tokenClass; AEDesc token; }; typedef struct ccntTokenRecord ccntTokenRecord; typedef ccntTokenRecord * ccntTokenRecPtr; typedef ccntTokenRecPtr * ccntTokenRecHandle; typedef OSErr ( * OSLAccessorProcPtr)(DescType desiredClass, const AEDesc *container, DescType containerClass, DescType form, const AEDesc *selectionData, AEDesc *value, SRefCon accessorRefcon); typedef OSErr ( * OSLCompareProcPtr)(DescType oper, const AEDesc *obj1, const AEDesc *obj2, Boolean *result); typedef OSErr ( * OSLCountProcPtr)(DescType desiredType, DescType containerClass, const AEDesc *container, long *result); typedef OSErr ( * OSLDisposeTokenProcPtr)(AEDesc * unneededToken); typedef OSErr ( * OSLGetMarkTokenProcPtr)(const AEDesc *dContainerToken, DescType containerClass, AEDesc *result); typedef OSErr ( * OSLGetErrDescProcPtr)(AEDesc ** appDescPtr); typedef OSErr ( * OSLMarkProcPtr)(const AEDesc *dToken, const AEDesc *markToken, long index); typedef OSErr ( * OSLAdjustMarksProcPtr)(long newStart, long newStop, const AEDesc *markToken); typedef OSLAccessorProcPtr OSLAccessorUPP; typedef OSLCompareProcPtr OSLCompareUPP; typedef OSLCountProcPtr OSLCountUPP; typedef OSLDisposeTokenProcPtr OSLDisposeTokenUPP; typedef OSLGetMarkTokenProcPtr OSLGetMarkTokenUPP; typedef OSLGetErrDescProcPtr OSLGetErrDescUPP; typedef OSLMarkProcPtr OSLMarkUPP; typedef OSLAdjustMarksProcPtr OSLAdjustMarksUPP; extern OSLAccessorUPP NewOSLAccessorUPP(OSLAccessorProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLCompareUPP NewOSLCompareUPP(OSLCompareProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLCountUPP NewOSLCountUPP(OSLCountProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLDisposeTokenUPP NewOSLDisposeTokenUPP(OSLDisposeTokenProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLGetMarkTokenUPP NewOSLGetMarkTokenUPP(OSLGetMarkTokenProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLGetErrDescUPP NewOSLGetErrDescUPP(OSLGetErrDescProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLMarkUPP NewOSLMarkUPP(OSLMarkProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSLAdjustMarksUPP NewOSLAdjustMarksUPP(OSLAdjustMarksProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLAccessorUPP(OSLAccessorUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLCompareUPP(OSLCompareUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLCountUPP(OSLCountUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLDisposeTokenUPP(OSLDisposeTokenUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLGetMarkTokenUPP(OSLGetMarkTokenUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLGetErrDescUPP(OSLGetErrDescUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLMarkUPP(OSLMarkUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeOSLAdjustMarksUPP(OSLAdjustMarksUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLAccessorUPP( DescType desiredClass, const AEDesc * container, DescType containerClass, DescType form, const AEDesc * selectionData, AEDesc * value, SRefCon accessorRefcon, OSLAccessorUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLCompareUPP( DescType oper, const AEDesc * obj1, const AEDesc * obj2, Boolean * result, OSLCompareUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLCountUPP( DescType desiredType, DescType containerClass, const AEDesc * container, long * result, OSLCountUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLDisposeTokenUPP( AEDesc * unneededToken, OSLDisposeTokenUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLGetMarkTokenUPP( const AEDesc * dContainerToken, DescType containerClass, AEDesc * result, OSLGetMarkTokenUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLGetErrDescUPP( AEDesc ** appDescPtr, OSLGetErrDescUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLMarkUPP( const AEDesc * dToken, const AEDesc * markToken, long index, OSLMarkUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr InvokeOSLAdjustMarksUPP( long newStart, long newStop, const AEDesc * markToken, OSLAdjustMarksUPP userUPP) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline OSLAccessorUPP NewOSLAccessorUPP(OSLAccessorProcPtr userRoutine) { return userRoutine; } inline OSLCompareUPP NewOSLCompareUPP(OSLCompareProcPtr userRoutine) { return userRoutine; } inline OSLCountUPP NewOSLCountUPP(OSLCountProcPtr userRoutine) { return userRoutine; } inline OSLDisposeTokenUPP NewOSLDisposeTokenUPP(OSLDisposeTokenProcPtr userRoutine) { return userRoutine; } inline OSLGetMarkTokenUPP NewOSLGetMarkTokenUPP(OSLGetMarkTokenProcPtr userRoutine) { return userRoutine; } inline OSLGetErrDescUPP NewOSLGetErrDescUPP(OSLGetErrDescProcPtr userRoutine) { return userRoutine; } inline OSLMarkUPP NewOSLMarkUPP(OSLMarkProcPtr userRoutine) { return userRoutine; } inline OSLAdjustMarksUPP NewOSLAdjustMarksUPP(OSLAdjustMarksProcPtr userRoutine) { return userRoutine; } inline void DisposeOSLAccessorUPP(OSLAccessorUPP) { } inline void DisposeOSLCompareUPP(OSLCompareUPP) { } inline void DisposeOSLCountUPP(OSLCountUPP) { } inline void DisposeOSLDisposeTokenUPP(OSLDisposeTokenUPP) { } inline void DisposeOSLGetMarkTokenUPP(OSLGetMarkTokenUPP) { } inline void DisposeOSLGetErrDescUPP(OSLGetErrDescUPP) { } inline void DisposeOSLMarkUPP(OSLMarkUPP) { } inline void DisposeOSLAdjustMarksUPP(OSLAdjustMarksUPP) { } inline OSErr InvokeOSLAccessorUPP(DescType desiredClass, const AEDesc * container, DescType containerClass, DescType form, const AEDesc * selectionData, AEDesc * value, SRefCon accessorRefcon, OSLAccessorUPP userUPP) { return (*userUPP)(desiredClass, container, containerClass, form, selectionData, value, accessorRefcon); } inline OSErr InvokeOSLCompareUPP(DescType oper, const AEDesc * obj1, const AEDesc * obj2, Boolean * result, OSLCompareUPP userUPP) { return (*userUPP)(oper, obj1, obj2, result); } inline OSErr InvokeOSLCountUPP(DescType desiredType, DescType containerClass, const AEDesc * container, long * result, OSLCountUPP userUPP) { return (*userUPP)(desiredType, containerClass, container, result); } inline OSErr InvokeOSLDisposeTokenUPP(AEDesc * unneededToken, OSLDisposeTokenUPP userUPP) { return (*userUPP)(unneededToken); } inline OSErr InvokeOSLGetMarkTokenUPP(const AEDesc * dContainerToken, DescType containerClass, AEDesc * result, OSLGetMarkTokenUPP userUPP) { return (*userUPP)(dContainerToken, containerClass, result); } inline OSErr InvokeOSLGetErrDescUPP(AEDesc ** appDescPtr, OSLGetErrDescUPP userUPP) { return (*userUPP)(appDescPtr); } inline OSErr InvokeOSLMarkUPP(const AEDesc * dToken, const AEDesc * markToken, long index, OSLMarkUPP userUPP) { return (*userUPP)(dToken, markToken, index); } inline OSErr InvokeOSLAdjustMarksUPP(long newStart, long newStop, const AEDesc * markToken, OSLAdjustMarksUPP userUPP) { return (*userUPP)(newStart, newStop, markToken); } extern OSErr AEObjectInit(void) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AESetObjectCallbacks( OSLCompareUPP myCompareProc, OSLCountUPP myCountProc, OSLDisposeTokenUPP myDisposeTokenProc, OSLGetMarkTokenUPP myGetMarkTokenProc, OSLMarkUPP myMarkProc, OSLAdjustMarksUPP myAdjustMarksProc, OSLGetErrDescUPP myGetErrDescProcPtr) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEResolve( const AEDesc * objectSpecifier, short callbackFlags, AEDesc * theToken) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEInstallObjectAccessor( DescType desiredClass, DescType containerType, OSLAccessorUPP theAccessor, SRefCon accessorRefcon, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AERemoveObjectAccessor( DescType desiredClass, DescType containerType, OSLAccessorUPP theAccessor, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEGetObjectAccessor( DescType desiredClass, DescType containerType, OSLAccessorUPP * accessor, SRefCon * accessorRefcon, Boolean isSysHandler) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AEDisposeToken(AEDesc * theToken) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AECallObjectAccessor( DescType desiredClass, const AEDesc * containerToken, DescType containerClass, DescType keyForm, const AEDesc * keyData, AEDesc * token) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } #pragma pack(push, 2) enum { cAEList = 'list', cApplication = 'capp', cArc = 'carc', cBoolean = 'bool', cCell = 'ccel', cChar = 'cha ', cColorTable = 'clrt', cColumn = 'ccol', cDocument = 'docu', cDrawingArea = 'cdrw', cEnumeration = 'enum', cFile = 'file', cFixed = 'fixd', cFixedPoint = 'fpnt', cFixedRectangle = 'frct', cGraphicLine = 'glin', cGraphicObject = 'cgob', cGraphicShape = 'cgsh', cGraphicText = 'cgtx', cGroupedGraphic = 'cpic' }; enum { cInsertionLoc = 'insl', cInsertionPoint = 'cins', cIntlText = 'itxt', cIntlWritingCode = 'intl', cItem = 'citm', cLine = 'clin', cLongDateTime = 'ldt ', cLongFixed = 'lfxd', cLongFixedPoint = 'lfpt', cLongFixedRectangle = 'lfrc', cLongInteger = 'long', cLongPoint = 'lpnt', cLongRectangle = 'lrct', cMachineLoc = 'mLoc', cMenu = 'cmnu', cMenuItem = 'cmen', cObject = 'cobj', cObjectSpecifier = 'obj ', cOpenableObject = 'coob', cOval = 'covl' }; enum { cParagraph = 'cpar', cPICT = 'PICT', cPixel = 'cpxl', cPixelMap = 'cpix', cPolygon = 'cpgn', cProperty = 'prop', cQDPoint = 'QDpt', cQDRectangle = 'qdrt', cRectangle = 'crec', cRGBColor = 'cRGB', cRotation = 'trot', cRoundedRectangle = 'crrc', cRow = 'crow', cSelection = 'csel', cShortInteger = 'shor', cTable = 'ctbl', cText = 'ctxt', cTextFlow = 'cflo', cTextStyles = 'tsty', cType = 'type' }; enum { cVersion = 'vers', cWindow = 'cwin', cWord = 'cwor', enumArrows = 'arro', enumJustification = 'just', enumKeyForm = 'kfrm', enumPosition = 'posi', enumProtection = 'prtn', enumQuality = 'qual', enumSaveOptions = 'savo', enumStyle = 'styl', enumTransferMode = 'tran', kAEAbout = 'abou', kAEAfter = 'afte', kAEAliasSelection = 'sali', kAEAllCaps = 'alcp', kAEArrowAtEnd = 'aren', kAEArrowAtStart = 'arst', kAEArrowBothEnds = 'arbo' }; enum { kAEAsk = 'ask ', kAEBefore = 'befo', kAEBeginning = 'bgng', kAEBeginsWith = 'bgwt', kAEBeginTransaction = 'begi', kAEBold = 'bold', kAECaseSensEquals = 'cseq', kAECentered = 'cent', kAEChangeView = 'view', kAEClone = 'clon', kAEClose = 'clos', kAECondensed = 'cond', kAEContains = 'cont', kAECopy = 'copy', kAECoreSuite = 'core', kAECountElements = 'cnte', kAECreateElement = 'crel', kAECreatePublisher = 'cpub', kAECut = 'cut ', kAEDelete = 'delo' }; enum { kAEDoObjectsExist = 'doex', kAEDoScript = 'dosc', kAEDrag = 'drag', kAEDuplicateSelection = 'sdup', kAEEditGraphic = 'edit', kAEEmptyTrash = 'empt', kAEEnd = 'end ', kAEEndsWith = 'ends', kAEEndTransaction = 'endt', kAEEquals = '= ', kAEExpanded = 'pexp', kAEFast = 'fast', kAEFinderEvents = 'FNDR', kAEFormulaProtect = 'fpro', kAEFullyJustified = 'full', kAEGetClassInfo = 'qobj', kAEGetData = 'getd', kAEGetDataSize = 'dsiz', kAEGetEventInfo = 'gtei', kAEGetInfoSelection = 'sinf' }; enum { kAEGetPrivilegeSelection = 'sprv', kAEGetSuiteInfo = 'gtsi', kAEGreaterThan = '> ', kAEGreaterThanEquals = '>= ', kAEGrow = 'grow', kAEHidden = 'hidn', kAEHiQuality = 'hiqu', kAEImageGraphic = 'imgr', kAEIsUniform = 'isun', kAEItalic = 'ital', kAELeftJustified = 'left', kAELessThan = '< ', kAELessThanEquals = '<= ', kAELowercase = 'lowc', kAEMakeObjectsVisible = 'mvis', kAEMiscStandards = 'misc', kAEModifiable = 'modf', kAEMove = 'move', kAENo = 'no ', kAENoArrow = 'arno' }; enum { kAENonmodifiable = 'nmod', kAEOpen = 'odoc', kAEOpenSelection = 'sope', kAEOutline = 'outl', kAEPageSetup = 'pgsu', kAEPaste = 'past', kAEPlain = 'plan', kAEPrint = 'pdoc', kAEPrintSelection = 'spri', kAEPrintWindow = 'pwin', kAEPutAwaySelection = 'sput', kAEQDAddOver = 'addo', kAEQDAddPin = 'addp', kAEQDAdMax = 'admx', kAEQDAdMin = 'admn', kAEQDBic = 'bic ', kAEQDBlend = 'blnd', kAEQDCopy = 'cpy ', kAEQDNotBic = 'nbic', kAEQDNotCopy = 'ncpy' }; enum { kAEQDNotOr = 'ntor', kAEQDNotXor = 'nxor', kAEQDOr = 'or ', kAEQDSubOver = 'subo', kAEQDSubPin = 'subp', kAEQDSupplementalSuite = 'qdsp', kAEQDXor = 'xor ', kAEQuickdrawSuite = 'qdrw', kAEQuitAll = 'quia', kAERedo = 'redo', kAERegular = 'regl', kAEReopenApplication = 'rapp', kAEReplace = 'rplc', kAERequiredSuite = 'reqd', kAERestart = 'rest', kAERevealSelection = 'srev', kAERevert = 'rvrt', kAERightJustified = 'rght', kAESave = 'save', kAESelect = 'slct', kAESetData = 'setd' }; enum { kAESetPosition = 'posn', kAEShadow = 'shad', kAEShowClipboard = 'shcl', kAEShutDown = 'shut', kAESleep = 'slep', kAESmallCaps = 'smcp', kAESpecialClassProperties = 'c@#!', kAEStrikethrough = 'strk', kAESubscript = 'sbsc', kAESuperscript = 'spsc', kAETableSuite = 'tbls', kAETextSuite = 'TEXT', kAETransactionTerminated = 'ttrm', kAEUnderline = 'undl', kAEUndo = 'undo', kAEWholeWordEquals = 'wweq', kAEYes = 'yes ', kAEZoom = 'zoom' }; enum { kAELogOut = 'logo', kAEReallyLogOut = 'rlgo', kAEShowRestartDialog = 'rrst', kAEShowShutdownDialog = 'rsdn' }; enum { kAEMouseClass = 'mous', kAEDown = 'down', kAEUp = 'up ', kAEMoved = 'move', kAEStoppedMoving = 'stop', kAEWindowClass = 'wind', kAEUpdate = 'updt', kAEActivate = 'actv', kAEDeactivate = 'dact', kAECommandClass = 'cmnd', kAEKeyClass = 'keyc', kAERawKey = 'rkey', kAEVirtualKey = 'keyc', kAENavigationKey = 'nave', kAEAutoDown = 'auto', kAEApplicationClass = 'appl', kAESuspend = 'susp', kAEResume = 'rsme', kAEDiskEvent = 'disk', kAENullEvent = 'null', kAEWakeUpEvent = 'wake', kAEScrapEvent = 'scrp', kAEHighLevel = 'high' }; enum { keyAEAngle = 'kang', keyAEArcAngle = 'parc' }; enum { keyAEBaseAddr = 'badd', keyAEBestType = 'pbst', keyAEBgndColor = 'kbcl', keyAEBgndPattern = 'kbpt', keyAEBounds = 'pbnd', keyAECellList = 'kclt', keyAEClassID = 'clID', keyAEColor = 'colr', keyAEColorTable = 'cltb', keyAECurveHeight = 'kchd', keyAECurveWidth = 'kcwd', keyAEDashStyle = 'pdst', keyAEData = 'data', keyAEDefaultType = 'deft', keyAEDefinitionRect = 'pdrt', keyAEDescType = 'dstp', keyAEDestination = 'dest', keyAEDoAntiAlias = 'anta', keyAEDoDithered = 'gdit', keyAEDoRotate = 'kdrt' }; enum { keyAEDoScale = 'ksca', keyAEDoTranslate = 'ktra', keyAEEditionFileLoc = 'eloc', keyAEElements = 'elms', keyAEEndPoint = 'pend', keyAEEventClass = 'evcl', keyAEEventID = 'evti', keyAEFile = 'kfil', keyAEFileType = 'fltp', keyAEFillColor = 'flcl', keyAEFillPattern = 'flpt', keyAEFlipHorizontal = 'kfho', keyAEFlipVertical = 'kfvt', keyAEFont = 'font', keyAEFormula = 'pfor', keyAEGraphicObjects = 'gobs', keyAEID = 'ID ', keyAEImageQuality = 'gqua', keyAEInsertHere = 'insh', keyAEKeyForms = 'keyf' }; enum { keyAEKeyword = 'kywd', keyAELevel = 'levl', keyAELineArrow = 'arro', keyAEName = 'pnam', keyAENewElementLoc = 'pnel', keyAEObject = 'kobj', keyAEObjectClass = 'kocl', keyAEOffStyles = 'ofst', keyAEOnStyles = 'onst', keyAEParameters = 'prms', keyAEParamFlags = 'pmfg', keyAEPenColor = 'ppcl', keyAEPenPattern = 'pppa', keyAEPenWidth = 'ppwd', keyAEPixelDepth = 'pdpt', keyAEPixMapMinus = 'kpmm', keyAEPMTable = 'kpmt', keyAEPointList = 'ptlt', keyAEPointSize = 'ptsz', keyAEPosition = 'kpos' }; enum { keyAEPropData = 'prdt', keyAEProperties = 'qpro', keyAEProperty = 'kprp', keyAEPropFlags = 'prfg', keyAEPropID = 'prop', keyAEProtection = 'ppro', keyAERenderAs = 'kren', keyAERequestedType = 'rtyp', keyAEResult = '----', keyAEResultInfo = 'rsin', keyAERotation = 'prot', keyAERotPoint = 'krtp', keyAERowList = 'krls', keyAESaveOptions = 'savo', keyAEScale = 'pscl', keyAEScriptTag = 'psct', keyAESearchText = 'stxt', keyAEShowWhere = 'show', keyAEStartAngle = 'pang', keyAEStartPoint = 'pstp', keyAEStyles = 'ksty' }; enum { keyAESuiteID = 'suit', keyAEText = 'ktxt', keyAETextColor = 'ptxc', keyAETextFont = 'ptxf', keyAETextPointSize = 'ptps', keyAETextStyles = 'txst', keyAETextLineHeight = 'ktlh', keyAETextLineAscent = 'ktas', keyAETheText = 'thtx', keyAETransferMode = 'pptm', keyAETranslation = 'ptrs', keyAETryAsStructGraf = 'toog', keyAEUniformStyles = 'ustl', keyAEUpdateOn = 'pupd', keyAEUserTerm = 'utrm', keyAEWindow = 'wndw', keyAEWritingCode = 'wrcd' }; enum { keyMiscellaneous = 'fmsc', keySelection = 'fsel', keyWindow = 'kwnd', keyWhen = 'when', keyWhere = 'wher', keyModifiers = 'mods', keyKey = 'key ', keyKeyCode = 'code', keyKeyboard = 'keyb', keyDriveNumber = 'drv#', keyErrorCode = 'err#', keyHighLevelClass = 'hcls', keyHighLevelID = 'hid ' }; enum { pArcAngle = 'parc', pBackgroundColor = 'pbcl', pBackgroundPattern = 'pbpt', pBestType = 'pbst', pBounds = 'pbnd', pClass = 'pcls', pClipboard = 'pcli', pColor = 'colr', pColorTable = 'cltb', pContents = 'pcnt', pCornerCurveHeight = 'pchd', pCornerCurveWidth = 'pcwd', pDashStyle = 'pdst', pDefaultType = 'deft', pDefinitionRect = 'pdrt', pEnabled = 'enbl', pEndPoint = 'pend', pFillColor = 'flcl', pFillPattern = 'flpt', pFont = 'font' }; enum { pFormula = 'pfor', pGraphicObjects = 'gobs', pHasCloseBox = 'hclb', pHasTitleBar = 'ptit', pID = 'ID ', pIndex = 'pidx', pInsertionLoc = 'pins', pIsFloating = 'isfl', pIsFrontProcess = 'pisf', pIsModal = 'pmod', pIsModified = 'imod', pIsResizable = 'prsz', pIsStationeryPad = 'pspd', pIsZoomable = 'iszm', pIsZoomed = 'pzum', pItemNumber = 'itmn', pJustification = 'pjst', pLineArrow = 'arro', pMenuID = 'mnid', pName = 'pnam' }; enum { pNewElementLoc = 'pnel', pPenColor = 'ppcl', pPenPattern = 'pppa', pPenWidth = 'ppwd', pPixelDepth = 'pdpt', pPointList = 'ptlt', pPointSize = 'ptsz', pProtection = 'ppro', pRotation = 'prot', pScale = 'pscl', pScript = 'scpt', pScriptTag = 'psct', pSelected = 'selc', pSelection = 'sele', pStartAngle = 'pang', pStartPoint = 'pstp', pTextColor = 'ptxc', pTextFont = 'ptxf', pTextItemDelimiters = 'txdl', pTextPointSize = 'ptps' }; enum { pTextStyles = 'txst', pTransferMode = 'pptm', pTranslation = 'ptrs', pUniformStyles = 'ustl', pUpdateOn = 'pupd', pUserSelection = 'pusl', pVersion = 'vers', pVisible = 'pvis' }; enum { typeAEText = 'tTXT', typeArc = 'carc', typeBest = 'best', typeCell = 'ccel', typeClassInfo = 'gcli', typeColorTable = 'clrt', typeColumn = 'ccol', typeDashStyle = 'tdas', typeData = 'tdta', typeDrawingArea = 'cdrw', typeElemInfo = 'elin', typeEnumeration = 'enum', typeEPS = 'EPS ', typeEventInfo = 'evin' }; enum { typeFinderWindow = 'fwin', typeFixedPoint = 'fpnt', typeFixedRectangle = 'frct', typeGraphicLine = 'glin', typeGraphicText = 'cgtx', typeGroupedGraphic = 'cpic', typeInsertionLoc = 'insl', typeIntlText = 'itxt', typeIntlWritingCode = 'intl', typeLongDateTime = 'ldt ', typeCFAbsoluteTime = 'cfat', typeISO8601DateTime = 'isot', typeLongFixed = 'lfxd', typeLongFixedPoint = 'lfpt', typeLongFixedRectangle = 'lfrc', typeLongPoint = 'lpnt', typeLongRectangle = 'lrct', typeMachineLoc = 'mLoc', typeOval = 'covl', typeParamInfo = 'pmin', typePict = 'PICT' }; enum { typePixelMap = 'cpix', typePixMapMinus = 'tpmm', typePolygon = 'cpgn', typePropInfo = 'pinf', typePtr = 'ptr ', typeQDPoint = 'QDpt', typeQDRegion = 'Qrgn', typeRectangle = 'crec', typeRGB16 = 'tr16', typeRGB96 = 'tr96', typeRGBColor = 'cRGB', typeRotation = 'trot', typeRoundedRectangle = 'crrc', typeRow = 'crow', typeScrapStyles = 'styl', typeScript = 'scpt', typeStyledText = 'STXT', typeSuiteInfo = 'suin', typeTable = 'ctbl', typeTextStyles = 'tsty' }; enum { typeTIFF = 'TIFF', typeJPEG = 'JPEG', typeGIF = 'GIFf', typeVersion = 'vers' }; enum { kAEMenuClass = 'menu', kAEMenuSelect = 'mhit', kAEMouseDown = 'mdwn', kAEMouseDownInBack = 'mdbk', kAEKeyDown = 'kdwn', kAEResized = 'rsiz', kAEPromise = 'prom' }; enum { keyMenuID = 'mid ', keyMenuItem = 'mitm', keyCloseAllWindows = 'caw ', keyOriginalBounds = 'obnd', keyNewBounds = 'nbnd', keyLocalWhere = 'lwhr' }; enum { typeHIMenu = 'mobj', typeHIWindow = 'wobj' }; enum { kAEQuitPreserveState = 'stat', kAEQuitReason = 'why?' }; enum { kBySmallIcon = 0, kByIconView = 1, kByNameView = 2, kByDateView = 3, kBySizeView = 4, kByKindView = 5, kByCommentView = 6, kByLabelView = 7, kByVersionView = 8 }; enum { kAEInfo = 11, kAEMain = 0, kAESharing = 13 }; enum { kAEZoomIn = 7, kAEZoomOut = 8 }; enum { kTextServiceClass = 'tsvc', kUpdateActiveInputArea = 'updt', kShowHideInputWindow = 'shiw', kPos2Offset = 'p2st', kOffset2Pos = 'st2p', kUnicodeNotFromInputMethod = 'unim', kGetSelectedText = 'gtxt', keyAETSMDocumentRefcon = 'refc', keyAEServerInstance = 'srvi', keyAETheData = 'kdat', keyAEFixLength = 'fixl', keyAEUpdateRange = 'udng', keyAECurrentPoint = 'cpos', keyAEBufferSize = 'buff', keyAEMoveView = 'mvvw', keyAENextBody = 'nxbd', keyAETSMScriptTag = 'sclg', keyAETSMTextFont = 'ktxf', keyAETSMTextFMFont = 'ktxm', keyAETSMTextPointSize = 'ktps', keyAETSMEventRecord = 'tevt', keyAETSMEventRef = 'tevr', keyAETextServiceEncoding = 'tsen', keyAETextServiceMacEncoding = 'tmen', keyAETSMGlyphInfoArray = 'tgia', typeTextRange = 'txrn', typeComponentInstance = 'cmpi', typeOffsetArray = 'ofay', typeTextRangeArray = 'tray', typeLowLevelEventRecord = 'evtr', typeGlyphInfoArray = 'glia', typeEventRef = 'evrf', typeText = typeChar }; enum { kTSMOutsideOfBody = 1, kTSMInsideOfBody = 2, kTSMInsideOfActiveInputArea = 3 }; enum { kNextBody = 1, kPreviousBody = 2 }; struct TextRange { SInt32 fStart; SInt32 fEnd; SInt16 fHiliteStyle; }; typedef struct TextRange TextRange; typedef TextRange * TextRangePtr; typedef TextRangePtr * TextRangeHandle; struct TextRangeArray { SInt16 fNumOfRanges; TextRange fRange[1]; }; typedef struct TextRangeArray TextRangeArray; typedef TextRangeArray * TextRangeArrayPtr; typedef TextRangeArrayPtr * TextRangeArrayHandle; struct OffsetArray { SInt16 fNumOfOffsets; SInt32 fOffset[1]; }; typedef struct OffsetArray OffsetArray; typedef OffsetArray * OffsetArrayPtr; typedef OffsetArrayPtr * OffsetArrayHandle; struct WritingCode { ScriptCode theScriptCode; LangCode theLangCode; }; typedef struct WritingCode WritingCode; struct IntlText { ScriptCode theScriptCode; LangCode theLangCode; char theText[1]; }; typedef struct IntlText IntlText; enum { kTSMHiliteCaretPosition = 1, kTSMHiliteRawText = 2, kTSMHiliteSelectedRawText = 3, kTSMHiliteConvertedText = 4, kTSMHiliteSelectedConvertedText = 5, kTSMHiliteBlockFillText = 6, kTSMHiliteOutlineText = 7, kTSMHiliteSelectedText = 8, kTSMHiliteNoHilite = 9 }; enum { keyAEHiliteRange = 'hrng', keyAEPinRange = 'pnrg', keyAEClauseOffsets = 'clau', keyAEOffset = 'ofst', keyAEPoint = 'gpos', keyAELeftSide = 'klef', keyAERegionClass = 'rgnc', keyAEDragging = 'bool' }; enum { typeMeters = 'metr', typeInches = 'inch', typeFeet = 'feet', typeYards = 'yard', typeMiles = 'mile', typeKilometers = 'kmtr', typeCentimeters = 'cmtr', typeSquareMeters = 'sqrm', typeSquareFeet = 'sqft', typeSquareYards = 'sqyd', typeSquareMiles = 'sqmi', typeSquareKilometers = 'sqkm', typeLiters = 'litr', typeQuarts = 'qrts', typeGallons = 'galn', typeCubicMeters = 'cmet', typeCubicFeet = 'cfet', typeCubicInches = 'cuin', typeCubicCentimeter = 'ccmt', typeCubicYards = 'cyrd', typeKilograms = 'kgrm', typeGrams = 'gram', typeOunces = 'ozs ', typePounds = 'lbs ', typeDegreesC = 'degc', typeDegreesF = 'degf', typeDegreesK = 'degk' }; enum { kFAServerApp = 'ssrv', kDoFolderActionEvent = 'fola', kFolderActionCode = 'actn', kFolderOpenedEvent = 'fopn', kFolderClosedEvent = 'fclo', kFolderWindowMovedEvent = 'fsiz', kFolderItemsAddedEvent = 'fget', kFolderItemsRemovedEvent = 'flos', kItemList = 'flst', kNewSizeParameter = 'fnsz', kFASuiteCode = 'faco', kFAAttachCommand = 'atfa', kFARemoveCommand = 'rmfa', kFAEditCommand = 'edfa', kFAFileParam = 'faal', kFAIndexParam = 'indx' }; enum { kAEInternetSuite = 'gurl', kAEISWebStarSuite = 0x575757BD }; enum { kAEISGetURL = 'gurl', KAEISHandleCGI = 'sdoc' }; enum { cURL = 'url ', cInternetAddress = 'IPAD', cHTML = 'html', cFTPItem = 'ftp ' }; enum { kAEISHTTPSearchArgs = 'kfor', kAEISPostArgs = 'post', kAEISMethod = 'meth', kAEISClientAddress = 'addr', kAEISUserName = 'user', kAEISPassword = 'pass', kAEISFromUser = 'frmu', kAEISServerName = 'svnm', kAEISServerPort = 'svpt', kAEISScriptName = 'scnm', kAEISContentType = 'ctyp', kAEISReferrer = 'refr', kAEISUserAgent = 'Agnt', kAEISAction = 'Kact', kAEISActionPath = 'Kapt', kAEISClientIP = 'Kcip', kAEISFullRequest = 'Kfrq' }; enum { pScheme = 'pusc', pHost = 'HOST', pPath = 'FTPc', pUserName = 'RAun', pUserPassword = 'RApw', pDNSForm = 'pDNS', pURL = 'pURL', pTextEncoding = 'ptxe', pFTPKind = 'kind' }; enum { eScheme = 'esch', eurlHTTP = 'http', eurlHTTPS = 'htps', eurlFTP = 'ftp ', eurlMail = 'mail', eurlFile = 'file', eurlGopher = 'gphr', eurlTelnet = 'tlnt', eurlNews = 'news', eurlSNews = 'snws', eurlNNTP = 'nntp', eurlMessage = 'mess', eurlMailbox = 'mbox', eurlMulti = 'mult', eurlLaunch = 'laun', eurlAFP = 'afp ', eurlAT = 'at ', eurlEPPC = 'eppc', eurlRTSP = 'rtsp', eurlIMAP = 'imap', eurlNFS = 'unfs', eurlPOP = 'upop', eurlLDAP = 'uldp', eurlUnknown = 'url?' }; enum { kConnSuite = 'macc', cDevSpec = 'cdev', cAddressSpec = 'cadr', cADBAddress = 'cadb', cAppleTalkAddress = 'cat ', cBusAddress = 'cbus', cEthernetAddress = 'cen ', cFireWireAddress = 'cfw ', cIPAddress = 'cip ', cLocalTalkAddress = 'clt ', cSCSIAddress = 'cscs', cTokenRingAddress = 'ctok', cUSBAddress = 'cusb', pDeviceType = 'pdvt', pDeviceAddress = 'pdva', pConduit = 'pcon', pProtocol = 'pprt', pATMachine = 'patm', pATZone = 'patz', pATType = 'patt', pDottedDecimal = 'pipd', pDNS = 'pdns', pPort = 'ppor', pNetwork = 'pnet', pNode = 'pnod', pSocket = 'psoc', pSCSIBus = 'pscb', pSCSILUN = 'pslu', eDeviceType = 'edvt', eAddressSpec = 'eads', eConduit = 'econ', eProtocol = 'epro', eADB = 'eadb', eAnalogAudio = 'epau', eAppleTalk = 'epat', eAudioLineIn = 'ecai', eAudioLineOut = 'ecal', eAudioOut = 'ecao', eBus = 'ebus', eCDROM = 'ecd ', eCommSlot = 'eccm', eDigitalAudio = 'epda', eDisplay = 'edds', eDVD = 'edvd', eEthernet = 'ecen', eFireWire = 'ecfw', eFloppy = 'efd ', eHD = 'ehd ', eInfrared = 'ecir', eIP = 'epip', eIrDA = 'epir', eIRTalk = 'epit', eKeyboard = 'ekbd', eLCD = 'edlc', eLocalTalk = 'eclt', eMacIP = 'epmi', eMacVideo = 'epmv', eMicrophone = 'ecmi', eModemPort = 'ecmp', eModemPrinterPort = 'empp', eModem = 'edmm', eMonitorOut = 'ecmn', eMouse = 'emou', eNuBusCard = 'ednb', eNuBus = 'enub', ePCcard = 'ecpc', ePCIbus = 'ecpi', ePCIcard = 'edpi', ePDSslot = 'ecpd', ePDScard = 'epds', ePointingDevice = 'edpd', ePostScript = 'epps', ePPP = 'eppp', ePrinterPort = 'ecpp', ePrinter = 'edpr', eSvideo = 'epsv', eSCSI = 'ecsc', eSerial = 'epsr', eSpeakers = 'edsp', eStorageDevice = 'edst', eSVGA = 'epsg', eTokenRing = 'etok', eTrackball = 'etrk', eTrackpad = 'edtp', eUSB = 'ecus', eVideoIn = 'ecvi', eVideoMonitor = 'edvm', eVideoOut = 'ecvo' }; enum { cKeystroke = 'kprs', pKeystrokeKey = 'kMsg', pModifiers = 'kMod', pKeyKind = 'kknd', eModifiers = 'eMds', eOptionDown = 'Kopt', eCommandDown = 'Kcmd', eControlDown = 'Kctl', eShiftDown = 'Ksft', eCapsLockDown = 'Kclk', eKeyKind = 'ekst', eEscapeKey = 0x6B733500, eDeleteKey = 0x6B733300, eTabKey = 0x6B733000, eReturnKey = 0x6B732400, eClearKey = 0x6B734700, eEnterKey = 0x6B734C00, eUpArrowKey = 0x6B737E00, eDownArrowKey = 0x6B737D00, eLeftArrowKey = 0x6B737B00, eRightArrowKey = 0x6B737C00, eHelpKey = 0x6B737200, eHomeKey = 0x6B737300, ePageUpKey = 0x6B737400, ePageDownKey = 0x6B737900, eForwardDelKey = 0x6B737500, eEndKey = 0x6B737700, eF1Key = 0x6B737A00, eF2Key = 0x6B737800, eF3Key = 0x6B736300, eF4Key = 0x6B737600, eF5Key = 0x6B736000, eF6Key = 0x6B736100, eF7Key = 0x6B736200, eF8Key = 0x6B736400, eF9Key = 0x6B736500, eF10Key = 0x6B736D00, eF11Key = 0x6B736700, eF12Key = 0x6B736F00, eF13Key = 0x6B736900, eF14Key = 0x6B736B00, eF15Key = 0x6B737100 }; enum { keyAELaunchedAsLogInItem = 'lgit', keyAELaunchedAsServiceItem = 'svit' }; #pragma pack(pop) #pragma pack(push, 2) enum { kAEUserTerminology = 'aeut', kAETerminologyExtension = 'aete', kAEScriptingSizeResource = 'scsz', kAEOSAXSizeResource = 'osiz' }; enum { kAEUTHasReturningParam = 31, kAEUTOptional = 15, kAEUTlistOfItems = 14, kAEUTEnumerated = 13, kAEUTReadWrite = 12, kAEUTChangesState = 12, kAEUTTightBindingFunction = 12, kAEUTEnumsAreTypes = 11, kAEUTEnumListIsExclusive = 10, kAEUTReplyIsReference = 9, kAEUTDirectParamIsReference = 9, kAEUTParamIsReference = 9, kAEUTPropertyIsReference = 9, kAEUTNotDirectParamIsTarget = 8, kAEUTParamIsTarget = 8, kAEUTApostrophe = 3, kAEUTFeminine = 2, kAEUTMasculine = 1, kAEUTPlural = 0 }; struct TScriptingSizeResource { SInt16 scriptingSizeFlags; UInt32 minStackSize; UInt32 preferredStackSize; UInt32 maxStackSize; UInt32 minHeapSize; UInt32 preferredHeapSize; UInt32 maxHeapSize; }; typedef struct TScriptingSizeResource TScriptingSizeResource; enum { kLaunchToGetTerminology = (1 << 15), kDontFindAppBySignature = (1 << 14), kAlwaysSendSubject = (1 << 13) }; enum { kReadExtensionTermsMask = (1 << 15) }; enum { kOSIZDontOpenResourceFile = 15, kOSIZdontAcceptRemoteEvents = 14, kOSIZOpenWithReadPermission = 13, kOSIZCodeInSharedLibraries = 11 }; #pragma pack(pop) extern "C" { #pragma pack(push, 2) typedef UInt32 AEBuildErrorCode; enum { aeBuildSyntaxNoErr = 0, aeBuildSyntaxBadToken = 1, aeBuildSyntaxBadEOF = 2, aeBuildSyntaxNoEOF = 3, aeBuildSyntaxBadNegative = 4, aeBuildSyntaxMissingQuote = 5, aeBuildSyntaxBadHex = 6, aeBuildSyntaxOddHex = 7, aeBuildSyntaxNoCloseHex = 8, aeBuildSyntaxUncoercedHex = 9, aeBuildSyntaxNoCloseString = 10, aeBuildSyntaxBadDesc = 11, aeBuildSyntaxBadData = 12, aeBuildSyntaxNoCloseParen = 13, aeBuildSyntaxNoCloseBracket = 14, aeBuildSyntaxNoCloseBrace = 15, aeBuildSyntaxNoKey = 16, aeBuildSyntaxNoColon = 17, aeBuildSyntaxCoercedList = 18, aeBuildSyntaxUncoercedDoubleAt = 19 }; struct AEBuildError { AEBuildErrorCode fError; UInt32 fErrorPos; }; typedef struct AEBuildError AEBuildError; extern OSStatus AEBuildDesc( AEDesc * dst, AEBuildError * error, const char * src, ...) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus vAEBuildDesc( AEDesc * dst, AEBuildError * error, const char * src, va_list args) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEBuildParameters( AppleEvent * event, AEBuildError * error, const char * format, ...) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus vAEBuildParameters( AppleEvent * event, AEBuildError * error, const char * format, va_list args) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEBuildAppleEvent( AEEventClass theClass, AEEventID theID, DescType addressType, const void * addressData, Size addressLength, SInt16 returnID, SInt32 transactionID, AppleEvent * result, AEBuildError * error, const char * paramsFmt, ...) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus vAEBuildAppleEvent( AEEventClass theClass, AEEventID theID, DescType addressType, const void * addressData, Size addressLength, SInt16 returnID, SInt32 transactionID, AppleEvent * resultEvt, AEBuildError * error, const char * paramsFmt, va_list args) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEPrintDescToHandle( const AEDesc * desc, Handle * result) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef struct OpaqueAEStreamRef* AEStreamRef; extern AEStreamRef AEStreamOpen(void) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamClose( AEStreamRef ref, AEDesc * desc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamOpenDesc( AEStreamRef ref, DescType newType) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamWriteData( AEStreamRef ref, const void * data, Size length) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamCloseDesc(AEStreamRef ref) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamWriteDesc( AEStreamRef ref, DescType newType, const void * data, Size length) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamWriteAEDesc( AEStreamRef ref, const AEDesc * desc) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamOpenList(AEStreamRef ref) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamCloseList(AEStreamRef ref) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamOpenRecord( AEStreamRef ref, DescType newType) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamSetRecordType( AEStreamRef ref, DescType newType) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamCloseRecord(AEStreamRef ref) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamWriteKeyDesc( AEStreamRef ref, AEKeyword key, DescType newType, const void * data, Size length) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamOpenKeyDesc( AEStreamRef ref, AEKeyword key, DescType newType) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamWriteKey( AEStreamRef ref, AEKeyword key) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern AEStreamRef AEStreamCreateEvent( AEEventClass clazz, AEEventID id, DescType targetType, const void * targetData, Size targetLength, SInt16 returnID, SInt32 transactionID) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern AEStreamRef AEStreamOpenEvent(AppleEvent * event) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEStreamOptionalParam( AEStreamRef ref, AEKeyword key) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } extern "C" { } extern "C" { enum { keyReplyPortAttr = 'repp' }; enum { typeReplyPortAttr = keyReplyPortAttr }; extern mach_port_t AEGetRegisteredMachPort(void) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEDecodeMessage( mach_msg_header_t * header, AppleEvent * event, AppleEvent * reply) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AEProcessMessage(mach_msg_header_t * header) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus AESendMessage( const AppleEvent * event, AppleEvent * reply, AESendMode sendMode, long timeOutInTicks) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { #pragma clang assume_nonnull begin extern __attribute__((__visibility__("default"))) const CFStringRef kCFErrorDomainCFNetwork __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFErrorDomainWinSock __attribute__((availability(macosx,introduced=10_5))); typedef int CFNetworkErrors; enum { kCFHostErrorHostNotFound = 1, kCFHostErrorUnknown = 2, kCFSOCKSErrorUnknownClientVersion = 100, kCFSOCKSErrorUnsupportedServerVersion = 101, kCFSOCKS4ErrorRequestFailed = 110, kCFSOCKS4ErrorIdentdFailed = 111, kCFSOCKS4ErrorIdConflict = 112, kCFSOCKS4ErrorUnknownStatusCode = 113, kCFSOCKS5ErrorBadState = 120, kCFSOCKS5ErrorBadResponseAddr = 121, kCFSOCKS5ErrorBadCredentials = 122, kCFSOCKS5ErrorUnsupportedNegotiationMethod = 123, kCFSOCKS5ErrorNoAcceptableMethod = 124, kCFFTPErrorUnexpectedStatusCode = 200, kCFErrorHTTPAuthenticationTypeUnsupported = 300, kCFErrorHTTPBadCredentials = 301, kCFErrorHTTPConnectionLost = 302, kCFErrorHTTPParseFailure = 303, kCFErrorHTTPRedirectionLoopDetected = 304, kCFErrorHTTPBadURL = 305, kCFErrorHTTPProxyConnectionFailure = 306, kCFErrorHTTPBadProxyCredentials = 307, kCFErrorPACFileError = 308, kCFErrorPACFileAuth = 309, kCFErrorHTTPSProxyConnectionFailure = 310, kCFStreamErrorHTTPSProxyFailureUnexpectedResponseToCONNECTMethod = 311, kCFURLErrorBackgroundSessionInUseByAnotherProcess = -996, kCFURLErrorBackgroundSessionWasDisconnected = -997, kCFURLErrorUnknown = -998, kCFURLErrorCancelled = -999, kCFURLErrorBadURL = -1000, kCFURLErrorTimedOut = -1001, kCFURLErrorUnsupportedURL = -1002, kCFURLErrorCannotFindHost = -1003, kCFURLErrorCannotConnectToHost = -1004, kCFURLErrorNetworkConnectionLost = -1005, kCFURLErrorDNSLookupFailed = -1006, kCFURLErrorHTTPTooManyRedirects = -1007, kCFURLErrorResourceUnavailable = -1008, kCFURLErrorNotConnectedToInternet = -1009, kCFURLErrorRedirectToNonExistentLocation = -1010, kCFURLErrorBadServerResponse = -1011, kCFURLErrorUserCancelledAuthentication = -1012, kCFURLErrorUserAuthenticationRequired = -1013, kCFURLErrorZeroByteResource = -1014, kCFURLErrorCannotDecodeRawData = -1015, kCFURLErrorCannotDecodeContentData = -1016, kCFURLErrorCannotParseResponse = -1017, kCFURLErrorInternationalRoamingOff = -1018, kCFURLErrorCallIsActive = -1019, kCFURLErrorDataNotAllowed = -1020, kCFURLErrorRequestBodyStreamExhausted = -1021, kCFURLErrorAppTransportSecurityRequiresSecureConnection = -1022, kCFURLErrorFileDoesNotExist = -1100, kCFURLErrorFileIsDirectory = -1101, kCFURLErrorNoPermissionsToReadFile = -1102, kCFURLErrorDataLengthExceedsMaximum = -1103, kCFURLErrorFileOutsideSafeArea = -1104, kCFURLErrorSecureConnectionFailed = -1200, kCFURLErrorServerCertificateHasBadDate = -1201, kCFURLErrorServerCertificateUntrusted = -1202, kCFURLErrorServerCertificateHasUnknownRoot = -1203, kCFURLErrorServerCertificateNotYetValid = -1204, kCFURLErrorClientCertificateRejected = -1205, kCFURLErrorClientCertificateRequired = -1206, kCFURLErrorCannotLoadFromNetwork = -2000, kCFURLErrorCannotCreateFile = -3000, kCFURLErrorCannotOpenFile = -3001, kCFURLErrorCannotCloseFile = -3002, kCFURLErrorCannotWriteToFile = -3003, kCFURLErrorCannotRemoveFile = -3004, kCFURLErrorCannotMoveFile = -3005, kCFURLErrorDownloadDecodingFailedMidStream = -3006, kCFURLErrorDownloadDecodingFailedToComplete = -3007, kCFHTTPCookieCannotParseCookieFile = -4000, kCFNetServiceErrorUnknown = -72000L, kCFNetServiceErrorCollision = -72001L, kCFNetServiceErrorNotFound = -72002L, kCFNetServiceErrorInProgress = -72003L, kCFNetServiceErrorBadArgument = -72004L, kCFNetServiceErrorCancel = -72005L, kCFNetServiceErrorInvalid = -72006L, kCFNetServiceErrorTimeout = -72007L, kCFNetServiceErrorDNSServiceFailure = -73000L }; extern __attribute__((__visibility__("default"))) const CFStringRef kCFURLErrorFailingURLErrorKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFURLErrorFailingURLStringErrorKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFGetAddrInfoFailureKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFSOCKSStatusCodeKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFSOCKSVersionKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFSOCKSNegotiationMethodKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFDNSServiceFailureKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPStatusCodeKey __attribute__((availability(macosx,introduced=10_5))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin #pragma pack(push, 2) typedef struct __CFHost* CFHostRef; extern __attribute__((__visibility__("default"))) const SInt32 kCFStreamErrorDomainNetDB __attribute__((availability(macosx,introduced=10_3))); extern __attribute__((__visibility__("default"))) const SInt32 kCFStreamErrorDomainSystemConfiguration __attribute__((availability(macosx,introduced=10_3))); typedef int CFHostInfoType; enum { kCFHostAddresses = 0, kCFHostNames = 1, kCFHostReachability = 2 }; struct CFHostClientContext { CFIndex version; void * _Nullable info; CFAllocatorRetainCallBack _Nullable retain; CFAllocatorReleaseCallBack _Nullable release; CFAllocatorCopyDescriptionCallBack _Nullable copyDescription; }; typedef struct CFHostClientContext CFHostClientContext; typedef void ( * CFHostClientCallBack)(CFHostRef theHost, CFHostInfoType typeInfo, const CFStreamError * _Nullable error, void * _Nullable info); extern __attribute__((__visibility__("default"))) CFTypeID CFHostGetTypeID(void) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) CFHostRef CFHostCreateWithName(CFAllocatorRef _Nullable allocator, CFStringRef hostname) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) CFHostRef CFHostCreateWithAddress(CFAllocatorRef _Nullable allocator, CFDataRef addr) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) CFHostRef CFHostCreateCopy(CFAllocatorRef _Nullable alloc, CFHostRef host) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) Boolean CFHostStartInfoResolution(CFHostRef theHost, CFHostInfoType info, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) _Nullable CFArrayRef CFHostGetAddressing(CFHostRef theHost, Boolean * _Nullable hasBeenResolved) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) _Nullable CFArrayRef CFHostGetNames(CFHostRef theHost, Boolean * _Nullable hasBeenResolved) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) _Nullable CFDataRef CFHostGetReachability(CFHostRef theHost, Boolean * _Nullable hasBeenResolved) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) void CFHostCancelInfoResolution(CFHostRef theHost, CFHostInfoType info) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) Boolean CFHostSetClient(CFHostRef theHost, CFHostClientCallBack _Nullable clientCB, CFHostClientContext * _Nullable clientContext) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) void CFHostScheduleWithRunLoop(CFHostRef theHost, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); extern __attribute__((__visibility__("default"))) void CFHostUnscheduleFromRunLoop(CFHostRef theHost, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <CFNetwork/CFHost.h>"))); #pragma pack(pop) #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin #pragma pack(push, 2) typedef struct __CFNetService* CFNetServiceRef; typedef struct __CFNetServiceMonitor* CFNetServiceMonitorRef; typedef struct __CFNetServiceBrowser* CFNetServiceBrowserRef; extern __attribute__((__visibility__("default"))) const SInt32 kCFStreamErrorDomainMach __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) const SInt32 kCFStreamErrorDomainNetServices __attribute__((availability(macosx,introduced=10_2))); typedef int CFNetServicesError; enum { kCFNetServicesErrorUnknown = -72000L, kCFNetServicesErrorCollision = -72001L, kCFNetServicesErrorNotFound = -72002L, kCFNetServicesErrorInProgress = -72003L, kCFNetServicesErrorBadArgument = -72004L, kCFNetServicesErrorCancel = -72005L, kCFNetServicesErrorInvalid = -72006L, kCFNetServicesErrorTimeout = -72007L, kCFNetServicesErrorMissingRequiredConfiguration __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,unavailable))) = -72008L, }; typedef int CFNetServiceMonitorType; enum { kCFNetServiceMonitorTXT = 1 }; typedef CFOptionFlags CFNetServiceRegisterFlags; enum { kCFNetServiceFlagNoAutoRename = 1 }; typedef CFOptionFlags CFNetServiceBrowserFlags; enum { kCFNetServiceFlagMoreComing = 1, kCFNetServiceFlagIsDomain = 2, kCFNetServiceFlagIsDefault = 4, kCFNetServiceFlagIsRegistrationDomain __attribute__((availability(macosx,introduced=10_2,deprecated=10_4,message="" ))) = 4, kCFNetServiceFlagRemove = 8 }; struct CFNetServiceClientContext { CFIndex version; void * _Nullable info; CFAllocatorRetainCallBack _Nullable retain; CFAllocatorReleaseCallBack _Nullable release; CFAllocatorCopyDescriptionCallBack _Nullable copyDescription; }; typedef struct CFNetServiceClientContext CFNetServiceClientContext; typedef void ( * CFNetServiceClientCallBack)(CFNetServiceRef theService, CFStreamError * _Nullable error, void * _Nullable info); typedef void ( * CFNetServiceMonitorClientCallBack)(CFNetServiceMonitorRef theMonitor, CFNetServiceRef _Nullable theService, CFNetServiceMonitorType typeInfo, CFDataRef _Nullable rdata, CFStreamError * _Nullable error, void * _Nullable info); typedef void ( * CFNetServiceBrowserClientCallBack)(CFNetServiceBrowserRef browser, CFOptionFlags flags, CFTypeRef _Nullable domainOrService, CFStreamError * _Nullable error, void * _Nullable info); extern __attribute__((__visibility__("default"))) CFTypeID CFNetServiceGetTypeID(void) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFTypeID CFNetServiceMonitorGetTypeID(void) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFTypeID CFNetServiceBrowserGetTypeID(void) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFNetServiceRef CFNetServiceCreate(CFAllocatorRef _Nullable alloc, CFStringRef domain, CFStringRef serviceType, CFStringRef name, SInt32 port) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFNetServiceRef CFNetServiceCreateCopy(CFAllocatorRef _Nullable alloc, CFNetServiceRef service) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFStringRef CFNetServiceGetDomain(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFStringRef CFNetServiceGetType(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFStringRef CFNetServiceGetName(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceRegisterWithOptions(CFNetServiceRef theService, CFOptionFlags options, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceResolveWithTimeout(CFNetServiceRef theService, CFTimeInterval timeout, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceCancel(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) _Nullable CFStringRef CFNetServiceGetTargetHost(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) SInt32 CFNetServiceGetPortNumber(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.5,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) _Nullable CFArrayRef CFNetServiceGetAddressing(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) _Nullable CFDataRef CFNetServiceGetTXTData(CFNetServiceRef theService) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceSetTXTData(CFNetServiceRef theService, CFDataRef txtRecord) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) _Nullable CFDictionaryRef CFNetServiceCreateDictionaryWithTXTData(CFAllocatorRef _Nullable alloc, CFDataRef txtRecord) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) _Nullable CFDataRef CFNetServiceCreateTXTDataWithDictionary(CFAllocatorRef _Nullable alloc, CFDictionaryRef keyValuePairs) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceSetClient(CFNetServiceRef theService, CFNetServiceClientCallBack _Nullable clientCB, CFNetServiceClientContext * _Nullable clientContext) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceScheduleWithRunLoop(CFNetServiceRef theService, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceUnscheduleFromRunLoop(CFNetServiceRef theService, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFNetServiceMonitorRef CFNetServiceMonitorCreate( CFAllocatorRef _Nullable alloc, CFNetServiceRef theService, CFNetServiceMonitorClientCallBack clientCB, CFNetServiceClientContext * clientContext) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceMonitorInvalidate(CFNetServiceMonitorRef monitor) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceMonitorStart(CFNetServiceMonitorRef monitor, CFNetServiceMonitorType recordType, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceMonitorStop(CFNetServiceMonitorRef monitor, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceMonitorScheduleWithRunLoop(CFNetServiceMonitorRef monitor, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceMonitorUnscheduleFromRunLoop(CFNetServiceMonitorRef monitor, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) CFNetServiceBrowserRef CFNetServiceBrowserCreate(CFAllocatorRef _Nullable alloc, CFNetServiceBrowserClientCallBack clientCB, CFNetServiceClientContext *clientContext) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceBrowserInvalidate(CFNetServiceBrowserRef browser) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceBrowserSearchForDomains(CFNetServiceBrowserRef browser, Boolean registrationDomains, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceBrowserSearchForServices(CFNetServiceBrowserRef browser, CFStringRef domain, CFStringRef serviceType, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceBrowserStopSearch(CFNetServiceBrowserRef browser, CFStreamError * _Nullable error) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceBrowserScheduleWithRunLoop(CFNetServiceBrowserRef browser, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFNetServiceBrowserUnscheduleFromRunLoop(CFNetServiceBrowserRef browser, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t or nw_listener_t in Network framework instead"))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceRegister(CFNetServiceRef theService, CFStreamError * _Nullable error) __attribute__((availability(macosx,introduced=10_2,deprecated=10_4,message="" ))); extern __attribute__((__visibility__("default"))) Boolean CFNetServiceResolve(CFNetServiceRef theService, CFStreamError * _Nullable error) __attribute__((availability(macosx,introduced=10_2,deprecated=10_4,message="" ))); #pragma pack(pop) #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySSLContext __attribute__((availability(macosx,introduced=10_9))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySSLPeerTrust __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLValidatesCertificateChain __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySSLSettings __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLLevel __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLPeerName __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLCertificates __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLIsServer __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceType __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeVideo __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeVoice __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeBackground __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeResponsiveData __attribute__((availability(macosx,introduced=10.8))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeCallSignaling __attribute__((availability(macosx,introduced=10_12))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeAVStreaming __attribute__((availability(macosx,introduced=10.8))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeResponsiveAV __attribute__((availability(macosx,introduced=10.8))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamNetworkServiceTypeVoIP __attribute__((availability(macosx,introduced=10_7,deprecated=10_11,message="" "use PushKit for VoIP control purposes"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyNoCellular __attribute__((availability(macosx,introduced=10_8))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyConnectionIsCellular __attribute__((availability(macosx,introduced=10_8))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyAllowExpensiveNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyConnectionIsExpensive __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyAllowConstrainedNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); extern __attribute__((__visibility__("default"))) const CFIndex kCFStreamErrorDomainWinSock __attribute__((availability(macosx,introduced=10_5))); static __inline__ __attribute__((always_inline)) SInt32 CFSocketStreamSOCKSGetErrorSubdomain(const CFStreamError* error) { return ((error->error >> 16) & 0x0000FFFF); } static __inline__ __attribute__((always_inline)) SInt32 CFSocketStreamSOCKSGetError(const CFStreamError* error) { return (error->error & 0x0000FFFF); } enum { kCFStreamErrorSOCKSSubDomainNone = 0, kCFStreamErrorSOCKSSubDomainVersionCode = 1, kCFStreamErrorSOCKS4SubDomainResponse = 2, kCFStreamErrorSOCKS5SubDomainUserPass = 3, kCFStreamErrorSOCKS5SubDomainMethod = 4, kCFStreamErrorSOCKS5SubDomainResponse = 5 }; enum { kCFStreamErrorSOCKS5BadResponseAddr = 1, kCFStreamErrorSOCKS5BadState = 2, kCFStreamErrorSOCKSUnknownClientVersion = 3 }; enum { kCFStreamErrorSOCKS4RequestFailed = 91, kCFStreamErrorSOCKS4IdentdFailed = 92, kCFStreamErrorSOCKS4IdConflict = 93 }; enum { kSOCKS5NoAcceptableMethod = 0xFF }; extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyProxyLocalBypass __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySocketRemoteHost __attribute__((availability(macosx,introduced=10_3))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySocketRemoteNetService __attribute__((availability(macosx,introduced=10_3))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySocketExtendedBackgroundIdleMode __attribute__((availability(macosx,introduced=10_11))); extern __attribute__((__visibility__("default"))) void CFStreamCreatePairWithSocketToCFHost( CFAllocatorRef _Nullable alloc, CFHostRef host, SInt32 port, CFReadStreamRef _Nullable * _Nullable readStream, CFWriteStreamRef _Nullable * _Nullable writeStream) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead"))); extern __attribute__((__visibility__("default"))) void CFStreamCreatePairWithSocketToNetService( CFAllocatorRef _Nullable alloc, CFNetServiceRef service, CFReadStreamRef _Nullable * _Nullable readStream, CFWriteStreamRef _Nullable * _Nullable writeStream) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use Network framework instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="Use Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use Network framework instead"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertySSLPeerCertificates __attribute__((availability(macosx,introduced=10_4,deprecated=10_6,message="" ))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLAllowsExpiredCertificates __attribute__((availability(macosx,introduced=10_4,deprecated=10_6,message="" ))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLAllowsExpiredRoots __attribute__((availability(macosx,introduced=10_4,deprecated=10_6,message="" ))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamSSLAllowsAnyRoot __attribute__((availability(macosx,introduced=10_4,deprecated=10_6,message="" ))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern __attribute__((__visibility__("default"))) const SInt32 kCFStreamErrorDomainFTP __attribute__((availability(macosx,introduced=10_3))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPUserName __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPPassword __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPUsePassiveMode __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPResourceSize __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPFetchResourceInfo __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPFileTransferOffset __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPAttemptPersistentConnection __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPProxy __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPProxyHost __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPProxyPort __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPProxyUser __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyFTPProxyPassword __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceMode __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceName __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceOwner __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceGroup __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceLink __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceSize __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceType __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFFTPResourceModDate __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) CFReadStreamRef CFReadStreamCreateWithFTPURL(CFAllocatorRef _Nullable alloc, CFURLRef ftpURL) __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) CFIndex CFFTPCreateParsedResourceListing(CFAllocatorRef _Nullable alloc, const UInt8 *buffer, CFIndex bufferLength, CFDictionaryRef _Nullable * _Nullable parsed) __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); extern __attribute__((__visibility__("default"))) CFWriteStreamRef CFWriteStreamCreateWithFTPURL(CFAllocatorRef _Nullable alloc, CFURLRef ftpURL) __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSessionAPI for ftp requests"))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPVersion1_0 __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPVersion1_1 __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPVersion2_0 __attribute__((availability(macosx,introduced=10_10))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPVersion3_0 __attribute__((availability(macosx,introduced=10_15))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeBasic __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeDigest __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeNTLM __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeKerberos __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeNegotiate __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeNegotiate2 __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationSchemeXMobileMeAuthToken __attribute__((availability(macosx,introduced=10_6))); typedef struct __CFHTTPMessage* CFHTTPMessageRef; extern __attribute__((__visibility__("default"))) CFTypeID CFHTTPMessageGetTypeID(void) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) CFHTTPMessageRef CFHTTPMessageCreateRequest(CFAllocatorRef _Nullable alloc, CFStringRef requestMethod, CFURLRef url, CFStringRef httpVersion) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) CFHTTPMessageRef CFHTTPMessageCreateResponse( CFAllocatorRef _Nullable alloc, CFIndex statusCode, CFStringRef _Nullable statusDescription, CFStringRef httpVersion) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) CFHTTPMessageRef CFHTTPMessageCreateEmpty(CFAllocatorRef _Nullable alloc, Boolean isRequest) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) CFHTTPMessageRef CFHTTPMessageCreateCopy(CFAllocatorRef _Nullable alloc, CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPMessageIsRequest(CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) CFStringRef CFHTTPMessageCopyVersion(CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFDataRef CFHTTPMessageCopyBody(CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) void CFHTTPMessageSetBody(CFHTTPMessageRef message, CFDataRef bodyData) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFStringRef CFHTTPMessageCopyHeaderFieldValue(CFHTTPMessageRef message, CFStringRef headerField) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFDictionaryRef CFHTTPMessageCopyAllHeaderFields(CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) void CFHTTPMessageSetHeaderFieldValue(CFHTTPMessageRef message, CFStringRef headerField, CFStringRef _Nullable value) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPMessageAppendBytes(CFHTTPMessageRef message, const UInt8 *newBytes, CFIndex numBytes) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPMessageIsHeaderComplete(CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFDataRef CFHTTPMessageCopySerializedMessage(CFHTTPMessageRef message) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFURLRef CFHTTPMessageCopyRequestURL(CFHTTPMessageRef request) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFStringRef CFHTTPMessageCopyRequestMethod(CFHTTPMessageRef request) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPMessageAddAuthentication( CFHTTPMessageRef request, CFHTTPMessageRef _Nullable authenticationFailureResponse, CFStringRef username, CFStringRef password, CFStringRef _Nullable authenticationScheme, Boolean forProxy) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) CFIndex CFHTTPMessageGetResponseStatusCode(CFHTTPMessageRef response) __attribute__((availability(macosx,introduced=10_1))); extern __attribute__((__visibility__("default"))) _Nullable CFStringRef CFHTTPMessageCopyResponseStatusLine(CFHTTPMessageRef response) __attribute__((availability(macosx,introduced=10_1))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern __attribute__((__visibility__("default"))) const SInt32 kCFStreamErrorDomainHTTP __attribute__((availability(macosx,introduced=10_1))); typedef int CFStreamErrorHTTP; enum { kCFStreamErrorHTTPParseFailure = -1, kCFStreamErrorHTTPRedirectionLoop = -2, kCFStreamErrorHTTPBadURL = -3 }; extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPResponseHeader __attribute__((availability(macosx,introduced=10_1,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPFinalURL __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPFinalRequest __attribute__((availability(macosx,introduced=10_5,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPProxy __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPProxyHost __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPProxyPort __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPSProxyHost __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPSProxyPort __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPShouldAutoredirect __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPAttemptPersistentConnection __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFStreamPropertyHTTPRequestBytesWrittenCount __attribute__((availability(macosx,introduced=10_3,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) CFReadStreamRef CFReadStreamCreateForHTTPRequest(CFAllocatorRef _Nullable alloc, CFHTTPMessageRef request) __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); extern __attribute__((__visibility__("default"))) CFReadStreamRef CFReadStreamCreateForStreamedHTTPRequest(CFAllocatorRef _Nullable alloc, CFHTTPMessageRef requestHeaders, CFReadStreamRef requestBody) __attribute__((availability(macosx,introduced=10_2,deprecated=10_11,message="" "Use NSURLSession API for http requests"))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct _CFHTTPAuthentication* CFHTTPAuthenticationRef; typedef int CFStreamErrorHTTPAuthentication; enum { kCFStreamErrorHTTPAuthenticationTypeUnsupported = -1000, kCFStreamErrorHTTPAuthenticationBadUserName = -1001, kCFStreamErrorHTTPAuthenticationBadPassword = -1002 }; extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationUsername __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationPassword __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFHTTPAuthenticationAccountDomain __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) CFTypeID CFHTTPAuthenticationGetTypeID(void) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) CFHTTPAuthenticationRef CFHTTPAuthenticationCreateFromResponse(CFAllocatorRef _Nullable alloc, CFHTTPMessageRef response) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPAuthenticationIsValid(CFHTTPAuthenticationRef auth, CFStreamError * _Nullable error) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPAuthenticationAppliesToRequest(CFHTTPAuthenticationRef auth, CFHTTPMessageRef request) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPAuthenticationRequiresOrderedRequests(CFHTTPAuthenticationRef auth) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPMessageApplyCredentials( CFHTTPMessageRef request, CFHTTPAuthenticationRef auth, CFStringRef _Nullable username, CFStringRef _Nullable password, CFStreamError * _Nullable error) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPMessageApplyCredentialDictionary( CFHTTPMessageRef request, CFHTTPAuthenticationRef auth, CFDictionaryRef dict, CFStreamError * _Nullable error) __attribute__((availability(macosx,introduced=10_4))); extern __attribute__((__visibility__("default"))) CFStringRef CFHTTPAuthenticationCopyRealm(CFHTTPAuthenticationRef auth) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) CFArrayRef CFHTTPAuthenticationCopyDomains(CFHTTPAuthenticationRef auth) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) CFStringRef CFHTTPAuthenticationCopyMethod(CFHTTPAuthenticationRef auth) __attribute__((availability(macosx,introduced=10_2))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPAuthenticationRequiresUserNameAndPassword(CFHTTPAuthenticationRef auth) __attribute__((availability(macosx,introduced=10_3))); extern __attribute__((__visibility__("default"))) Boolean CFHTTPAuthenticationRequiresAccountDomain(CFHTTPAuthenticationRef auth) __attribute__((availability(macosx,introduced=10_4))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef struct __CFNetDiagnostic* CFNetDiagnosticRef; typedef int CFNetDiagnosticStatusValues; enum { kCFNetDiagnosticNoErr = 0, kCFNetDiagnosticErr = -66560L, kCFNetDiagnosticConnectionUp = -66559L, kCFNetDiagnosticConnectionIndeterminate = -66558L, kCFNetDiagnosticConnectionDown = -66557L } __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); typedef CFIndex CFNetDiagnosticStatus __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); extern __attribute__((__visibility__("default"))) CFNetDiagnosticRef CFNetDiagnosticCreateWithStreams(CFAllocatorRef _Nullable alloc, CFReadStreamRef _Nullable readStream, CFWriteStreamRef _Nullable writeStream) __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); extern __attribute__((__visibility__("default"))) CFNetDiagnosticRef CFNetDiagnosticCreateWithURL(CFAllocatorRef alloc, CFURLRef url) __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); extern __attribute__((__visibility__("default"))) void CFNetDiagnosticSetName(CFNetDiagnosticRef details, CFStringRef name) __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); extern __attribute__((__visibility__("default"))) CFNetDiagnosticStatus CFNetDiagnosticDiagnoseProblemInteractively(CFNetDiagnosticRef details) __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); extern __attribute__((__visibility__("default"))) CFNetDiagnosticStatus CFNetDiagnosticCopyNetworkStatusPassively(CFNetDiagnosticRef details, CFStringRef _Nullable * _Nullable description) __attribute__((availability(macosx,introduced=10_4,deprecated=10_13,message="" ))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern __attribute__((__visibility__("default"))) _Nullable CFDictionaryRef CFNetworkCopySystemProxySettings(void) __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) CFArrayRef CFNetworkCopyProxiesForURL(CFURLRef url, CFDictionaryRef proxySettings) __attribute__((availability(macosx,introduced=10_5))); typedef void ( * CFProxyAutoConfigurationResultCallback)(void *client, CFArrayRef proxyList, CFErrorRef _Nullable error); extern __attribute__((__visibility__("default"))) _Nullable CFArrayRef CFNetworkCopyProxiesForAutoConfigurationScript(CFStringRef proxyAutoConfigurationScript, CFURLRef targetURL, CFErrorRef * _Nullable error) __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) CFRunLoopSourceRef CFNetworkExecuteProxyAutoConfigurationScript( CFStringRef proxyAutoConfigurationScript, CFURLRef targetURL, CFProxyAutoConfigurationResultCallback cb, CFStreamClientContext * clientContext) __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) CFRunLoopSourceRef CFNetworkExecuteProxyAutoConfigurationURL( CFURLRef proxyAutoConfigURL, CFURLRef targetURL, CFProxyAutoConfigurationResultCallback cb, CFStreamClientContext * clientContext) __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyHostNameKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyPortNumberKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyAutoConfigurationURLKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyAutoConfigurationJavaScriptKey __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyUsernameKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyPasswordKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeNone __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeHTTP __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeHTTPS __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeSOCKS __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeFTP __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeAutoConfigurationURL __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyTypeAutoConfigurationJavaScript __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFProxyAutoConfigurationHTTPResponseKey __attribute__((availability(macosx,introduced=10_5))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesExceptionsList __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesExcludeSimpleHostnames __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesFTPEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesFTPPassive __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesFTPPort __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesFTPProxy __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesGopherEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesGopherPort __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesGopherProxy __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesHTTPEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesHTTPPort __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesHTTPProxy __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesHTTPSEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesHTTPSPort __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesHTTPSProxy __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesRTSPEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesRTSPPort __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesRTSPProxy __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesSOCKSEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesSOCKSPort __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesSOCKSProxy __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesProxyAutoConfigEnable __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesProxyAutoConfigURLString __attribute__((availability(macosx,introduced=10_6))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesProxyAutoConfigJavaScript __attribute__((availability(macosx,introduced=10_7))); extern __attribute__((__visibility__("default"))) const CFStringRef kCFNetworkProxiesProxyAutoDiscoveryEnable __attribute__((availability(macosx,introduced=10_6))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin typedef const struct __attribute__((objc_bridge(id))) __DCSDictionary* DCSDictionaryRef; extern CFRange DCSGetTermRangeInString( DCSDictionaryRef _Nullable dictionary, CFStringRef textString, CFIndex offset ) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=5.0))); extern CFStringRef _Nullable DCSCopyTextDefinition( DCSDictionaryRef _Nullable dictionary, CFStringRef textString, CFRange range ) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=5.0))); #pragma clang assume_nonnull end } extern "C" { #pragma pack(push, 2) extern const CFStringRef kCSIdentityErrorDomain __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=4.0))); enum { kCSIdentityUnknownAuthorityErr = -1, kCSIdentityAuthorityNotAccessibleErr = -2, kCSIdentityPermissionErr = -3, kCSIdentityDeletedErr = -4, kCSIdentityInvalidFullNameErr = -5, kCSIdentityDuplicateFullNameErr = -6, kCSIdentityInvalidPosixNameErr = -7, kCSIdentityDuplicatePosixNameErr = -8, }; #pragma pack(pop) } extern "C" { typedef struct __CSIdentityAuthority* CSIdentityAuthorityRef; extern CFTypeID CSIdentityAuthorityGetTypeID(void) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CSIdentityAuthorityRef CSGetDefaultIdentityAuthority(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityAuthorityRef CSGetLocalIdentityAuthority(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityAuthorityRef CSGetManagedIdentityAuthority(void) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef CSIdentityAuthorityCopyLocalizedName(CSIdentityAuthorityRef authority) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); } extern "C" { #pragma pack(push, 2) typedef struct __CSIdentity* CSIdentityRef; typedef struct __CSIdentityQuery* CSIdentityQueryRef; extern const CFStringRef kCSIdentityGeneratePosixName __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); enum { kCSIdentityClassUser = 1, kCSIdentityClassGroup = 2 }; typedef CFIndex CSIdentityClass; enum { kCSIdentityFlagNone = 0, kCSIdentityFlagHidden = 1 }; typedef CFOptionFlags CSIdentityFlags; extern CFTypeID CSIdentityGetTypeID(void) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CSIdentityRef CSIdentityCreate( CFAllocatorRef allocator, CSIdentityClass identityClass, CFStringRef fullName, CFStringRef posixName, CSIdentityFlags flags, CSIdentityAuthorityRef authority) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityRef CSIdentityCreateCopy( CFAllocatorRef allocator, CSIdentityRef identity) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CSIdentityClass CSIdentityGetClass(CSIdentityRef identity) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CSIdentityAuthorityRef CSIdentityGetAuthority(CSIdentityRef identity) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CFUUIDRef CSIdentityGetUUID(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef CSIdentityGetFullName(CSIdentityRef identity) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern id_t CSIdentityGetPosixID(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef CSIdentityGetPosixName(CSIdentityRef identity) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CFStringRef CSIdentityGetEmailAddress(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFURLRef CSIdentityGetImageURL(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDataRef CSIdentityGetImageData(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef CSIdentityGetImageDataType(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef CSIdentityGetAliases(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean CSIdentityIsMemberOfGroup( CSIdentityRef identity, CSIdentityRef group) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean CSIdentityIsHidden(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDataRef CSIdentityCreatePersistentReference( CFAllocatorRef allocator, CSIdentityRef identity) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern Boolean CSIdentityIsEnabled(CSIdentityRef user) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean CSIdentityAuthenticateUsingPassword( CSIdentityRef user, CFStringRef password) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern SecCertificateRef CSIdentityGetCertificate(CSIdentityRef user) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityQueryRef CSIdentityCreateGroupMembershipQuery( CFAllocatorRef allocator, CSIdentityRef group) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetFullName( CSIdentityRef identity, CFStringRef fullName) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetEmailAddress( CSIdentityRef identity, CFStringRef emailAddress) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetImageURL( CSIdentityRef identity, CFURLRef url) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetImageData( CSIdentityRef identity, CFDataRef imageData, CFStringRef imageDataType) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentityAddAlias( CSIdentityRef identity, CFStringRef alias) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentityRemoveAlias( CSIdentityRef identity, CFStringRef alias) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentityAddMember( CSIdentityRef group, CSIdentityRef member) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentityRemoveMember( CSIdentityRef group, CSIdentityRef member) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetIsEnabled( CSIdentityRef user, Boolean isEnabled) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetPassword( CSIdentityRef user, CFStringRef password) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentitySetCertificate( CSIdentityRef user, SecCertificateRef certificate) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentityDelete(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean CSIdentityCommit( CSIdentityRef identity, AuthorizationRef authorization, CFErrorRef * error) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); enum { kCSIdentityCommitCompleted = 1 }; typedef void (*CSIdentityStatusUpdatedCallback)(CSIdentityRef identity, CFIndex status, CFErrorRef error, void *info); struct CSIdentityClientContext { CFIndex version; void * info; CFAllocatorRetainCallBack retain; CFAllocatorReleaseCallBack release; CFAllocatorCopyDescriptionCallBack copyDescription; CSIdentityStatusUpdatedCallback statusUpdated; }; typedef struct CSIdentityClientContext CSIdentityClientContext; extern Boolean CSIdentityCommitAsynchronously( CSIdentityRef identity, const CSIdentityClientContext * clientContext, CFRunLoopRef runLoop, CFStringRef runLoopMode, AuthorizationRef authorization) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean CSIdentityIsCommitting(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void CSIdentityRemoveClient(CSIdentityRef identity) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) extern CFTypeID CSIdentityQueryGetTypeID(void) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); enum { kCSIdentityQueryGenerateUpdateEvents = 0x0001, kCSIdentityQueryIncludeHiddenIdentities = 0x0002 }; typedef CFOptionFlags CSIdentityQueryFlags; enum { kCSIdentityQueryStringEquals = 1, kCSIdentityQueryStringBeginsWith = 2 }; typedef CFIndex CSIdentityQueryStringComparisonMethod; extern CSIdentityQueryRef CSIdentityQueryCreate( CFAllocatorRef allocator, CSIdentityClass identityClass, CSIdentityAuthorityRef authority) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityQueryRef CSIdentityQueryCreateForName( CFAllocatorRef allocator, CFStringRef name, CSIdentityQueryStringComparisonMethod comparisonMethod, CSIdentityClass identityClass, CSIdentityAuthorityRef authority) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CSIdentityQueryRef CSIdentityQueryCreateForUUID( CFAllocatorRef allocator, CFUUIDRef uuid, CSIdentityAuthorityRef authority) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityQueryRef CSIdentityQueryCreateForPosixID( CFAllocatorRef allocator, id_t posixID, CSIdentityClass identityClass, CSIdentityAuthorityRef authority) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CSIdentityQueryRef CSIdentityQueryCreateForPersistentReference( CFAllocatorRef allocator, CFDataRef referenceData) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern CSIdentityQueryRef CSIdentityQueryCreateForCurrentUser(CFAllocatorRef allocator) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef CSIdentityQueryCopyResults(CSIdentityQueryRef query) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern Boolean CSIdentityQueryExecute( CSIdentityQueryRef query, CSIdentityQueryFlags flags, CFErrorRef * error) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); enum { kCSIdentityQueryEventSearchPhaseFinished = 1, kCSIdentityQueryEventResultsAdded = 2, kCSIdentityQueryEventResultsChanged = 3, kCSIdentityQueryEventResultsRemoved = 4, kCSIdentityQueryEventErrorOccurred = 5 }; typedef CFIndex CSIdentityQueryEvent; typedef void (*CSIdentityQueryReceiveEventCallback)(CSIdentityQueryRef query, CSIdentityQueryEvent event, CFArrayRef identities, CFErrorRef error, void *info); struct CSIdentityQueryClientContext { CFIndex version; void * info; CFAllocatorRetainCallBack retainInfo; CFAllocatorReleaseCallBack releaseInfo; CFAllocatorCopyDescriptionCallBack copyInfoDescription; CSIdentityQueryReceiveEventCallback receiveEvent; }; typedef struct CSIdentityQueryClientContext CSIdentityQueryClientContext; extern Boolean CSIdentityQueryExecuteAsynchronously( CSIdentityQueryRef query, CSIdentityQueryFlags flags, const CSIdentityQueryClientContext * clientContext, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern void CSIdentityQueryStop(CSIdentityQueryRef query) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); #pragma pack(pop) } #pragma pack(push, 2) enum { kIconServices16PixelDataARGB = 'ic04', kIconServices32PixelDataARGB = 'ic05', kIconServices48PixelDataARGB = 'ic06', kIconServices128PixelDataARGB = 'ic07' }; enum { kIconServices256PixelDataARGB = 'ic08', kIconServices512PixelDataARGB = 'ic09', kIconServices1024PixelDataARGB = 'ic10', kThumbnail32BitData = 'it32', kThumbnail8BitMask = 't8mk' }; enum { kHuge1BitMask = 'ich#', kHuge4BitData = 'ich4', kHuge8BitData = 'ich8', kHuge32BitData = 'ih32', kHuge8BitMask = 'h8mk' }; enum { kLarge1BitMask = 'ICN#', kLarge4BitData = 'icl4', kLarge8BitData = 'icl8', kLarge32BitData = 'il32', kLarge8BitMask = 'l8mk', kSmall1BitMask = 'ics#', kSmall4BitData = 'ics4', kSmall8BitData = 'ics8', kSmall32BitData = 'is32', kSmall8BitMask = 's8mk', kMini1BitMask = 'icm#', kMini4BitData = 'icm4', kMini8BitData = 'icm8' }; enum { large1BitMask = kLarge1BitMask, large4BitData = kLarge4BitData, large8BitData = kLarge8BitData, small1BitMask = kSmall1BitMask, small4BitData = kSmall4BitData, small8BitData = kSmall8BitData, mini1BitMask = kMini1BitMask, mini4BitData = kMini4BitData, mini8BitData = kMini8BitData }; enum { kIconFamilyType = 'icns' }; struct IconFamilyElement { OSType elementType; SInt32 elementSize; unsigned char elementData[1]; }; typedef struct IconFamilyElement IconFamilyElement; struct IconFamilyResource { OSType resourceType; SInt32 resourceSize; IconFamilyElement elements[1]; }; typedef struct IconFamilyResource IconFamilyResource; typedef IconFamilyResource* IconFamilyPtr; typedef IconFamilyPtr* IconFamilyHandle; enum { kTileIconVariant = 'tile', kRolloverIconVariant = 'over', kDropIconVariant = 'drop', kOpenIconVariant = 'open', kOpenDropIconVariant = 'odrp' }; #pragma pack(pop) extern "C" { #pragma pack(push, 2) enum { kSleepRequest = 1, kSleepDemand = 2, kSleepWakeUp = 3, kSleepRevoke = 4, kSleepUnlock = 4, kSleepDeny = 5, kSleepNow = 6, kDozeDemand = 7, kDozeWakeUp = 8, kDozeRequest = 9, kEnterStandby = 10, kEnterRun = 11, kSuspendRequest = 12, kSuspendDemand = 13, kSuspendRevoke = 14, kSuspendWakeUp = 15, kGetPowerLevel = 16, kSetPowerLevel = 17, kDeviceInitiatedWake = 18, kWakeToDoze = 19, kDozeToFullWakeUp = 20, kGetPowerInfo = 21, kGetWakeOnNetInfo = 22, kSuspendWakeToDoze = 23, kEnterIdle = 24, kStillIdle = 25, kExitIdle = 26 }; enum { noCalls = 1, noRequest = 2, slpQType = 16, sleepQType = 16 }; enum { OverallAct = 0, UsrActivity = 1, NetActivity = 2, HDActivity = 3, IdleActivity = 4 }; typedef struct SleepQRec SleepQRec; typedef SleepQRec * SleepQRecPtr; typedef long ( * SleepQProcPtr)(long message, SleepQRecPtr qRecPtr); typedef SleepQProcPtr SleepQUPP; extern SleepQUPP NewSleepQUPP(SleepQProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeSleepQUPP(SleepQUPP userUPP) __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern long InvokeSleepQUPP( long message, SleepQRecPtr qRecPtr, SleepQUPP userUPP) __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline SleepQUPP NewSleepQUPP(SleepQProcPtr userRoutine) { return userRoutine; } inline void DisposeSleepQUPP(SleepQUPP) { } inline long InvokeSleepQUPP(long message, SleepQRecPtr qRecPtr, SleepQUPP userUPP) { return (*userUPP)(message, qRecPtr); } struct SleepQRec { SleepQRecPtr sleepQLink; short sleepQType; SleepQUPP sleepQProc; short sleepQFlags; }; extern long GetCPUSpeed(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void SleepQInstall(SleepQRecPtr qRecPtr) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void SleepQRemove(SleepQRecPtr qRecPtr) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern short MaximumProcessorSpeed(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern short MinimumProcessorSpeed(void) __attribute__((availability(macos,introduced=10.1,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern short CurrentProcessorSpeed(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern short BatteryCount(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr UpdateSystemActivity(UInt8 activity) __attribute__((availability(macos,introduced=10.0,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef SecKeychainRef KCRef; typedef SecKeychainItemRef KCItemRef; typedef SecKeychainSearchRef KCSearchRef; typedef SecKeychainAttribute KCAttribute; typedef SecKeychainAttributeList KCAttributeList; typedef SecKeychainAttrType KCAttrType; typedef SecKeychainStatus KCStatus; typedef UInt16 KCEvent; enum { kIdleKCEvent = 0, kLockKCEvent = 1, kUnlockKCEvent = 2, kAddKCEvent = 3, kDeleteKCEvent = 4, kUpdateKCEvent = 5, kPasswordChangedKCEvent = 6, kSystemKCEvent = 8, kDefaultChangedKCEvent = 9, kDataAccessKCEvent = 10, kKeychainListChangedKCEvent = 11 }; typedef UInt16 KCEventMask; enum { kIdleKCEventMask = 1 << kIdleKCEvent, kLockKCEventMask = 1 << kLockKCEvent, kUnlockKCEventMask = 1 << kUnlockKCEvent, kAddKCEventMask = 1 << kAddKCEvent, kDeleteKCEventMask = 1 << kDeleteKCEvent, kUpdateKCEventMask = 1 << kUpdateKCEvent, kPasswordChangedKCEventMask = 1 << kPasswordChangedKCEvent, kSystemEventKCEventMask = 1 << kSystemKCEvent, kDefaultChangedKCEventMask = 1 << kDefaultChangedKCEvent, kDataAccessKCEventMask = 1 << kDataAccessKCEvent, kEveryKCEventMask = 0xFFFF }; typedef UInt8 AFPServerSignature[16]; typedef UInt8 KCPublicKeyHash[20]; struct KCCallbackInfo { UInt32 version; KCItemRef item; SInt32 processID[2]; SInt32 event[4]; KCRef keychain; }; typedef struct KCCallbackInfo KCCallbackInfo; enum { kUnlockStateKCStatus = 1, kRdPermKCStatus = 2, kWrPermKCStatus = 4 }; enum { kCertificateKCItemClass = 'cert', kAppleSharePasswordKCItemClass = 'ashp', kInternetPasswordKCItemClass = 'inet', kGenericPasswordKCItemClass = 'genp' }; typedef FourCharCode KCItemClass; enum { kClassKCItemAttr = 'clas', kCreationDateKCItemAttr = 'cdat', kModDateKCItemAttr = 'mdat', kDescriptionKCItemAttr = 'desc', kCommentKCItemAttr = 'icmt', kCreatorKCItemAttr = 'crtr', kTypeKCItemAttr = 'type', kScriptCodeKCItemAttr = 'scrp', kLabelKCItemAttr = 'labl', kInvisibleKCItemAttr = 'invi', kNegativeKCItemAttr = 'nega', kCustomIconKCItemAttr = 'cusi', kAccountKCItemAttr = 'acct', kServiceKCItemAttr = 'svce', kGenericKCItemAttr = 'gena', kSecurityDomainKCItemAttr = 'sdmn', kServerKCItemAttr = 'srvr', kAuthTypeKCItemAttr = 'atyp', kPortKCItemAttr = 'port', kPathKCItemAttr = 'path', kVolumeKCItemAttr = 'vlme', kAddressKCItemAttr = 'addr', kSignatureKCItemAttr = 'ssig', kProtocolKCItemAttr = 'ptcl', kSubjectKCItemAttr = 'subj', kCommonNameKCItemAttr = 'cn ', kIssuerKCItemAttr = 'issu', kSerialNumberKCItemAttr = 'snbr', kEMailKCItemAttr = 'mail', kPublicKeyHashKCItemAttr = 'hpky', kIssuerURLKCItemAttr = 'iurl', kEncryptKCItemAttr = 'encr', kDecryptKCItemAttr = 'decr', kSignKCItemAttr = 'sign', kVerifyKCItemAttr = 'veri', kWrapKCItemAttr = 'wrap', kUnwrapKCItemAttr = 'unwr', kStartDateKCItemAttr = 'sdat', kEndDateKCItemAttr = 'edat' }; typedef FourCharCode KCItemAttr; enum { kKCAuthTypeNTLM = 'ntlm', kKCAuthTypeMSN = 'msna', kKCAuthTypeDPA = 'dpaa', kKCAuthTypeRPA = 'rpaa', kKCAuthTypeHTTPDigest = 'httd', kKCAuthTypeDefault = 'dflt' }; typedef FourCharCode KCAuthType; enum { kKCProtocolTypeFTP = 'ftp ', kKCProtocolTypeFTPAccount = 'ftpa', kKCProtocolTypeHTTP = 'http', kKCProtocolTypeIRC = 'irc ', kKCProtocolTypeNNTP = 'nntp', kKCProtocolTypePOP3 = 'pop3', kKCProtocolTypeSMTP = 'smtp', kKCProtocolTypeSOCKS = 'sox ', kKCProtocolTypeIMAP = 'imap', kKCProtocolTypeLDAP = 'ldap', kKCProtocolTypeAppleTalk = 'atlk', kKCProtocolTypeAFP = 'afp ', kKCProtocolTypeTelnet = 'teln' }; typedef FourCharCode KCProtocolType; typedef UInt32 KCCertAddOptions; enum { kSecOptionReserved = 0x000000FF, kCertUsageShift = 8, kCertUsageSigningAdd = 1 << (kCertUsageShift + 0), kCertUsageSigningAskAndAdd = 1 << (kCertUsageShift + 1), kCertUsageVerifyAdd = 1 << (kCertUsageShift + 2), kCertUsageVerifyAskAndAdd = 1 << (kCertUsageShift + 3), kCertUsageEncryptAdd = 1 << (kCertUsageShift + 4), kCertUsageEncryptAskAndAdd = 1 << (kCertUsageShift + 5), kCertUsageDecryptAdd = 1 << (kCertUsageShift + 6), kCertUsageDecryptAskAndAdd = 1 << (kCertUsageShift + 7), kCertUsageKeyExchAdd = 1 << (kCertUsageShift + 8), kCertUsageKeyExchAskAndAdd = 1 << (kCertUsageShift + 9), kCertUsageRootAdd = 1 << (kCertUsageShift + 10), kCertUsageRootAskAndAdd = 1 << (kCertUsageShift + 11), kCertUsageSSLAdd = 1 << (kCertUsageShift + 12), kCertUsageSSLAskAndAdd = 1 << (kCertUsageShift + 13), kCertUsageAllAdd = 0x7FFFFF00 }; typedef UInt16 KCVerifyStopOn; enum { kPolicyKCStopOn = 0, kNoneKCStopOn = 1, kFirstPassKCStopOn = 2, kFirstFailKCStopOn = 3 }; typedef UInt32 KCCertSearchOptions; enum { kCertSearchShift = 0, kCertSearchSigningIgnored = 0, kCertSearchSigningAllowed = 1 << (kCertSearchShift + 0), kCertSearchSigningDisallowed = 1 << (kCertSearchShift + 1), kCertSearchSigningMask = ((kCertSearchSigningAllowed) | (kCertSearchSigningDisallowed)), kCertSearchVerifyIgnored = 0, kCertSearchVerifyAllowed = 1 << (kCertSearchShift + 2), kCertSearchVerifyDisallowed = 1 << (kCertSearchShift + 3), kCertSearchVerifyMask = ((kCertSearchVerifyAllowed) | (kCertSearchVerifyDisallowed)), kCertSearchEncryptIgnored = 0, kCertSearchEncryptAllowed = 1 << (kCertSearchShift + 4), kCertSearchEncryptDisallowed = 1 << (kCertSearchShift + 5), kCertSearchEncryptMask = ((kCertSearchEncryptAllowed) | (kCertSearchEncryptDisallowed)), kCertSearchDecryptIgnored = 0, kCertSearchDecryptAllowed = 1 << (kCertSearchShift + 6), kCertSearchDecryptDisallowed = 1 << (kCertSearchShift + 7), kCertSearchDecryptMask = ((kCertSearchDecryptAllowed) | (kCertSearchDecryptDisallowed)), kCertSearchWrapIgnored = 0, kCertSearchWrapAllowed = 1 << (kCertSearchShift + 8), kCertSearchWrapDisallowed = 1 << (kCertSearchShift + 9), kCertSearchWrapMask = ((kCertSearchWrapAllowed) | (kCertSearchWrapDisallowed)), kCertSearchUnwrapIgnored = 0, kCertSearchUnwrapAllowed = 1 << (kCertSearchShift + 10), kCertSearchUnwrapDisallowed = 1 << (kCertSearchShift + 11), kCertSearchUnwrapMask = ((kCertSearchUnwrapAllowed) | (kCertSearchUnwrapDisallowed)), kCertSearchPrivKeyRequired = 1 << (kCertSearchShift + 12), kCertSearchAny = 0 }; enum { kAnyPort = 0 }; enum { kAnyProtocol = 0, kAnyAuthType = 0 }; extern OSStatus KCGetKeychainManagerVersion(UInt32 * returnVers) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline Boolean KeychainManagerAvailable() { return true; } extern OSStatus KCSetInteractionAllowed(Boolean state) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean KCIsInteractionAllowed(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCMakeKCRefFromFSRef( FSRef * keychainFSRef, KCRef * keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCMakeKCRefFromAlias( AliasHandle keychainAlias, KCRef * keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCMakeAliasFromKCRef( KCRef keychain, AliasHandle * keychainAlias) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCReleaseKeychain(KCRef * keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetDefaultKeychain(KCRef * keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCSetDefaultKeychain(KCRef keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetStatus( KCRef keychain, UInt32 * keychainStatus) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetKeychain( KCItemRef item, KCRef * keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetKeychainName( KCRef keychain, StringPtr keychainName) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern UInt16 KCCountKeychains(void) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetIndKeychain( UInt16 index, KCRef * keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef OSStatus ( * KCCallbackProcPtr)(KCEvent keychainEvent, KCCallbackInfo *info, void *userContext); typedef KCCallbackProcPtr KCCallbackUPP; extern KCCallbackUPP NewKCCallbackUPP(KCCallbackProcPtr userRoutine) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void DisposeKCCallbackUPP(KCCallbackUPP userUPP) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus InvokeKCCallbackUPP( KCEvent keychainEvent, KCCallbackInfo * info, void * userContext, KCCallbackUPP userUPP) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); inline KCCallbackUPP NewKCCallbackUPP(KCCallbackProcPtr userRoutine) { return userRoutine; } inline void DisposeKCCallbackUPP(KCCallbackUPP) { } inline OSStatus InvokeKCCallbackUPP(KCEvent keychainEvent, KCCallbackInfo * info, void * userContext, KCCallbackUPP userUPP) { return (*userUPP)(keychainEvent, info, userContext); } extern OSStatus KCFindAppleSharePassword( AFPServerSignature * serverSignature, ConstStringPtr serverAddress, ConstStringPtr serverName, ConstStringPtr volumeName, ConstStringPtr accountName, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCFindInternetPassword( ConstStringPtr serverName, ConstStringPtr securityDomain, ConstStringPtr accountName, UInt16 port, OSType protocol, OSType authType, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCFindInternetPasswordWithPath( ConstStringPtr serverName, ConstStringPtr securityDomain, ConstStringPtr accountName, ConstStringPtr path, UInt16 port, OSType protocol, OSType authType, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCFindGenericPassword( ConstStringPtr serviceName, ConstStringPtr accountName, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCAddCallback( KCCallbackUPP callbackProc, KCEventMask eventMask, void * userContext) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCRemoveCallback(KCCallbackUPP callbackProc) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCNewItem( KCItemClass itemClass, OSType itemCreator, UInt32 length, const void * data, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCSetAttribute( KCItemRef item, KCAttribute * attr) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetAttribute( KCItemRef item, KCAttribute * attr, UInt32 * actualLength) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCSetData( KCItemRef item, UInt32 length, const void * data) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCUpdateItem(KCItemRef item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCReleaseItem(KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCCopyItem( KCItemRef item, KCRef destKeychain, KCItemRef * copy) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCFindFirstItem( KCRef keychain, const KCAttributeList * attrList, KCSearchRef * search, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCFindNextItem( KCSearchRef search, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCReleaseSearch(KCSearchRef * search) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCDeleteItem(KCItemRef item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCGetData( KCItemRef item, UInt32 maxLength, void * data, UInt32 * actualLength) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus KCLock(KCRef keychain) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus kcgetkeychainname( KCRef keychain, char * keychainName) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus kcfindapplesharepassword( AFPServerSignature * serverSignature, const char * serverAddress, const char * serverName, const char * volumeName, const char * accountName, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus kcfindinternetpassword( const char * serverName, const char * securityDomain, const char * accountName, UInt16 port, OSType protocol, OSType authType, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus kcfindinternetpasswordwithpath( const char * serverName, const char * securityDomain, const char * accountName, const char * path, UInt16 port, OSType protocol, OSType authType, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus kcfindgenericpassword( const char * serviceName, const char * accountName, UInt32 maxLength, void * passwordData, UInt32 * actualLength, KCItemRef * item) __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) enum { errWSInternalError = -65793L, errWSTransportError = -65794L, errWSParseError = -65795L, errWSTimeoutError = -65796L }; enum WSTypeID { eWSUnknownType = 0, eWSNullType = 1, eWSBooleanType = 2, eWSIntegerType = 3, eWSDoubleType = 4, eWSStringType = 5, eWSDateType = 6, eWSDataType = 7, eWSArrayType = 8, eWSDictionaryType = 9 }; typedef enum WSTypeID WSTypeID; typedef void *(*WSClientContextRetainCallBackProcPtr)(void * info) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef void (*WSClientContextReleaseCallBackProcPtr)(void * info) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef CFStringRef (*WSClientContextCopyDescriptionCallBackProcPtr)(void * info) __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); struct __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) WSClientContext { CFIndex version; void * info; WSClientContextRetainCallBackProcPtr retain; WSClientContextReleaseCallBackProcPtr release; WSClientContextCopyDescriptionCallBackProcPtr copyDescription; }; typedef struct WSClientContext WSClientContext __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSXMLRPCProtocol __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAP1999Protocol __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAP2001Protocol __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern WSTypeID WSGetWSTypeIDFromCFType(CFTypeRef ref) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeID WSGetCFTypeIDFromWSTypeID(WSTypeID typeID) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } extern "C" { extern CFStringRef kWSMethodInvocationResult __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSFaultString __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSFaultCode __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSFaultExtra __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSNetworkStreamFaultString __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSStreamErrorMessage __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSStreamErrorDomain __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSStreamErrorError __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSHTTPMessage __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSHTTPResponseMessage __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSHTTPExtraHeaders __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSHTTPVersion __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSHTTPProxy __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSHTTPFollowsRedirects __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSDebugOutgoingHeaders __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSDebugOutgoingBody __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSDebugIncomingHeaders __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSDebugIncomingBody __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAPBodyEncodingStyle __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAPMethodNamespaceURI __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAPStyleDoc __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAPStyleRPC __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSSOAPMessageHeaders __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSRecordParameterOrder __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSRecordNamespaceURI __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSRecordType __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSMethodInvocationResultParameterName __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kWSMethodInvocationTimeoutValue __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { typedef struct OpaqueWSMethodInvocationRef* WSMethodInvocationRef; extern CFTypeID WSMethodInvocationGetTypeID(void) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern WSMethodInvocationRef WSMethodInvocationCreate( CFURLRef url, CFStringRef methodName, CFStringRef protocol) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern WSMethodInvocationRef WSMethodInvocationCreateFromSerialization(CFDataRef contract) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDataRef WSMethodInvocationCopySerialization(WSMethodInvocationRef invocation) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationSetParameters( WSMethodInvocationRef invocation, CFDictionaryRef parameters, CFArrayRef parameterOrder) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDictionaryRef WSMethodInvocationCopyParameters( WSMethodInvocationRef invocation, CFArrayRef * parameterOrder) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationSetProperty( WSMethodInvocationRef invocation, CFStringRef propertyName, CFTypeRef propertyValue) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeRef WSMethodInvocationCopyProperty( WSMethodInvocationRef invocation, CFStringRef propertyName) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern __attribute__((cf_returns_retained)) CFDictionaryRef WSMethodInvocationInvoke(WSMethodInvocationRef invocation) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef void(*WSMethodInvocationCallBackProcPtr)(WSMethodInvocationRef invocation, void *info, CFDictionaryRef outRef) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationSetCallBack( WSMethodInvocationRef invocation, WSMethodInvocationCallBackProcPtr clientCB, WSClientContext * context) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationScheduleWithRunLoop( WSMethodInvocationRef invocation, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationUnscheduleFromRunLoop( WSMethodInvocationRef invocation, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean WSMethodResultIsFault(CFDictionaryRef methodResult) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef CFStringRef(*WSMethodInvocationSerializationProcPtr)(WSMethodInvocationRef invocation, CFTypeRef obj, void *info) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationAddSerializationOverride( WSMethodInvocationRef invocation, CFTypeID objType, WSMethodInvocationSerializationProcPtr serializationProc, WSClientContext * context) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef CFTypeRef(*WSMethodInvocationDeserializationProcPtr)(WSMethodInvocationRef invocation, CFXMLTreeRef msgRoot, CFXMLTreeRef deserializeRoot, void *info) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSMethodInvocationAddDeserializationOverride( WSMethodInvocationRef invocation, CFStringRef typeNamespace, CFStringRef typeName, WSMethodInvocationDeserializationProcPtr deserializationProc, WSClientContext * context) __attribute__((availability(macos,introduced=10.2,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { typedef struct OpaqueWSProtocolHandlerRef* WSProtocolHandlerRef; extern CFTypeID WSProtocolHandlerGetTypeID(void) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern WSProtocolHandlerRef WSProtocolHandlerCreate( CFAllocatorRef allocator, CFStringRef protocol) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDictionaryRef WSProtocolHandlerCopyRequestDictionary( WSProtocolHandlerRef ref, CFDataRef data) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDictionaryRef WSProtocolHandlerCopyReplyDictionary( WSProtocolHandlerRef ref, CFStringRef methodName, CFDataRef data) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDataRef WSProtocolHandlerCopyReplyDocument( WSProtocolHandlerRef ref, CFDictionaryRef methodContext, CFTypeRef resultValue) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDataRef WSProtocolHandlerCopyFaultDocument( WSProtocolHandlerRef ref, CFDictionaryRef methodContext, CFDictionaryRef faultDict) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDataRef WSProtocolHandlerCopyRequestDocument( WSProtocolHandlerRef ref, CFStringRef methodName, CFDictionaryRef methodParams, CFArrayRef methodParamOrder, CFDictionaryRef methodExtras) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeRef WSProtocolHandlerCopyProperty( WSProtocolHandlerRef ref, CFStringRef propertyName) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSProtocolHandlerSetProperty( WSProtocolHandlerRef ref, CFStringRef propertyName, CFTypeRef propertyValue) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef CFStringRef(*WSProtocolHandlerSerializationProcPtr)(WSProtocolHandlerRef protocol, CFTypeRef obj, void *info)__attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSProtocolHandlerSetSerializationOverride( WSProtocolHandlerRef protocol, CFTypeID objType, WSProtocolHandlerSerializationProcPtr serializationProc, WSClientContext * context) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef CFTypeRef(*WSProtocolHandlerDeserializationProcPtr)(WSProtocolHandlerRef protocol, CFXMLTreeRef msgRoot, CFXMLTreeRef deserializeRoot, void *info)__attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void WSProtocolHandlerSetDeserializationOverride( WSProtocolHandlerRef protocol, CFStringRef typeNamespace, CFStringRef typeName, WSProtocolHandlerDeserializationProcPtr deserializationProc, WSClientContext * context) __attribute__((availability(macos,introduced=10.3,deprecated=10.8,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { enum { kGenericDocumentIconResource = -4000, kGenericStationeryIconResource = -3985, kGenericEditionFileIconResource = -3989, kGenericApplicationIconResource = -3996, kGenericDeskAccessoryIconResource = -3991, kGenericFolderIconResource = -3999, kPrivateFolderIconResource = -3994, kFloppyIconResource = -3998, kTrashIconResource = -3993, kGenericRAMDiskIconResource = -3988, kGenericCDROMIconResource = -3987 }; enum { kDesktopIconResource = -3992, kOpenFolderIconResource = -3997, kGenericHardDiskIconResource = -3995, kGenericFileServerIconResource = -3972, kGenericSuitcaseIconResource = -3970, kGenericMoverObjectIconResource = -3969 }; enum { kGenericPreferencesIconResource = -3971, kGenericQueryDocumentIconResource = -16506, kGenericExtensionIconResource = -16415, kSystemFolderIconResource = -3983, kHelpIconResource = -20271, kAppleMenuFolderIconResource = -3982 }; enum { genericDocumentIconResource = kGenericDocumentIconResource, genericStationeryIconResource = kGenericStationeryIconResource, genericEditionFileIconResource = kGenericEditionFileIconResource, genericApplicationIconResource = kGenericApplicationIconResource, genericDeskAccessoryIconResource = kGenericDeskAccessoryIconResource, genericFolderIconResource = kGenericFolderIconResource, privateFolderIconResource = kPrivateFolderIconResource, floppyIconResource = kFloppyIconResource, trashIconResource = kTrashIconResource, genericRAMDiskIconResource = kGenericRAMDiskIconResource, genericCDROMIconResource = kGenericCDROMIconResource, desktopIconResource = kDesktopIconResource, openFolderIconResource = kOpenFolderIconResource, genericHardDiskIconResource = kGenericHardDiskIconResource, genericFileServerIconResource = kGenericFileServerIconResource, genericSuitcaseIconResource = kGenericSuitcaseIconResource, genericMoverObjectIconResource = kGenericMoverObjectIconResource, genericPreferencesIconResource = kGenericPreferencesIconResource, genericQueryDocumentIconResource = kGenericQueryDocumentIconResource, genericExtensionIconResource = kGenericExtensionIconResource, systemFolderIconResource = kSystemFolderIconResource, appleMenuFolderIconResource = kAppleMenuFolderIconResource }; enum { kStartupFolderIconResource = -3981, kOwnedFolderIconResource = -3980, kDropFolderIconResource = -3979, kSharedFolderIconResource = -3978, kMountedFolderIconResource = -3977, kControlPanelFolderIconResource = -3976, kPrintMonitorFolderIconResource = -3975, kPreferencesFolderIconResource = -3974, kExtensionsFolderIconResource = -3973, kFontsFolderIconResource = -3968, kFullTrashIconResource = -3984 }; enum { startupFolderIconResource = kStartupFolderIconResource, ownedFolderIconResource = kOwnedFolderIconResource, dropFolderIconResource = kDropFolderIconResource, sharedFolderIconResource = kSharedFolderIconResource, mountedFolderIconResource = kMountedFolderIconResource, controlPanelFolderIconResource = kControlPanelFolderIconResource, printMonitorFolderIconResource = kPrintMonitorFolderIconResource, preferencesFolderIconResource = kPreferencesFolderIconResource, extensionsFolderIconResource = kExtensionsFolderIconResource, fontsFolderIconResource = kFontsFolderIconResource, fullTrashIconResource = kFullTrashIconResource }; typedef struct OpaqueIconRef* IconRef; enum { kSystemIconsCreator = 'macs' }; enum { kClipboardIcon = 'CLIP', kClippingUnknownTypeIcon = 'clpu', kClippingPictureTypeIcon = 'clpp', kClippingTextTypeIcon = 'clpt', kClippingSoundTypeIcon = 'clps', kDesktopIcon = 'desk', kFinderIcon = 'FNDR', kComputerIcon = 'root', kFontSuitcaseIcon = 'FFIL', kFullTrashIcon = 'ftrh', kGenericApplicationIcon = 'APPL', kGenericCDROMIcon = 'cddr', kGenericControlPanelIcon = 'APPC', kGenericControlStripModuleIcon = 'sdev', kGenericComponentIcon = 'thng', kGenericDeskAccessoryIcon = 'APPD', kGenericDocumentIcon = 'docu', kGenericEditionFileIcon = 'edtf', kGenericExtensionIcon = 'INIT', kGenericFileServerIcon = 'srvr', kGenericFontIcon = 'ffil', kGenericFontScalerIcon = 'sclr', kGenericFloppyIcon = 'flpy', kGenericHardDiskIcon = 'hdsk', kGenericIDiskIcon = 'idsk', kGenericRemovableMediaIcon = 'rmov', kGenericMoverObjectIcon = 'movr', kGenericPCCardIcon = 'pcmc', kGenericPreferencesIcon = 'pref', kGenericQueryDocumentIcon = 'qery', kGenericRAMDiskIcon = 'ramd', kGenericSharedLibaryIcon = 'shlb', kGenericStationeryIcon = 'sdoc', kGenericSuitcaseIcon = 'suit', kGenericURLIcon = 'gurl', kGenericWORMIcon = 'worm', kInternationalResourcesIcon = 'ifil', kKeyboardLayoutIcon = 'kfil', kSoundFileIcon = 'sfil', kSystemSuitcaseIcon = 'zsys', kTrashIcon = 'trsh', kTrueTypeFontIcon = 'tfil', kTrueTypeFlatFontIcon = 'sfnt', kTrueTypeMultiFlatFontIcon = 'ttcf', kUserIDiskIcon = 'udsk', kUnknownFSObjectIcon = 'unfs', kInternationResourcesIcon = kInternationalResourcesIcon }; enum { kInternetLocationHTTPIcon = 'ilht', kInternetLocationFTPIcon = 'ilft', kInternetLocationAppleShareIcon = 'ilaf', kInternetLocationAppleTalkZoneIcon = 'ilat', kInternetLocationFileIcon = 'ilfi', kInternetLocationMailIcon = 'ilma', kInternetLocationNewsIcon = 'ilnw', kInternetLocationNSLNeighborhoodIcon = 'ilns', kInternetLocationGenericIcon = 'ilge' }; enum { kGenericFolderIcon = 'fldr', kDropFolderIcon = 'dbox', kMountedFolderIcon = 'mntd', kOpenFolderIcon = 'ofld', kOwnedFolderIcon = 'ownd', kPrivateFolderIcon = 'prvf', kSharedFolderIcon = 'shfl' }; enum { kSharingPrivsNotApplicableIcon = 'shna', kSharingPrivsReadOnlyIcon = 'shro', kSharingPrivsReadWriteIcon = 'shrw', kSharingPrivsUnknownIcon = 'shuk', kSharingPrivsWritableIcon = 'writ' }; enum { kUserFolderIcon = 'ufld', kWorkgroupFolderIcon = 'wfld', kGuestUserIcon = 'gusr', kUserIcon = 'user', kOwnerIcon = 'susr', kGroupIcon = 'grup' }; enum { kAppearanceFolderIcon = 'appr', kAppleExtrasFolderIcon = 0x616578C4 , kAppleMenuFolderIcon = 'amnu', kApplicationsFolderIcon = 'apps', kApplicationSupportFolderIcon = 'asup', kAssistantsFolderIcon = 0x617374C4 , kColorSyncFolderIcon = 'prof', kContextualMenuItemsFolderIcon = 'cmnu', kControlPanelDisabledFolderIcon = 'ctrD', kControlPanelFolderIcon = 'ctrl', kControlStripModulesFolderIcon = 0x736476C4 , kDocumentsFolderIcon = 'docs', kExtensionsDisabledFolderIcon = 'extD', kExtensionsFolderIcon = 'extn', kFavoritesFolderIcon = 'favs', kFontsFolderIcon = 'font', kHelpFolderIcon = (int)0xC4686C70 , kInternetFolderIcon = 0x696E74C4 , kInternetPlugInFolderIcon = (int)0xC46E6574 , kInternetSearchSitesFolderIcon = 'issf', kLocalesFolderIcon = (int)0xC46C6F63 , kMacOSReadMeFolderIcon = 0x6D6F72C4 , kPublicFolderIcon = 'pubf', kPreferencesFolderIcon = 0x707266C4 , kPrinterDescriptionFolderIcon = 'ppdf', kPrinterDriverFolderIcon = (int)0xC4707264 , kPrintMonitorFolderIcon = 'prnt', kRecentApplicationsFolderIcon = 'rapp', kRecentDocumentsFolderIcon = 'rdoc', kRecentServersFolderIcon = 'rsrv', kScriptingAdditionsFolderIcon = (int)0xC4736372 , kSharedLibrariesFolderIcon = (int)0xC46C6962 , kScriptsFolderIcon = 0x736372C4 , kShutdownItemsDisabledFolderIcon = 'shdD', kShutdownItemsFolderIcon = 'shdf', kSpeakableItemsFolder = 'spki', kStartupItemsDisabledFolderIcon = 'strD', kStartupItemsFolderIcon = 'strt', kSystemExtensionDisabledFolderIcon = 'macD', kSystemFolderIcon = 'macs', kTextEncodingsFolderIcon = (int)0xC4746578 , kUsersFolderIcon = 0x757372C4 , kUtilitiesFolderIcon = 0x757469C4 , kVoicesFolderIcon = 'fvoc' }; enum { kAppleScriptBadgeIcon = 'scrp', kLockedBadgeIcon = 'lbdg', kMountedBadgeIcon = 'mbdg', kSharedBadgeIcon = 'sbdg', kAliasBadgeIcon = 'abdg', kAlertCautionBadgeIcon = 'cbdg' }; enum { kAlertNoteIcon = 'note', kAlertCautionIcon = 'caut', kAlertStopIcon = 'stop' }; enum { kAppleTalkIcon = 'atlk', kAppleTalkZoneIcon = 'atzn', kAFPServerIcon = 'afps', kFTPServerIcon = 'ftps', kHTTPServerIcon = 'htps', kGenericNetworkIcon = 'gnet', kIPFileServerIcon = 'isrv' }; enum { kToolbarCustomizeIcon = 'tcus', kToolbarDeleteIcon = 'tdel', kToolbarFavoritesIcon = 'tfav', kToolbarHomeIcon = 'thom', kToolbarAdvancedIcon = 'tbav', kToolbarInfoIcon = 'tbin', kToolbarLabelsIcon = 'tblb', kToolbarApplicationsFolderIcon = 'tAps', kToolbarDocumentsFolderIcon = 'tDoc', kToolbarMovieFolderIcon = 'tMov', kToolbarMusicFolderIcon = 'tMus', kToolbarPicturesFolderIcon = 'tPic', kToolbarPublicFolderIcon = 'tPub', kToolbarDesktopFolderIcon = 'tDsk', kToolbarDownloadsFolderIcon = 'tDwn', kToolbarLibraryFolderIcon = 'tLib', kToolbarUtilitiesFolderIcon = 'tUtl', kToolbarSitesFolderIcon = 'tSts' }; enum { kAppleLogoIcon = 'capl', kAppleMenuIcon = 'sapl', kBackwardArrowIcon = 'baro', kFavoriteItemsIcon = 'favr', kForwardArrowIcon = 'faro', kGridIcon = 'grid', kHelpIcon = 'help', kKeepArrangedIcon = 'arng', kLockedIcon = 'lock', kNoFilesIcon = 'nfil', kNoFolderIcon = 'nfld', kNoWriteIcon = 'nwrt', kProtectedApplicationFolderIcon = 'papp', kProtectedSystemFolderIcon = 'psys', kRecentItemsIcon = 'rcnt', kShortcutIcon = 'shrt', kSortAscendingIcon = 'asnd', kSortDescendingIcon = 'dsnd', kUnlockedIcon = 'ulck', kConnectToIcon = 'cnct', kGenericWindowIcon = 'gwin', kQuestionMarkIcon = 'ques', kDeleteAliasIcon = 'dali', kEjectMediaIcon = 'ejec', kBurningIcon = 'burn', kRightContainerArrowIcon = 'rcar' }; typedef UInt32 IconServicesUsageFlags; enum { kIconServicesNormalUsageFlag = 0x00000000, kIconServicesNoBadgeFlag = 0x00000001, kIconServicesUpdateIfNeededFlag = 0x00000002 }; enum { kIconServicesCatalogInfoMask = (kFSCatInfoNodeID | kFSCatInfoParentDirID | kFSCatInfoVolume | kFSCatInfoNodeFlags | kFSCatInfoFinderInfo | kFSCatInfoFinderXInfo | kFSCatInfoUserAccess | kFSCatInfoPermissions | kFSCatInfoContentMod) }; extern OSErr GetIconRefOwners( IconRef theIconRef, UInt16 * owners) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr AcquireIconRef(IconRef theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr ReleaseIconRef(IconRef theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr GetIconRef( SInt16 vRefNum, OSType creator, OSType iconType, IconRef * theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="Use -[NSWorkspace iconForFile:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr GetIconRefFromFolder( SInt16 vRefNum, SInt32 parentFolderID, SInt32 folderID, SInt8 attributes, SInt8 accessPrivileges, IconRef * theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="Use -[NSWorkspace iconForFile:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus GetIconRefFromFileInfo( const FSRef * inRef, UniCharCount inFileNameLength, const UniChar * inFileName, FSCatalogInfoBitmap inWhichInfo, const FSCatalogInfo * inCatalogInfo, IconServicesUsageFlags inUsageFlags, IconRef * outIconRef, SInt16 * outLabel) __attribute__((availability(macos,introduced=10.1,deprecated=10.13,message="Use -[NSWorkspace iconForFile:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr GetIconRefFromTypeInfo( OSType inCreator, OSType inType, CFStringRef inExtension, CFStringRef inMIMEType, IconServicesUsageFlags inUsageFlags, IconRef * outIconRef) __attribute__((availability(macos,introduced=10.3,deprecated=10.15,message="Use -[NSWorkspace iconForFileType:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus GetIconRefFromIconFamilyPtr( const IconFamilyResource * inIconFamilyPtr, Size inSize, IconRef * outIconRef) __attribute__((availability(macos,introduced=10.3,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus GetIconRefFromComponent( Component inComponent, IconRef * outIconRef) __attribute__((availability(macos,introduced=10.5,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr RegisterIconRefFromIconFamily( OSType creator, OSType iconType, IconFamilyHandle iconFamily, IconRef * theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus RegisterIconRefFromFSRef( OSType creator, OSType iconType, const FSRef * iconFile, IconRef * theIconRef) __attribute__((availability(macos,introduced=10.1,deprecated=10.13,message="You do not need to register .icns files to use them with -[NSImage initWithContentsOfURL:]."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr UnregisterIconRef( OSType creator, OSType iconType) __attribute__((availability(macos,introduced=10.0,deprecated=10.13,message="You do not need to unregister icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr UpdateIconRef(IconRef theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr OverrideIconRef( IconRef oldIconRef, IconRef newIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr RemoveIconRefOverride(IconRef theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr CompositeIconRef( IconRef backgroundIconRef, IconRef foregroundIconRef, IconRef * compositeIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="Use NSImage or Core Graphics to composite images."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr IsIconRefComposite( IconRef compositeIconRef, IconRef * backgroundIconRef, IconRef * foregroundIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="Use NSImage or Core Graphics to composite images."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean IsValidIconRef(IconRef theIconRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean IsDataAvailableInIconRef( OSType inIconKind, IconRef inIconRef) __attribute__((availability(macos,introduced=10.3,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr SetCustomIconsEnabled( SInt16 vRefNum, Boolean enableCustomIcons) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSErr GetCustomIconsEnabled( SInt16 vRefNum, Boolean * customIconsEnabled) __attribute__((availability(macos,introduced=10.0,deprecated=10.15,message="This function is no longer supported. Use NSWorkspace and NSImage to get icons."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus ReadIconFromFSRef( const FSRef * ref, IconFamilyHandle * iconFamily) __attribute__((availability(macos,introduced=10.1,deprecated=10.13,message="Use -[NSWorkspace iconForFile:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { #pragma pack(push, 2) #pragma clang assume_nonnull begin enum { kLSNo32BitEnvironmentErr = -10386, kLSAppInTrashErr = -10660, kLSExecutableIncorrectFormat = -10661, kLSAttributeNotFoundErr = -10662, kLSAttributeNotSettableErr = -10663, kLSIncompatibleApplicationVersionErr = -10664, kLSNoRosettaEnvironmentErr = -10665, kLSGarbageCollectionUnsupportedErr = -10666, kLSUnknownErr = -10810, kLSNotAnApplicationErr = -10811, kLSNotInitializedErr = -10812, kLSDataUnavailableErr = -10813, kLSApplicationNotFoundErr = -10814, kLSUnknownTypeErr = -10815, kLSDataTooOldErr = -10816, kLSDataErr = -10817, kLSLaunchInProgressErr = -10818, kLSNotRegisteredErr = -10819, kLSAppDoesNotClaimTypeErr = -10820, kLSAppDoesNotSupportSchemeWarning = -10821, kLSServerCommunicationErr = -10822, kLSCannotSetInfoErr = -10823, kLSNoRegistrationInfoErr = -10824, kLSIncompatibleSystemVersionErr = -10825, kLSNoLaunchPermissionErr = -10826, kLSNoExecutableErr = -10827, kLSNoClassicEnvironmentErr = -10828, kLSMultipleSessionsNotSupportedErr = -10829, }; typedef OptionBits LSRolesMask; enum { kLSRolesNone = 0x00000001, kLSRolesViewer = 0x00000002, kLSRolesEditor = 0x00000004, kLSRolesShell = 0x00000008, kLSRolesAll = (UInt32)0xFFFFFFFF }; enum { kLSUnknownType = 0, kLSUnknownCreator = 0 }; typedef OptionBits LSAcceptanceFlags; enum { kLSAcceptDefault = 0x00000001, kLSAcceptAllowLoginUI = 0x00000002 }; extern _Nullable CFURLRef LSCopyDefaultApplicationURLForURL( CFURLRef inURL, LSRolesMask inRoleMask, _Nullable CFErrorRef *_Nullable outError) __attribute__((availability(macos,introduced=10.10,deprecated=100000,message="Use -[NSWorkspace URLForApplicationToOpenURL:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern _Nullable CFURLRef LSCopyDefaultApplicationURLForContentType( CFStringRef inContentType, LSRolesMask inRoleMask, _Nullable CFErrorRef *_Nullable outError) __attribute__((availability(macos,introduced=10.10,deprecated=100000,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern _Nullable CFArrayRef LSCopyApplicationURLsForBundleIdentifier( CFStringRef inBundleIdentifier, _Nullable CFErrorRef *_Nullable outError) __attribute__((availability(macos,introduced=10.10,deprecated=100000,message="Use -[NSWorkspace URLsForApplicationsWithBundleIdentifier:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern _Nullable CFArrayRef LSCopyApplicationURLsForURL( CFURLRef inURL, LSRolesMask inRoleMask) __attribute__((availability(macos,introduced=10.3,deprecated=100000,message="Use -[NSWorkspace URLsForApplicationsToOpenURL:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCanURLAcceptURL( CFURLRef inItemURL, CFURLRef inTargetURL, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags, Boolean * outAcceptsItem) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSRegisterURL( CFURLRef inURL, Boolean inUpdate) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern _Nullable CFStringRef LSCopyDefaultRoleHandlerForContentType( CFStringRef inContentType, LSRolesMask inRole) __attribute__((availability(ios,introduced=4.0,deprecated=100000,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=100000,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))); extern _Nullable CFArrayRef LSCopyAllRoleHandlersForContentType( CFStringRef inContentType, LSRolesMask inRole) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use -[NSWorkspace URLsForApplicationsToOpenContentType:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSetDefaultRoleHandlerForContentType( CFStringRef inContentType, LSRolesMask inRole, CFStringRef inHandlerBundleID) __attribute__((availability(ios,introduced=4.0,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenContentType:completionHandler:] instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenContentType:completionHandler:] instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenContentType:completionHandler:] instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenContentType:completionHandler:] instead."))); extern _Nullable CFStringRef LSCopyDefaultHandlerForURLScheme(CFStringRef inURLScheme) __attribute__((availability(macos,introduced=10.4,deprecated=10.15,message="Use -[NSWorkspace URLForApplicationToOpenURL:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern _Nullable CFArrayRef LSCopyAllHandlersForURLScheme(CFStringRef inURLScheme) __attribute__((availability(macos,introduced=10.4,deprecated=10.15,message="Use -[NSWorkspace URLsForApplicationsToOpenURL:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern OSStatus LSSetDefaultHandlerForURLScheme( CFStringRef inURLScheme, CFStringRef inHandlerBundleID) __attribute__((availability(ios,introduced=4.0,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:] instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:] instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:] instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=100000,message="Use -[NSWorkspace setDefaultApplicationAtURL:toOpenURLsWithScheme:completionHandler:] instead."))); #pragma clang assume_nonnull end #pragma pack(pop) } extern "C" { #pragma pack(push, 2) typedef OptionBits LSRequestedInfo; enum { kLSRequestExtension __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyPathExtension(), -[NSURL pathExtension], or -[NSString pathExtension] instead."))) = 0x00000001, kLSRequestTypeCreator __attribute__((availability(macosx,deprecated=10.11,message="Creator codes are deprecated on OS X."))) = 0x00000002, kLSRequestBasicFlagsOnly __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) = 0x00000004, kLSRequestAppTypeFlags __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) = 0x00000008, kLSRequestAllFlags __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) = 0x00000010, kLSRequestIconAndKind __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) = 0x00000020, kLSRequestExtensionFlagsOnly __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) = 0x00000040, kLSRequestAllInfo __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) = (UInt32)0xFFFFFFFF }; typedef OptionBits LSItemInfoFlags; enum { kLSItemInfoIsPlainFile __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsRegularFileKey or NSURLIsRegularFileKey instead."))) = 0x00000001, kLSItemInfoIsPackage __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsPackageKey or NSURLIsPackageKey instead."))) = 0x00000002, kLSItemInfoIsApplication __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsApplicationKey or NSURLIsApplicationKey instead."))) = 0x00000004, kLSItemInfoIsContainer __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsDirectoryKey or NSURLIsDirectoryKey instead."))) = 0x00000008, kLSItemInfoIsAliasFile __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsAliasFileKey or NSURLIsAliasFileKey instead."))) = 0x00000010, kLSItemInfoIsSymlink __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsSymbolicLinkKey or NSURLIsSymbolicLinkKey."))) = 0x00000020, kLSItemInfoIsInvisible __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsHiddenKey or NSURLIsHiddenKey instead."))) = 0x00000040, kLSItemInfoIsNativeApp __attribute__((availability(macosx,deprecated=10.11,message="The Classic environment is no longer supported."))) = 0x00000080, kLSItemInfoIsClassicApp __attribute__((availability(macosx,deprecated=10.11,message="The Classic environment is no longer supported."))) = 0x00000100, kLSItemInfoAppPrefersNative __attribute__((availability(macosx,deprecated=10.11,message="The Classic environment is no longer supported."))) = 0x00000200, kLSItemInfoAppPrefersClassic __attribute__((availability(macosx,deprecated=10.11,message="The Classic environment is no longer supported."))) = 0x00000400, kLSItemInfoAppIsScriptable __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLApplicationIsScriptableKey or NSURLApplicationIsScriptableKey instead."))) = 0x00000800, kLSItemInfoIsVolume __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLIsVolumeKey or NSURLIsVolumeKey instead."))) = 0x00001000, kLSItemInfoExtensionIsHidden __attribute__((availability(macosx,deprecated=10.11,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))) = 0x00100000 }; typedef struct LSItemInfoRecord { LSItemInfoFlags flags; OSType filetype; OSType creator; CFStringRef extension; } LSItemInfoRecord __attribute__((availability(macosx,deprecated=10.11,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))); extern OSStatus LSCopyItemInfoForURL( CFURLRef inURL, LSRequestedInfo inWhichInfo, LSItemInfoRecord * outItemInfo) __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use URL resource properties instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyItemInfoForRef( const FSRef * inItemRef, LSRequestedInfo inWhichInfo, LSItemInfoRecord * outItemInfo) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use URL resource properties instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSGetExtensionInfo( UniCharCount inNameLen, const UniChar inNameBuffer[], UniCharCount * outExtStartIndex) __attribute__((availability(macos,introduced=10.1,deprecated=10.11,message="Use CFURLCopyPathExtension(), -[NSURL pathExtension], or -[NSString pathExtension] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyDisplayNameForRef( const FSRef * inRef, CFStringRef * outDisplayName) __attribute__((availability(macos,introduced=10.1,deprecated=10.10,message="Use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyDisplayNameForURL( CFURLRef inURL, CFStringRef * outDisplayName) __attribute__((availability(macos,introduced=10.1,deprecated=10.11,message="Use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSetExtensionHiddenForRef( const FSRef * inRef, Boolean inHide) __attribute__((availability(macos,introduced=10.1,deprecated=10.10,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSetExtensionHiddenForURL( CFURLRef inURL, Boolean inHide) __attribute__((availability(macos,introduced=10.1,deprecated=10.11,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyKindStringForRef( const FSRef * inFSRef, CFStringRef * outKindString) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use the URL resource property kCFURLLocalizedTypeDescriptionKey or NSURLLocalizedTypeDescriptionKey instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyKindStringForURL( CFURLRef inURL, CFStringRef * outKindString) __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="Use the URL resource property kCFURLLocalizedTypeDescriptionKey or NSURLLocalizedTypeDescriptionKey instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyKindStringForTypeInfo( OSType inType, OSType inCreator, CFStringRef inExtension, CFStringRef * outKindString) __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use UTTypeCopyDescription instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyKindStringForMIMEType( CFStringRef inMIMEType, CFStringRef * outKindString) __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use UTTypeCopyDescription instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSGetApplicationForItem( const FSRef * inItemRef, LSRolesMask inRoleMask, FSRef * outAppRef, CFURLRef * outAppURL) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSCopyDefaultApplicationURLForURL instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSGetApplicationForInfo( OSType inType, OSType inCreator, CFStringRef inExtension, LSRolesMask inRoleMask, FSRef * outAppRef, CFURLRef * outAppURL) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyApplicationForMIMEType( CFStringRef inMIMEType, LSRolesMask inRoleMask, CFURLRef * outAppURL) __attribute__((availability(macos,introduced=10.2,deprecated=10.10,message="Use -[NSWorkspace URLForApplicationToOpenContentType:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSGetApplicationForURL( CFURLRef inURL, LSRolesMask inRoleMask, FSRef * outAppRef, CFURLRef * outAppURL) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSCopyDefaultApplicationURLForURL instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSFindApplicationForInfo( OSType inCreator, CFStringRef inBundleID, CFStringRef inName, FSRef * outAppRef, CFURLRef * outAppURL) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSCopyApplicationURLsForBundleIdentifier instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCanRefAcceptItem( const FSRef * inItemFSRef, const FSRef * inTargetRef, LSRolesMask inRoleMask, LSAcceptanceFlags inFlags, Boolean * outAcceptsItem) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSCanURLAcceptURL instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSRegisterFSRef( const FSRef * inRef, Boolean inUpdate) __attribute__((availability(macos,introduced=10.3,deprecated=10.10,message="Use LSRegisterURL instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSItemContentType __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property NSURLContentTypeKey instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property NSURLContentTypeKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property NSURLContentTypeKey instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property NSURLContentTypeKey instead."))); extern const CFStringRef kLSItemFileType __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))); extern const CFStringRef kLSItemFileCreator __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property NSURLContentTypeKey to get the file's UTI instead."))); extern const CFStringRef kLSItemExtension __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use CFURLCopyPathExtension or -[NSURL pathExtension] instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFURLCopyPathExtension or -[NSURL pathExtension] instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use CFURLCopyPathExtension or -[NSURL pathExtension] instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use CFURLCopyPathExtension or -[NSURL pathExtension] instead."))); extern const CFStringRef kLSItemDisplayName __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey instead."))); extern const CFStringRef kLSItemDisplayKind __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property kCFURLLocalizedTypeDescriptionKey or NSURLLocalizedTypeDescriptionKey instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property kCFURLLocalizedTypeDescriptionKey or NSURLLocalizedTypeDescriptionKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property kCFURLLocalizedTypeDescriptionKey or NSURLLocalizedTypeDescriptionKey instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property kCFURLLocalizedTypeDescriptionKey or NSURLLocalizedTypeDescriptionKey instead."))); extern const CFStringRef kLSItemRoleHandlerDisplayName __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Instead, resolve the desired role handler for the file, then use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey on the role handler's URL."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Instead, resolve the desired role handler for the file, then use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey on the role handler's URL."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Instead, resolve the desired role handler for the file, then use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey on the role handler's URL."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Instead, resolve the desired role handler for the file, then use the URL resource property kCFURLLocalizedNameKey or NSURLLocalizedNameKey on the role handler's URL."))); extern const CFStringRef kLSItemIsInvisible __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property kCFURLIsHiddenKey or NSURLIsHiddenKey instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property kCFURLIsHiddenKey or NSURLIsHiddenKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property kCFURLIsHiddenKey or NSURLIsHiddenKey instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property kCFURLIsHiddenKey or NSURLIsHiddenKey instead."))); extern const CFStringRef kLSItemExtensionIsHidden __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property kCFURLHasHiddenExtensionKey or NSURLHasHiddenExtensionKey instead."))); extern const CFStringRef kLSItemQuarantineProperties __attribute__((availability(ios,introduced=4.0,deprecated=8.0,message="Use the URL resource property kCFURLQuarantinePropertiesKey or NSURLQuarantinePropertiesKey instead."))) __attribute__((availability(macos,introduced=10.5,deprecated=10.10,message="Use the URL resource property kCFURLQuarantinePropertiesKey or NSURLQuarantinePropertiesKey instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use the URL resource property kCFURLQuarantinePropertiesKey or NSURLQuarantinePropertiesKey instead."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Use the URL resource property kCFURLQuarantinePropertiesKey or NSURLQuarantinePropertiesKey instead."))); extern OSStatus LSCopyItemAttribute( const FSRef * inItem, LSRolesMask inRoles, CFStringRef inAttributeName, CFTypeRef * outValue) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFURLCopyResourcePropertyForKey or -[NSURL getResourceValue:forKey:error:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSCopyItemAttributes( const FSRef * inItem, LSRolesMask inRoles, CFArrayRef inAttributeNames, CFDictionaryRef * outValues) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use CFURLCopyResourcePropertiesForKeys or -[NSURL resourceValuesForKeys:error:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSetItemAttribute( const FSRef * inItem, LSRolesMask inRoles, CFStringRef inAttributeName, CFTypeRef inValue) __attribute__((availability(macos,introduced=10.5,deprecated=10.10,message="Use CFURLSetResourcePropertyForKey or -[NSURL setResourceValue:forKey:error:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef OptionBits LSHandlerOptions; enum { kLSHandlerOptionsDefault __attribute__((availability(ios,introduced=4.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.11,message="Creator codes are deprecated on OS X."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Creator codes are deprecated on OS X."))) = 0, kLSHandlerOptionsIgnoreCreator __attribute__((availability(ios,introduced=4.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.11,message="Creator codes are deprecated on OS X."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Creator codes are deprecated on OS X."))) = 1 }; extern LSHandlerOptions LSGetHandlerOptionsForContentType(CFStringRef inContentType) __attribute__((availability(ios,introduced=4.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.11,message="Creator codes are deprecated on OS X."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Creator codes are deprecated on OS X."))); extern OSStatus LSSetHandlerOptionsForContentType( CFStringRef inContentType, LSHandlerOptions inOptions) __attribute__((availability(ios,introduced=4.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(macos,introduced=10.4,deprecated=10.11,message="Creator codes are deprecated on OS X."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Creator codes are deprecated on OS X."))) __attribute__((availability(watchos,introduced=4.0,deprecated=4.0,message="Creator codes are deprecated on OS X."))); #pragma pack(pop) } extern "C" { #pragma pack(push, 2) #pragma clang assume_nonnull begin typedef OptionBits LSLaunchFlags; enum { kLSLaunchDefaults = 0x00000001, kLSLaunchAndPrint = 0x00000002, kLSLaunchAndDisplayErrors = 0x00000040, kLSLaunchDontAddToRecents = 0x00000100, kLSLaunchDontSwitch = 0x00000200, kLSLaunchAsync = 0x00010000, kLSLaunchNewInstance = 0x00080000, kLSLaunchAndHide = 0x00100000, kLSLaunchAndHideOthers = 0x00200000, }; typedef struct LSLaunchURLSpec { _Nullable CFURLRef appURL; _Nullable CFArrayRef itemURLs; const AEDesc * _Nullable passThruParams; LSLaunchFlags launchFlags; void * _Nullable asyncRefCon; } LSLaunchURLSpec __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenCFURLRef( CFURLRef inURL, _Nullable CFURLRef *_Nullable outLaunchedURL) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenFromURLSpec( const LSLaunchURLSpec * inLaunchSpec, _Nullable CFURLRef *_Nullable outLaunchedURL) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma clang assume_nonnull end #pragma pack(pop) } extern "C" { #pragma pack(push, 2) enum { kLSLaunchInhibitBGOnly __attribute__((availability(macos,introduced=10.0,deprecated=10.12,message="This option does nothing."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) = 0x00000080, kLSLaunchNoParams __attribute__((availability(macos,introduced=10.0,deprecated=10.12,message="This option does nothing."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) = 0x00000800, kLSLaunchStartClassic __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="The Classic environment is no longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) = 0x00020000, kLSLaunchInClassic __attribute__((availability(macos,introduced=10.0,deprecated=10.11,message="The Classic environment is no longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) = 0x00040000, kLSLaunchHasUntrustedContents __attribute__((availability(macos,introduced=10.4,deprecated=10.12,message="This option does nothing."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))) = 0x00400000, }; typedef struct LSLaunchFSRefSpec { const FSRef * appRef; ItemCount numDocs; const FSRef * itemRefs; const AEDesc * passThruParams; LSLaunchFlags launchFlags; void * asyncRefCon; } LSLaunchFSRefSpec __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSLaunchURLSpec instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenFSRef( const FSRef * inRef, FSRef * outLaunchedRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSOpenCFURLRef or -[NSWorkspace openURL:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenFromRefSpec( const LSLaunchFSRefSpec * inLaunchSpec, FSRef * outLaunchedRef) __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use LSOpenFromURLSpec or NSWorkspace instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef struct LSApplicationParameters { CFIndex version; LSLaunchFlags flags; const FSRef * application; void * asyncLaunchRefCon; CFDictionaryRef environment; CFArrayRef argv; AppleEvent * initialEvent; } LSApplicationParameters __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSWorkspace instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenApplication( const LSApplicationParameters * appParams, ProcessSerialNumber * outPSN) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use -[NSWorkspace launchApplicationAtURL:options:configuration:error:] instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenItemsWithRole( const FSRef * inItems, CFIndex inItemCount, LSRolesMask inRole, const AEKeyDesc * inAEParam, const LSApplicationParameters * inAppParams, ProcessSerialNumber * outPSNs, CFIndex inMaxPSNCount) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSWorkspace instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSOpenURLsWithRole( CFArrayRef inURLs, LSRolesMask inRole, const AEKeyDesc * inAEParam, const LSApplicationParameters * inAppParams, ProcessSerialNumber * outPSNs, CFIndex inMaxPSNCount) __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSWorkspace instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma pack(pop) } #pragma clang assume_nonnull begin extern const CFStringRef kLSQuarantineAgentNameKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineAgentBundleIdentifierKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTimeStampKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeWebDownload __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeOtherDownload __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeEmailAttachment __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeInstantMessageAttachment __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeCalendarEventAttachment __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineTypeOtherAttachment __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineOriginURLKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kLSQuarantineDataURLKey __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma clang assume_nonnull end extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kUTTypeItem __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeItem instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeItem instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeItem instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeItem instead."))); extern const CFStringRef kUTTypeContent __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeContent instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeContent instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeContent instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeContent instead."))); extern const CFStringRef kUTTypeCompositeContent __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeCompositeContent instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeCompositeContent instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCompositeContent instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCompositeContent instead."))); extern const CFStringRef kUTTypeMessage __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMessage instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMessage instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMessage instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMessage instead."))); extern const CFStringRef kUTTypeContact __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeContact instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeContact instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeContact instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeContact instead."))); extern const CFStringRef kUTTypeArchive __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeArchive instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeArchive instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeArchive instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeArchive instead."))); extern const CFStringRef kUTTypeDiskImage __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeDiskImage instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeDiskImage instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeDiskImage instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeDiskImage instead."))); extern const CFStringRef kUTTypeData __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeData instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeData instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeData instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeData instead."))); extern const CFStringRef kUTTypeDirectory __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeDirectory instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeDirectory instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeDirectory instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeDirectory instead."))); extern const CFStringRef kUTTypeResolvable __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeResolvable instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeResolvable instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeResolvable instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeResolvable instead."))); extern const CFStringRef kUTTypeSymLink __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeSymLink instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeSymLink instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSymLink instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeSymLink instead."))); extern const CFStringRef kUTTypeExecutable __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeExecutable instead."))) __attribute__((availability(macos,introduced=10.5,deprecated=12.0,message="Use UTTypeExecutable instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeExecutable instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeExecutable instead."))); extern const CFStringRef kUTTypeMountPoint __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMountPoint instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMountPoint instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMountPoint instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMountPoint instead."))); extern const CFStringRef kUTTypeAliasFile __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeAliasFile instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeAliasFile instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAliasFile instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAliasFile instead."))); extern const CFStringRef kUTTypeAliasRecord __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="The Alias Manager is obsolete."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="The Alias Manager is obsolete."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="The Alias Manager is obsolete."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="The Alias Manager is obsolete."))); extern const CFStringRef kUTTypeURLBookmarkData __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeURLBookmarkData instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeURLBookmarkData instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeURLBookmarkData instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeURLBookmarkData instead."))); extern const CFStringRef kUTTypeURL __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeURL instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeURL instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeURL instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeURL instead."))); extern const CFStringRef kUTTypeFileURL __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeFileURL instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeFileURL instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeFileURL instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeFileURL instead."))); extern const CFStringRef kUTTypeText __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeText instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeText instead."))); extern const CFStringRef kUTTypePlainText __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypePlainText instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypePlainText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePlainText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePlainText instead."))); extern const CFStringRef kUTTypeUTF8PlainText __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeUTF8PlainText instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeUTF8PlainText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeUTF8PlainText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeUTF8PlainText instead."))); extern const CFStringRef kUTTypeUTF16ExternalPlainText __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeUTF16ExternalPlainText instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeUTF16ExternalPlainText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeUTF16ExternalPlainText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeUTF16ExternalPlainText instead."))); extern const CFStringRef kUTTypeUTF16PlainText __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeUTF16PlainText instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeUTF16PlainText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeUTF16PlainText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeUTF16PlainText instead."))); extern const CFStringRef kUTTypeDelimitedText __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeDelimitedText instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeDelimitedText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeDelimitedText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeDelimitedText instead."))); extern const CFStringRef kUTTypeCommaSeparatedText __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeCommaSeparatedText instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeCommaSeparatedText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCommaSeparatedText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCommaSeparatedText instead."))); extern const CFStringRef kUTTypeTabSeparatedText __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeTabSeparatedText instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeTabSeparatedText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeTabSeparatedText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeTabSeparatedText instead."))); extern const CFStringRef kUTTypeUTF8TabSeparatedText __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeUTF8TabSeparatedText instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeUTF8TabSeparatedText instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeUTF8TabSeparatedText instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeUTF8TabSeparatedText instead."))); extern const CFStringRef kUTTypeRTF __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeRTF instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeRTF instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeRTF instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeRTF instead."))); extern const CFStringRef kUTTypeHTML __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeHTML instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeHTML instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeHTML instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeHTML instead."))); extern const CFStringRef kUTTypeXML __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeXML instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeXML instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeXML instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeXML instead."))); extern const CFStringRef kUTTypeSourceCode __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeSourceCode instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeSourceCode instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSourceCode instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeSourceCode instead."))); extern const CFStringRef kUTTypeAssemblyLanguageSource __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeAssemblyLanguageSource instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeAssemblyLanguageSource instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAssemblyLanguageSource instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAssemblyLanguageSource instead."))); extern const CFStringRef kUTTypeCSource __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeCSource instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeCSource instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCSource instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCSource instead."))); extern const CFStringRef kUTTypeObjectiveCSource __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeObjectiveCSource instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeObjectiveCSource instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeObjectiveCSource instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeObjectiveCSource instead."))); extern const CFStringRef kUTTypeSwiftSource __attribute__((availability(ios,introduced=9.0,deprecated=15.0,message="Use UTTypeSwiftSource instead."))) __attribute__((availability(macos,introduced=10.11,deprecated=12.0,message="Use UTTypeSwiftSource instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSwiftSource instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=8.0,message="Use UTTypeSwiftSource instead."))); extern const CFStringRef kUTTypeCPlusPlusSource __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeCPlusPlusSource instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeCPlusPlusSource instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCPlusPlusSource instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCPlusPlusSource instead."))); extern const CFStringRef kUTTypeObjectiveCPlusPlusSource __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeObjectiveCPlusPlusSource instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeObjectiveCPlusPlusSource instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeObjectiveCPlusPlusSource instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeObjectiveCPlusPlusSource instead."))); extern const CFStringRef kUTTypeCHeader __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeCHeader instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeCHeader instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCHeader instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCHeader instead."))); extern const CFStringRef kUTTypeCPlusPlusHeader __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeCPlusPlusHeader instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeCPlusPlusHeader instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCPlusPlusHeader instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCPlusPlusHeader instead."))); extern const CFStringRef kUTTypeJavaSource __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))); extern const CFStringRef kUTTypeScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeScript instead."))); extern const CFStringRef kUTTypeAppleScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeAppleScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeAppleScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAppleScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAppleScript instead."))); extern const CFStringRef kUTTypeOSAScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeOSAScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeOSAScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeOSAScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeOSAScript instead."))); extern const CFStringRef kUTTypeOSAScriptBundle __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeOSAScriptBundle instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeOSAScriptBundle instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeOSAScriptBundle instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeOSAScriptBundle instead."))); extern const CFStringRef kUTTypeJavaScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeJavaScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeJavaScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeJavaScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeJavaScript instead."))); extern const CFStringRef kUTTypeShellScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeShellScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeShellScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeShellScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeShellScript instead."))); extern const CFStringRef kUTTypePerlScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePerlScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePerlScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePerlScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePerlScript instead."))); extern const CFStringRef kUTTypePythonScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePythonScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePythonScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePythonScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePythonScript instead."))); extern const CFStringRef kUTTypeRubyScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeRubyScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeRubyScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeRubyScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeRubyScript instead."))); extern const CFStringRef kUTTypePHPScript __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePHPScript instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePHPScript instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePHPScript instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePHPScript instead."))); extern const CFStringRef kUTTypeJSON __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeJSON instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeJSON instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeJSON instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeJSON instead."))); extern const CFStringRef kUTTypePropertyList __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePropertyList instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePropertyList instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePropertyList instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePropertyList instead."))); extern const CFStringRef kUTTypeXMLPropertyList __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeXMLPropertyList instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeXMLPropertyList instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeXMLPropertyList instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeXMLPropertyList instead."))); extern const CFStringRef kUTTypeBinaryPropertyList __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeBinaryPropertyList instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeBinaryPropertyList instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeBinaryPropertyList instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeBinaryPropertyList instead."))); extern const CFStringRef kUTTypePDF __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypePDF instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypePDF instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePDF instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePDF instead."))); extern const CFStringRef kUTTypeRTFD __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeRTFD instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeRTFD instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeRTFD instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeRTFD instead."))); extern const CFStringRef kUTTypeFlatRTFD __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeFlatRTFD instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeFlatRTFD instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeFlatRTFD instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeFlatRTFD instead."))); extern const CFStringRef kUTTypeTXNTextAndMultimediaData __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="The Multilingual Text Engine is obsolete."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="The Multilingual Text Engine is obsolete."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="The Multilingual Text Engine is obsolete."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="The Multilingual Text Engine is obsolete."))); extern const CFStringRef kUTTypeWebArchive __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeWebArchive instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeWebArchive instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeWebArchive instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeWebArchive instead."))); extern const CFStringRef kUTTypeImage __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeImage instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeImage instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeImage instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeImage instead."))); extern const CFStringRef kUTTypeJPEG __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeJPEG instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeJPEG instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeJPEG instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeJPEG instead."))); extern const CFStringRef kUTTypeJPEG2000 __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="JPEG2000 is no longer supported by this operating system."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="JPEG2000 is no longer supported by this operating system."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="JPEG2000 is no longer supported by this operating system."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="JPEG2000 is no longer supported by this operating system."))); extern const CFStringRef kUTTypeTIFF __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeTIFF instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeTIFF instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeTIFF instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeTIFF instead."))); extern const CFStringRef kUTTypePICT __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="QuickDraw is obsolete."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="QuickDraw is obsolete."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="QuickDraw is obsolete."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="QuickDraw is obsolete."))); extern const CFStringRef kUTTypeGIF __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeGIF instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeGIF instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeGIF instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeGIF instead."))); extern const CFStringRef kUTTypePNG __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypePNG instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypePNG instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePNG instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePNG instead."))); extern const CFStringRef kUTTypeQuickTimeImage __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="The QuickTime Image file format is obsolete."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="The QuickTime Image file format is obsolete."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="The QuickTime Image file format is obsolete."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="The QuickTime Image file format is obsolete."))); extern const CFStringRef kUTTypeAppleICNS __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeICNS instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeICNS instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeICNS instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeICNS instead."))); extern const CFStringRef kUTTypeBMP __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeBMP instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeBMP instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeBMP instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeBMP instead."))); extern const CFStringRef kUTTypeICO __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeICO instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeICO instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeICO instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeICO instead."))); extern const CFStringRef kUTTypeRawImage __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeRAWImage instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeRAWImage instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeRAWImage instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeRAWImage instead."))); extern const CFStringRef kUTTypeScalableVectorGraphics __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeSVG instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeSVG instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSVG instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeSVG instead."))); extern const CFStringRef kUTTypeLivePhoto __attribute__((availability(ios,introduced=9.1,deprecated=15.0,message="Use UTTypeLivePhoto instead."))) __attribute__((availability(macos,introduced=10.12,deprecated=12.0,message="Use UTTypeLivePhoto instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeLivePhoto instead."))) __attribute__((availability(watchos,introduced=2.1,deprecated=8.0,message="Use UTTypeLivePhoto instead."))); extern const CFStringRef kUTTypeAudiovisualContent __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeAudiovisualContent instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeAudiovisualContent instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAudiovisualContent instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAudiovisualContent instead."))); extern const CFStringRef kUTTypeMovie __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMovie instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMovie instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMovie instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMovie instead."))); extern const CFStringRef kUTTypeVideo __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeVideo instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeVideo instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeVideo instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeVideo instead."))); extern const CFStringRef kUTTypeAudio __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeAudio instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeAudio instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAudio instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAudio instead."))); extern const CFStringRef kUTTypeQuickTimeMovie __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeQuickTimeMovie instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeQuickTimeMovie instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeQuickTimeMovie instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeQuickTimeMovie instead."))); extern const CFStringRef kUTTypeMPEG __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMPEG instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMPEG instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMPEG instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMPEG instead."))); extern const CFStringRef kUTTypeMPEG2Video __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeMPEG2Video instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeMPEG2Video instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMPEG2Video instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMPEG2Video instead."))); extern const CFStringRef kUTTypeMPEG2TransportStream __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeMPEG2TransportStream instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeMPEG2TransportStream instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMPEG2TransportStream instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMPEG2TransportStream instead."))); extern const CFStringRef kUTTypeMP3 __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMP3 instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMP3 instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMP3 instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMP3 instead."))); extern const CFStringRef kUTTypeMPEG4 __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMPEG4Movie instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMPEG4Movie instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMPEG4Movie instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMPEG4Movie instead."))); extern const CFStringRef kUTTypeMPEG4Audio __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeMPEG4Audio instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeMPEG4Audio instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMPEG4Audio instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMPEG4Audio instead."))); extern const CFStringRef kUTTypeAppleProtectedMPEG4Audio __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeAppleProtectedMPEG4Audio instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeAppleProtectedMPEG4Audio instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAppleProtectedMPEG4Audio instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAppleProtectedMPEG4Audio instead."))); extern const CFStringRef kUTTypeAppleProtectedMPEG4Video __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeAppleProtectedMPEG4Video instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeAppleProtectedMPEG4Video instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAppleProtectedMPEG4Video instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAppleProtectedMPEG4Video instead."))); extern const CFStringRef kUTTypeAVIMovie __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeAVI instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeAVI instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAVI instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAVI instead."))); extern const CFStringRef kUTTypeAudioInterchangeFileFormat __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeAIFF instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeAIFF instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeAIFF instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeAIFF instead."))); extern const CFStringRef kUTTypeWaveformAudio __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeWAV instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeWAV instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeWAV instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeWAV instead."))); extern const CFStringRef kUTTypeMIDIAudio __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeMIDI instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeMIDI instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeMIDI instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeMIDI instead."))); extern const CFStringRef kUTTypePlaylist __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePlaylist instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePlaylist instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePlaylist instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePlaylist instead."))); extern const CFStringRef kUTTypeM3UPlaylist __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeM3UPlaylist instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeM3UPlaylist instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeM3UPlaylist instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeM3UPlaylist instead."))); extern const CFStringRef kUTTypeFolder __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeFolder instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeFolder instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeFolder instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeFolder instead."))); extern const CFStringRef kUTTypeVolume __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeVolume instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeVolume instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeVolume instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeVolume instead."))); extern const CFStringRef kUTTypePackage __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypePackage instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypePackage instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePackage instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePackage instead."))); extern const CFStringRef kUTTypeBundle __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeBundle instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeBundle instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeBundle instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeBundle instead."))); extern const CFStringRef kUTTypePluginBundle __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePluginBundle instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePluginBundle instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePluginBundle instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePluginBundle instead."))); extern const CFStringRef kUTTypeSpotlightImporter __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeSpotlightImporter instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeSpotlightImporter instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSpotlightImporter instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeSpotlightImporter instead."))); extern const CFStringRef kUTTypeQuickLookGenerator __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeQuickLookGenerator instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeQuickLookGenerator instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeQuickLookGenerator instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeQuickLookGenerator instead."))); extern const CFStringRef kUTTypeXPCService __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeXPCService instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeXPCService instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeXPCService instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeXPCService instead."))); extern const CFStringRef kUTTypeFramework __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeFramework instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeFramework instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeFramework instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeFramework instead."))); extern const CFStringRef kUTTypeApplication __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeApplication instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeApplication instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeApplication instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeApplication instead."))); extern const CFStringRef kUTTypeApplicationBundle __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeApplicationBundle instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeApplicationBundle instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeApplicationBundle instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeApplicationBundle instead."))); extern const CFStringRef kUTTypeApplicationFile __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Classic applications are obsolete."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Classic applications are obsolete."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Classic applications are obsolete."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Classic applications are obsolete."))); extern const CFStringRef kUTTypeUnixExecutable __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeUnixExecutable instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeUnixExecutable instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeUnixExecutable instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeUnixExecutable instead."))); extern const CFStringRef kUTTypeWindowsExecutable __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeEXE instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeEXE instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeEXE instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeEXE instead."))); extern const CFStringRef kUTTypeJavaClass __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))); extern const CFStringRef kUTTypeJavaArchive __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Java support is no longer provided by this operating system. Install a JDK to use Java."))); extern const CFStringRef kUTTypeSystemPreferencesPane __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeSystemPreferencesPane instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeSystemPreferencesPane instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSystemPreferencesPane instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeSystemPreferencesPane instead."))); extern const CFStringRef kUTTypeGNUZipArchive __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeGZIP instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeGZIP instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeGZIP instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeGZIP instead."))); extern const CFStringRef kUTTypeBzip2Archive __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeBZ2 instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeBZ2 instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeBZ2 instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeBZ2 instead."))); extern const CFStringRef kUTTypeZipArchive __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeZIP instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeZIP instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeZIP instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeZIP instead."))); extern const CFStringRef kUTTypeSpreadsheet __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeSpreadsheet instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeSpreadsheet instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeSpreadsheet instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeSpreadsheet instead."))); extern const CFStringRef kUTTypePresentation __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePresentation instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePresentation instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePresentation instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePresentation instead."))); extern const CFStringRef kUTTypeDatabase __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeDatabase instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeDatabase instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeDatabase instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeDatabase instead."))); extern const CFStringRef kUTTypeVCard __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTypeVCard instead."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="Use UTTypeVCard instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeVCard instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeVCard instead."))); extern const CFStringRef kUTTypeToDoItem __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeToDoItem instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeToDoItem instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeToDoItem instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeToDoItem instead."))); extern const CFStringRef kUTTypeCalendarEvent __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeCalendarEvent instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeCalendarEvent instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeCalendarEvent instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeCalendarEvent instead."))); extern const CFStringRef kUTTypeEmailMessage __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeEmailMessage instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeEmailMessage instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeEmailMessage instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeEmailMessage instead."))); extern const CFStringRef kUTTypeInternetLocation __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeInternetLocation instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeInternetLocation instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeInternetLocation instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeInternetLocation instead."))); extern const CFStringRef kUTTypeInkText __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="The Ink framework is obsolete."))) __attribute__((availability(macos,introduced=10.4,deprecated=12.0,message="The Ink framework is obsolete."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="The Ink framework is obsolete."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="The Ink framework is obsolete."))); extern const CFStringRef kUTTypeFont __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeFont instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeFont instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeFont instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeFont instead."))); extern const CFStringRef kUTTypeBookmark __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeBookmark instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeBookmark instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeBookmark instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeBookmark instead."))); extern const CFStringRef kUTType3DContent __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTType3DContent instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTType3DContent instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTType3DContent instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTType3DContent instead."))); extern const CFStringRef kUTTypePKCS12 __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypePKCS12 instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypePKCS12 instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypePKCS12 instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypePKCS12 instead."))); extern const CFStringRef kUTTypeX509Certificate __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeX509Certificate instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeX509Certificate instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeX509Certificate instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeX509Certificate instead."))); extern const CFStringRef kUTTypeElectronicPublication __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeEPUB instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeEPUB instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeEPUB instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeEPUB instead."))); extern const CFStringRef kUTTypeLog __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTTypeLog instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTTypeLog instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTypeLog instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTypeLog instead."))); #pragma clang assume_nonnull end } extern "C" { #pragma clang assume_nonnull begin extern const CFStringRef kUTExportedTypeDeclarationsKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTImportedTypeDeclarationsKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeIdentifierKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeTagSpecificationKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeConformsToKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeDescriptionKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeIconFileKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeReferenceURLKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTypeVersionKey __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,introduced=1.0))); extern const CFStringRef kUTTagClassFilenameExtension __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTagClassFilenameExtension instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use UTTagClassFilenameExtension instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTagClassFilenameExtension instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTagClassFilenameExtension instead."))); extern const CFStringRef kUTTagClassMIMEType __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTTagClassMIMEType instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use UTTagClassMIMEType instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTTagClassMIMEType instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTTagClassMIMEType instead."))); extern const CFStringRef kUTTagClassNSPboardType __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="NSPasteboard types are obsolete."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kUTTagClassOSType __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="HFS file types are obsolete."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern _Nullable CFStringRef UTTypeCreatePreferredIdentifierForTag( CFStringRef inTagClass, CFStringRef inTag, _Nullable CFStringRef inConformingToUTI) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use the UTType class instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use the UTType class instead."))); extern _Nullable CFArrayRef UTTypeCreateAllIdentifiersForTag( CFStringRef inTagClass, CFStringRef inTag, _Nullable CFStringRef inConformingToUTI) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use the UTType class instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use the UTType class instead."))); extern _Nullable CFStringRef UTTypeCopyPreferredTagWithClass( CFStringRef inUTI, CFStringRef inTagClass) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use the UTType class instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use the UTType class instead."))); extern _Nullable CFArrayRef UTTypeCopyAllTagsWithClass( CFStringRef inUTI, CFStringRef inTagClass) __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use the UTType class instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use the UTType class instead."))); extern Boolean UTTypeEqual( CFStringRef inUTI1, CFStringRef inUTI2) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use -[UTType isEqual:] instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use -[UTType isEqual:] instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use -[UTType isEqual:] instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use -[UTType isEqual:] instead."))); extern Boolean UTTypeConformsTo( CFStringRef inUTI, CFStringRef inConformsToUTI) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use -[UTType conformsToType:] instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use -[UTType conformsToType:] instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use -[UTType conformsToType:] instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use -[UTType conformsToType:] instead."))); extern _Nullable CFStringRef UTTypeCopyDescription(CFStringRef inUTI) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use UTType.localizedDescription instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use UTType.localizedDescription instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTType.localizedDescription instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTType.localizedDescription instead."))); extern Boolean UTTypeIsDeclared(CFStringRef inUTI) __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTType.declared instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTType.declared instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTType.declared instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTType.declared instead."))); extern Boolean UTTypeIsDynamic(CFStringRef inUTI) __attribute__((availability(ios,introduced=8.0,deprecated=15.0,message="Use UTType.dynamic instead."))) __attribute__((availability(macos,introduced=10.10,deprecated=12.0,message="Use UTType.dynamic instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use UTType.dynamic instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use UTType.dynamic instead."))); extern _Nullable CFDictionaryRef UTTypeCopyDeclaration(CFStringRef inUTI) __attribute__((availability(ios,introduced=3.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="Use the UTType class instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=15.0,message="Use the UTType class instead."))) __attribute__((availability(watchos,introduced=1.0,deprecated=8.0,message="Use the UTType class instead."))); extern _Nullable CFURLRef UTTypeCopyDeclaringBundleURL(CFStringRef inUTI) __attribute__((availability(ios,introduced=3.0,deprecated=14.0,message=""))) __attribute__((availability(macos,introduced=10.3,deprecated=11.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=14.0,message=""))) __attribute__((availability(watchos,introduced=1.0,deprecated=7.0,message=""))); extern CFStringRef UTCreateStringForOSType(OSType inOSType) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="HFS type codes are obsolete."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSType UTGetOSTypeFromString(CFStringRef inString) __attribute__((availability(macos,introduced=10.3,deprecated=12.0,message="HFS type codes are obsolete."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); #pragma clang assume_nonnull end } extern "C" { typedef struct __attribute__((objc_bridge(id))) __MDItem * MDItemRef; extern CFTypeID MDItemGetTypeID(void) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern MDItemRef MDItemCreate(CFAllocatorRef allocator, CFStringRef path) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern MDItemRef MDItemCreateWithURL(CFAllocatorRef allocator, CFURLRef url) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDItemsCreateWithURLs(CFAllocatorRef allocator, CFArrayRef urls) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeRef MDItemCopyAttribute(MDItemRef item, CFStringRef name) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDictionaryRef MDItemCopyAttributes(MDItemRef item, CFArrayRef names) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDictionaryRef MDItemCopyAttributeList(MDItemRef item, ... ) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDItemCopyAttributeNames(MDItemRef item) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDItemsCopyAttributes(CFArrayRef items, CFArrayRef names) __attribute__((availability(macos,introduced=10.12))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAttributeChangeDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemContentType __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemContentTypeTree __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemKeywords __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTitle __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAuthors __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemEditors __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemParticipants __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemProjects __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDownloadedDate __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemWhereFroms __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemComment __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCopyright __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLastUsedDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemContentCreationDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemContentModificationDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDateAdded __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDurationSeconds __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemContactKeywords __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemVersion __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPixelHeight __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPixelWidth __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPixelCount __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemColorSpace __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemBitsPerSample __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFlashOnOff __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFocalLength __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAcquisitionMake __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAcquisitionModel __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemISOSpeed __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemOrientation __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLayerNames __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemWhiteBalance __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAperture __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemProfileName __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemResolutionWidthDPI __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemResolutionHeightDPI __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemExposureMode __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemExposureTimeSeconds __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemEXIFVersion __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCameraOwner __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFocalLength35mm __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLensModel __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemEXIFGPSVersion __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAltitude __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLatitude __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLongitude __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemSpeed __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTimestamp __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSTrack __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemImageDirection __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemNamedLocation __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSStatus __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSMeasureMode __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDOP __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSMapDatum __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDestLatitude __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDestLongitude __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDestBearing __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDestDistance __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSProcessingMethod __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSAreaInformation __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDateStamp __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGPSDifferental __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCodecs __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemMediaTypes __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemStreamable __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTotalBitRate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemVideoBitRate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAudioBitRate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDeliveryType __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAlbum __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemHasAlphaChannel __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRedEyeOnOff __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemMeteringMode __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemMaxAperture __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFNumber __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemExposureProgram __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemExposureTimeString __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemHeadline __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemInstructions __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCity __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemStateOrProvince __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCountry __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSName __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDisplayName __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPath __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSSize __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSCreationDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSContentChangeDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSOwnerUserID __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSOwnerGroupID __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSExists __attribute__((availability(macos,introduced=10.4,deprecated=10.4,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSIsReadable __attribute__((availability(macos,introduced=10.4,deprecated=10.4,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSIsWriteable __attribute__((availability(macos,introduced=10.4,deprecated=10.4,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSHasCustomIcon __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSIsExtensionHidden __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSIsStationery __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSInvisible __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSLabel __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFSNodeCount __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemHTMLContent __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTextContent __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAudioSampleRate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAudioChannelCount __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTempo __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemKeySignature __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTimeSignature __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAudioEncodingApplication __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemComposer __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLyricist __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAudioTrackNumber __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRecordingDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemMusicalGenre __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemIsGeneralMIDISequence __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRecordingYear __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemOrganizations __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLanguages __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRights __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPublishers __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemContributors __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCoverage __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemSubject __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemTheme __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDescription __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemIdentifier __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAudiences __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemNumberOfPages __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPageWidth __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPageHeight __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemSecurityMethod __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCreator __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemEncodingApplications __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDueDate __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemStarRating __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPhoneNumbers __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemEmailAddresses __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemInstantMessageAddresses __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemKind __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRecipients __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFinderComment __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemFonts __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAppleLoopsRootKey __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAppleLoopsKeyFilterType __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAppleLoopsLoopMode __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAppleLoopDescriptors __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemMusicalInstrumentCategory __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemMusicalInstrumentName __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemCFBundleIdentifier __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemSupportFileType __attribute__((availability(macos,introduced=10.5,deprecated=10.5,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemInformation __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemDirector __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemProducer __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemGenre __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemPerformers __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemOriginalFormat __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemOriginalSource __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAuthorEmailAddresses __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRecipientEmailAddresses __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemAuthorAddresses __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemRecipientAddresses __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemURL __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLabelIcon __attribute__((availability(macos,introduced=10.7,deprecated=10.7,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLabelID __attribute__((availability(macos,introduced=10.7,deprecated=10.7,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLabelKind __attribute__((availability(macos,introduced=10.7,deprecated=10.7,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemLabelUUID __attribute__((availability(macos,introduced=10.7,deprecated=10.7,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemIsLikelyJunk __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemExecutableArchitectures __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemExecutablePlatform __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemApplicationCategories __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDItemIsApplicationManaged __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { extern CFDictionaryRef __MDItemCopyAttributesEllipsis1(MDItemRef item, ...) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { typedef struct __attribute__((objc_bridge(id))) __MDQuery * MDQueryRef; typedef enum { kMDQuerySynchronous = 1, kMDQueryWantsUpdates = 4, kMDQueryAllowFSTranslation = 8 } MDQueryOptionFlags; extern CFTypeID MDQueryGetTypeID(void) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern MDQueryRef MDQueryCreate(CFAllocatorRef allocator, CFStringRef queryString, CFArrayRef valueListAttrs, CFArrayRef sortingAttrs) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern MDQueryRef MDQueryCreateSubset(CFAllocatorRef allocator, MDQueryRef query, CFStringRef queryString, CFArrayRef valueListAttrs, CFArrayRef sortingAttrs) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern MDQueryRef MDQueryCreateForItems(CFAllocatorRef allocator, CFStringRef queryString, CFArrayRef valueListAttrs, CFArrayRef sortingAttrs, CFArrayRef items) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef MDQueryCopyQueryString(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDQueryCopyValueListAttributes(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDQueryCopySortingAttributes(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef struct { size_t first_max_num; size_t first_max_ms; size_t progress_max_num; size_t progress_max_ms; size_t update_max_num; size_t update_max_ms; } MDQueryBatchingParams; extern MDQueryBatchingParams MDQueryGetBatchingParameters(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQuerySetBatchingParameters(MDQueryRef query, MDQueryBatchingParams params) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef const void *(*MDQueryCreateResultFunction)(MDQueryRef query, MDItemRef item, void *context); extern void MDQuerySetCreateResultFunction(MDQueryRef query, MDQueryCreateResultFunction func, void *context, const CFArrayCallBacks *cb) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef const void *(*MDQueryCreateValueFunction)(MDQueryRef query, CFStringRef attrName, CFTypeRef attrValue, void *context); extern void MDQuerySetCreateValueFunction(MDQueryRef query, MDQueryCreateValueFunction func, void *context, const CFArrayCallBacks *cb) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQuerySetDispatchQueue(MDQueryRef query, dispatch_queue_t queue) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDQueryExecute(MDQueryRef query, CFOptionFlags optionFlags) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQueryStop(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQueryDisableUpdates(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQueryEnableUpdates(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDQueryIsGatheringComplete(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFIndex MDQueryGetResultCount(MDQueryRef query) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const void *MDQueryGetResultAtIndex(MDQueryRef query, CFIndex idx) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFIndex MDQueryGetIndexOfResult(MDQueryRef query, const void *result) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void *MDQueryGetAttributeValueOfResultAtIndex(MDQueryRef query, CFStringRef name, CFIndex idx) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDQueryCopyValuesOfAttribute(MDQueryRef query, CFStringRef name) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFIndex MDQueryGetCountOfResultsWithAttributeValue(MDQueryRef query, CFStringRef name, CFTypeRef value) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDQuerySetSortOrder(MDQueryRef query, CFArrayRef sortingAttrs) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef enum { kMDQueryReverseSortOrderFlag = (1<<0), } MDQuerySortOptionFlags; extern Boolean MDQuerySetSortOptionFlagsForAttribute(MDQueryRef query, CFStringRef fieldName, uint32_t flags) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern uint32_t MDQueryGetSortOptionFlagsForAttribute(MDQueryRef query, CFStringRef fieldName) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef CFComparisonResult (*MDQuerySortComparatorFunction)(const CFTypeRef attrs1[], const CFTypeRef attrs2[], void *context); extern void MDQuerySetSortComparator(MDQueryRef query, MDQuerySortComparatorFunction comparator, void *context) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQuerySetSortComparatorBlock(MDQueryRef query, CFComparisonResult (*comparator)(const CFTypeRef attrs1[], const CFTypeRef attrs2[])) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryProgressNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryDidFinishNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryDidUpdateNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryUpdateAddedItems __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryUpdateChangedItems __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryUpdateRemovedItems __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryResultContentRelevance __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQuerySetSearchScope(MDQueryRef query, CFArrayRef scopeDirectories, OptionBits scopeOptions) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryScopeHome __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryScopeComputer __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryScopeNetwork __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryScopeAllIndexed __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryScopeComputerIndexed __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDQueryScopeNetworkIndexed __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void MDQuerySetMaxCount(MDQueryRef query, CFIndex size) __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { typedef struct __MDLabel * MDLabelRef; extern CFTypeID MDLabelGetTypeID(void) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDItemCopyLabels(MDItemRef item) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDItemSetLabel(MDItemRef item, MDLabelRef label) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDItemRemoveLabel(MDItemRef item, MDLabelRef label) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef enum { kMDLabelUserDomain, kMDLabelLocalDomain, } MDLabelDomain; extern MDLabelRef MDLabelCreate(CFAllocatorRef allocator, CFStringRef displayName, CFStringRef kind, MDLabelDomain domain) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeRef MDLabelCopyAttribute(MDLabelRef label, CFStringRef name) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef MDLabelCopyAttributeName(MDLabelRef label) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDLabelDelete(MDLabelRef label) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern Boolean MDLabelSetAttributes(MDLabelRef label, CFDictionaryRef attrs) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDCopyLabelKinds(void) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDCopyLabelsMatchingExpression(CFStringRef simpleQueryString) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDCopyLabelsWithKind(CFStringRef kind) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern MDLabelRef MDCopyLabelWithUUID(CFUUIDRef labelUUID) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelBundleURL __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelContentChangeDate __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelDisplayName __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelIconData __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelIconUUID __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelIsMutuallyExclusiveSetMember __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelKind __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelSetsFinderColor __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelUUID __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelVisibility __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelKindIsMutuallyExclusiveSetKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDLabelKindVisibilityKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDPrivateVisibility __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kMDPublicVisibility __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDLabelAddedNotification __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDLabelChangedNotification __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDLabelRemovedNotification __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { extern CFDictionaryRef MDSchemaCopyAttributesForContentType(CFStringRef contentTypeUTI) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFDictionaryRef MDSchemaCopyMetaAttributesForAttribute(CFStringRef name) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef MDSchemaCopyAllAttributes(void) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef MDSchemaCopyDisplayNameForAttribute(CFStringRef name) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef MDSchemaCopyDisplayDescriptionForAttribute(CFStringRef name) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDAttributeDisplayValues __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDAttributeAllValues __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDAttributeReadOnlyValues __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDExporterAvaliable __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDAttributeName __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDAttributeType __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern const CFStringRef kMDAttributeMultiValued __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } extern "C" { } extern "C" { typedef CFTypeRef SKDocumentRef; extern CFTypeID SKDocumentGetTypeID(void) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentRef SKDocumentCreateWithURL(CFURLRef inURL) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFURLRef SKDocumentCopyURL(SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentRef SKDocumentCreate( CFStringRef inScheme, SKDocumentRef inParent, CFStringRef inName) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKDocumentGetSchemeName(SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKDocumentGetName(SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentRef SKDocumentGetParent(SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); } extern const CFStringRef kSKMinTermLength __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKSubstitutions __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKStopWords __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKProximityIndexing __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKMaximumTerms __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKTermChars __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKStartTermChars __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKEndTermChars __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern const CFStringRef kSKLanguageTypes __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern "C" { typedef struct __SKIndex* SKIndexRef; extern CFTypeID SKIndexGetTypeID(void) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __SKIndexDocumentIterator* SKIndexDocumentIteratorRef; extern CFTypeID SKIndexDocumentIteratorGetTypeID(void) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); enum SKIndexType { kSKIndexUnknown = 0, kSKIndexInverted = 1, kSKIndexVector = 2, kSKIndexInvertedVector = 3 }; typedef enum SKIndexType SKIndexType; enum SKDocumentIndexState { kSKDocumentStateNotIndexed = 0, kSKDocumentStateIndexed = 1, kSKDocumentStateAddPending = 2, kSKDocumentStateDeletePending = 3 }; typedef enum SKDocumentIndexState SKDocumentIndexState; extern SKIndexRef SKIndexCreateWithURL( CFURLRef inURL, CFStringRef inIndexName, SKIndexType inIndexType, CFDictionaryRef inAnalysisProperties) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKIndexRef SKIndexOpenWithURL( CFURLRef inURL, CFStringRef inIndexName, Boolean inWriteAccess) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKIndexRef SKIndexCreateWithMutableData( CFMutableDataRef inData, CFStringRef inIndexName, SKIndexType inIndexType, CFDictionaryRef inAnalysisProperties) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKIndexRef SKIndexOpenWithData( CFDataRef inData, CFStringRef inIndexName) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKIndexRef SKIndexOpenWithMutableData( CFMutableDataRef inData, CFStringRef inIndexName) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKIndexFlush(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern void SKIndexSetMaximumBytesBeforeFlush( SKIndexRef inIndex, CFIndex inBytesForUpdate) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetMaximumBytesBeforeFlush(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKIndexCompact(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKIndexType SKIndexGetIndexType(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFDictionaryRef SKIndexGetAnalysisProperties(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetDocumentCount(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern void SKIndexClose(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); typedef CFIndex SKDocumentID; extern Boolean SKIndexAddDocumentWithText( SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inDocumentText, Boolean inCanReplace) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKIndexAddDocument( SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inMIMETypeHint, Boolean inCanReplace) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKIndexRemoveDocument( SKIndexRef inIndex, SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFDictionaryRef SKIndexCopyDocumentProperties( SKIndexRef inIndex, SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern void SKIndexSetDocumentProperties( SKIndexRef inIndex, SKDocumentRef inDocument, CFDictionaryRef inProperties) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentIndexState SKIndexGetDocumentState( SKIndexRef inIndex, SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentID SKIndexGetDocumentID( SKIndexRef inIndex, SKDocumentRef inDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentRef SKIndexCopyDocumentForDocumentID( SKIndexRef inIndex, SKDocumentID inDocumentID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKIndexRenameDocument( SKIndexRef inIndex, SKDocumentRef inDocument, CFStringRef inNewName) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKIndexMoveDocument( SKIndexRef inIndex, SKDocumentRef inDocument, SKDocumentRef inNewParent) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKIndexDocumentIteratorRef SKIndexDocumentIteratorCreate( SKIndexRef inIndex, SKDocumentRef inParentDocument) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentRef SKIndexDocumentIteratorCopyNext(SKIndexDocumentIteratorRef inIterator) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern SKDocumentID SKIndexGetMaximumDocumentID(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetDocumentTermCount( SKIndexRef inIndex, SKDocumentID inDocumentID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFArrayRef SKIndexCopyTermIDArrayForDocumentID( SKIndexRef inIndex, SKDocumentID inDocumentID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetDocumentTermFrequency( SKIndexRef inIndex, SKDocumentID inDocumentID, CFIndex inTermID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetMaximumTermID(SKIndexRef inIndex) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetTermDocumentCount( SKIndexRef inIndex, CFIndex inTermID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFArrayRef SKIndexCopyDocumentIDArrayForTermID( SKIndexRef inIndex, CFIndex inTermID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKIndexCopyTermStringForTermID( SKIndexRef inIndex, CFIndex inTermID) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKIndexGetTermIDForTermString( SKIndexRef inIndex, CFStringRef inTermString) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); extern void SKLoadDefaultExtractorPlugIns(void) __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(macCatalyst,unavailable))); } extern "C" { typedef struct __SKSearch* SKSearchRef; extern CFTypeID SKSearchGetTypeID(void) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); typedef UInt32 SKSearchOptions; enum { kSKSearchOptionDefault = 0, kSKSearchOptionNoRelevanceScores = 1L << 0, kSKSearchOptionSpaceMeansOR = 1L << 1, kSKSearchOptionFindSimilar = 1L << 2 }; extern SKSearchRef SKSearchCreate( SKIndexRef inIndex, CFStringRef inQuery, SKSearchOptions inSearchOptions) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern void SKSearchCancel(SKSearchRef inSearch) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern Boolean SKSearchFindMatches( SKSearchRef inSearch, CFIndex inMaximumCount, SKDocumentID * outDocumentIDsArray, float * outScoresArray, CFTimeInterval maximumTime, CFIndex * outFoundCount) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern void SKIndexCopyInfoForDocumentIDs( SKIndexRef inIndex, CFIndex inCount, SKDocumentID * inDocumentIDsArray, CFStringRef * outNamesArray, SKDocumentID * outParentIDsArray) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern void SKIndexCopyDocumentRefsForDocumentIDs( SKIndexRef inIndex, CFIndex inCount, SKDocumentID * inDocumentIDsArray, SKDocumentRef * outDocumentRefsArray) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern void SKIndexCopyDocumentURLsForDocumentIDs( SKIndexRef inIndex, CFIndex inCount, SKDocumentID * inDocumentIDsArray, CFURLRef * outDocumentURLsArray) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __SKSearchGroup* SKSearchGroupRef; extern CFTypeID SKSearchGroupGetTypeID(void) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); typedef struct __SKSearchResults* SKSearchResultsRef; extern CFTypeID SKSearchResultsGetTypeID(void) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); enum SKSearchType { kSKSearchRanked = 0, kSKSearchBooleanRanked = 1, kSKSearchRequiredRanked = 2, kSKSearchPrefixRanked = 3 }; typedef enum SKSearchType SKSearchType; typedef Boolean ( * SKSearchResultsFilterCallBack)(SKIndexRef inIndex, SKDocumentRef inDocument, void *inContext); extern SKSearchGroupRef SKSearchGroupCreate(CFArrayRef inArrayOfInIndexes) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern CFArrayRef SKSearchGroupCopyIndexes(SKSearchGroupRef inSearchGroup) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern SKSearchResultsRef SKSearchResultsCreateWithQuery( SKSearchGroupRef inSearchGroup, CFStringRef inQuery, SKSearchType inSearchType, CFIndex inMaxFoundDocuments, void * inContext, SKSearchResultsFilterCallBack inFilterCallBack) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern SKSearchResultsRef SKSearchResultsCreateWithDocuments( SKSearchGroupRef inSearchGroup, CFArrayRef inExampleDocuments, CFIndex inMaxFoundDocuments, void * inContext, SKSearchResultsFilterCallBack inFilterCallBack) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKSearchResultsGetCount(SKSearchResultsRef inSearchResults) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKSearchResultsGetInfoInRange( SKSearchResultsRef inSearchResults, CFRange inRange, SKDocumentRef * outDocumentsArray, SKIndexRef * outIndexesArray, float * outScoresArray) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); extern CFArrayRef SKSearchResultsCopyMatchingTerms( SKSearchResultsRef inSearchResults, CFIndex inItem) __attribute__((availability(macos,introduced=10.3,deprecated=10.4,message="No longer supported"))) __attribute__((availability(macCatalyst,unavailable))); } extern "C" { typedef struct __SKSummary* SKSummaryRef; extern CFTypeID SKSummaryGetTypeID(void) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern SKSummaryRef SKSummaryCreateWithString(CFStringRef inString) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKSummaryGetSentenceCount(SKSummaryRef summary) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKSummaryGetParagraphCount(SKSummaryRef summary) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKSummaryCopySentenceAtIndex( SKSummaryRef summary, CFIndex i) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKSummaryCopyParagraphAtIndex( SKSummaryRef summary, CFIndex i) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKSummaryCopySentenceSummaryString( SKSummaryRef summary, CFIndex numSentences) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFStringRef SKSummaryCopyParagraphSummaryString( SKSummaryRef summary, CFIndex numParagraphs) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKSummaryGetSentenceSummaryInfo( SKSummaryRef summary, CFIndex numSentencesInSummary, CFIndex * outRankOrderOfSentences, CFIndex * outSentenceIndexOfSentences, CFIndex * outParagraphIndexOfSentences) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); extern CFIndex SKSummaryGetParagraphSummaryInfo( SKSummaryRef summary, CFIndex numParagraphsInSummary, CFIndex * outRankOrderOfParagraphs, CFIndex * outParagraphIndexOfParagraphs) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(macCatalyst,unavailable))); } extern "C" { #pragma clang assume_nonnull begin #pragma pack(push, 2) typedef UInt32 FSEventStreamCreateFlags; enum { kFSEventStreamCreateFlagNone = 0x00000000, kFSEventStreamCreateFlagUseCFTypes = 0x00000001, kFSEventStreamCreateFlagNoDefer = 0x00000002, kFSEventStreamCreateFlagWatchRoot = 0x00000004, kFSEventStreamCreateFlagIgnoreSelf __attribute__((availability(macosx,introduced=10.6))) = 0x00000008, kFSEventStreamCreateFlagFileEvents __attribute__((availability(macosx,introduced=10.7))) = 0x00000010, kFSEventStreamCreateFlagMarkSelf __attribute__((availability(macosx,introduced=10.9))) = 0x00000020, kFSEventStreamCreateFlagUseExtendedData __attribute__((availability(macosx,introduced=10.13))) = 0x00000040, kFSEventStreamCreateFlagFullHistory __attribute__((availability(macosx,introduced=10.15))) = 0x00000080, }; typedef UInt32 FSEventStreamEventFlags; enum { kFSEventStreamEventFlagNone = 0x00000000, kFSEventStreamEventFlagMustScanSubDirs = 0x00000001, kFSEventStreamEventFlagUserDropped = 0x00000002, kFSEventStreamEventFlagKernelDropped = 0x00000004, kFSEventStreamEventFlagEventIdsWrapped = 0x00000008, kFSEventStreamEventFlagHistoryDone = 0x00000010, kFSEventStreamEventFlagRootChanged = 0x00000020, kFSEventStreamEventFlagMount = 0x00000040, kFSEventStreamEventFlagUnmount = 0x00000080, kFSEventStreamEventFlagItemCreated __attribute__((availability(macosx,introduced=10.7))) = 0x00000100, kFSEventStreamEventFlagItemRemoved __attribute__((availability(macosx,introduced=10.7))) = 0x00000200, kFSEventStreamEventFlagItemInodeMetaMod __attribute__((availability(macosx,introduced=10.7))) = 0x00000400, kFSEventStreamEventFlagItemRenamed __attribute__((availability(macosx,introduced=10.7))) = 0x00000800, kFSEventStreamEventFlagItemModified __attribute__((availability(macosx,introduced=10.7))) = 0x00001000, kFSEventStreamEventFlagItemFinderInfoMod __attribute__((availability(macosx,introduced=10.7))) = 0x00002000, kFSEventStreamEventFlagItemChangeOwner __attribute__((availability(macosx,introduced=10.7))) = 0x00004000, kFSEventStreamEventFlagItemXattrMod __attribute__((availability(macosx,introduced=10.7))) = 0x00008000, kFSEventStreamEventFlagItemIsFile __attribute__((availability(macosx,introduced=10.7))) = 0x00010000, kFSEventStreamEventFlagItemIsDir __attribute__((availability(macosx,introduced=10.7))) = 0x00020000, kFSEventStreamEventFlagItemIsSymlink __attribute__((availability(macosx,introduced=10.7))) = 0x00040000, kFSEventStreamEventFlagOwnEvent __attribute__((availability(macosx,introduced=10.9))) = 0x00080000, kFSEventStreamEventFlagItemIsHardlink __attribute__((availability(macosx,introduced=10.10))) = 0x00100000, kFSEventStreamEventFlagItemIsLastHardlink __attribute__((availability(macosx,introduced=10.10))) = 0x00200000, kFSEventStreamEventFlagItemCloned __attribute__((availability(macosx,introduced=10.13))) = 0x00400000 }; typedef UInt64 FSEventStreamEventId; enum { kFSEventStreamEventIdSinceNow = 0xFFFFFFFFFFFFFFFFULL }; typedef struct __FSEventStream* FSEventStreamRef; typedef const struct __FSEventStream* ConstFSEventStreamRef; struct FSEventStreamContext { CFIndex version; void * _Nullable info; CFAllocatorRetainCallBack _Nullable retain; CFAllocatorReleaseCallBack _Nullable release; CFAllocatorCopyDescriptionCallBack _Nullable copyDescription; }; typedef struct FSEventStreamContext FSEventStreamContext; typedef void ( * FSEventStreamCallback)(ConstFSEventStreamRef streamRef, void * _Nullable clientCallBackInfo, size_t numEvents, void *eventPaths, const FSEventStreamEventFlags * _Nonnull eventFlags, const FSEventStreamEventId * _Nonnull eventIds); extern FSEventStreamRef _Nullable FSEventStreamCreate( CFAllocatorRef _Nullable allocator, FSEventStreamCallback callback, FSEventStreamContext * _Nullable context, CFArrayRef pathsToWatch, FSEventStreamEventId sinceWhen, CFTimeInterval latency, FSEventStreamCreateFlags flags) __attribute__((availability(macosx,introduced=10.5))); extern FSEventStreamRef _Nullable FSEventStreamCreateRelativeToDevice( CFAllocatorRef _Nullable allocator, FSEventStreamCallback callback, FSEventStreamContext * _Nullable context, dev_t deviceToWatch, CFArrayRef pathsToWatchRelativeToDevice, FSEventStreamEventId sinceWhen, CFTimeInterval latency, FSEventStreamCreateFlags flags) __attribute__((availability(macosx,introduced=10.5))); extern FSEventStreamEventId FSEventStreamGetLatestEventId(ConstFSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern dev_t FSEventStreamGetDeviceBeingWatched(ConstFSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern __attribute__((cf_returns_retained)) CFArrayRef FSEventStreamCopyPathsBeingWatched(ConstFSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern FSEventStreamEventId FSEventsGetCurrentEventId(void) __attribute__((availability(macosx,introduced=10.5))); extern __attribute__((cf_returns_retained)) CFUUIDRef _Nullable FSEventsCopyUUIDForDevice(dev_t dev) __attribute__((availability(macosx,introduced=10.5))); extern FSEventStreamEventId FSEventsGetLastEventIdForDeviceBeforeTime( dev_t dev, CFAbsoluteTime time) __attribute__((availability(macosx,introduced=10.5))); extern Boolean FSEventsPurgeEventsForDeviceUpToEventId( dev_t dev, FSEventStreamEventId eventId) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamRetain(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamRelease(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamScheduleWithRunLoop( FSEventStreamRef streamRef, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamUnscheduleFromRunLoop( FSEventStreamRef streamRef, CFRunLoopRef runLoop, CFStringRef runLoopMode) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamSetDispatchQueue( FSEventStreamRef streamRef, dispatch_queue_t _Nullable q) __attribute__((availability(macosx,introduced=10.6))); extern void FSEventStreamInvalidate(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern Boolean FSEventStreamStart(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern FSEventStreamEventId FSEventStreamFlushAsync(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamFlushSync(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamStop(FSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern void FSEventStreamShow(ConstFSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern __attribute__((cf_returns_retained)) CFStringRef FSEventStreamCopyDescription(ConstFSEventStreamRef streamRef) __attribute__((availability(macosx,introduced=10.5))); extern Boolean FSEventStreamSetExclusionPaths(FSEventStreamRef streamRef, CFArrayRef pathsToExclude) __attribute__((availability(macosx,introduced=10.9))); #pragma pack(pop) #pragma clang assume_nonnull end } #pragma clang assume_nonnull begin extern "C" { typedef struct OpaqueLSSharedFileListRef* LSSharedFileListRef; typedef struct OpaqueLSSharedFileListItemRef* LSSharedFileListItemRef; extern CFStringRef kLSSharedFileListFavoriteVolumes __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListFavoriteItems __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListRecentApplicationItems __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListRecentDocumentItems __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListRecentServerItems __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListSessionLoginItems __attribute__((availability(macos,introduced=10.5,deprecated=10.11,replacement="Use a LaunchAgent, XPCService or the ServiceManagement APIs instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListGlobalLoginItems __attribute__((availability(macos,introduced=10.5,deprecated=10.9,replacement="Use a LaunchAgent instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListRecentItemsMaxAmount __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListVolumesComputerVisible __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListVolumesIDiskVisible __attribute__((availability(macos,introduced=10.5,deprecated=10.8,message="iDisk is no longer available"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListVolumesNetworkVisible __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern LSSharedFileListItemRef kLSSharedFileListItemBeforeFirst __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern LSSharedFileListItemRef kLSSharedFileListItemLast __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListItemHidden __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef kLSSharedFileListLoginItemHidden __attribute__((availability(macos,introduced=10.6,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); typedef UInt32 LSSharedFileListResolutionFlags; enum { kLSSharedFileListNoUserInteraction = 1 << 0, kLSSharedFileListDoNotMountVolumes = 1 << 1 }; typedef void ( * LSSharedFileListChangedProcPtr)(LSSharedFileListRef inList, void *context); extern CFTypeID LSSharedFileListGetTypeID(void) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeID LSSharedFileListItemGetTypeID(void) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern LSSharedFileListRef _Nullable LSSharedFileListCreate( CFAllocatorRef _Nullable inAllocator, CFStringRef inListType, CFTypeRef _Nullable listOptions) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListSetAuthorization( LSSharedFileListRef inList, AuthorizationRef inAuthorization) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void LSSharedFileListAddObserver( LSSharedFileListRef _Nullable inList, CFRunLoopRef inRunloop, CFStringRef inRunloopMode, LSSharedFileListChangedProcPtr callback, void * _Nullable context) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern void LSSharedFileListRemoveObserver( LSSharedFileListRef inList, CFRunLoopRef inRunloop, CFStringRef inRunloopMode, LSSharedFileListChangedProcPtr callback, void * _Nullable context) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern UInt32 LSSharedFileListGetSeedValue(LSSharedFileListRef inList) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeRef _Nullable LSSharedFileListCopyProperty( LSSharedFileListRef inList, CFStringRef inPropertyName) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListSetProperty( LSSharedFileListRef inList, CFStringRef inPropertyName, CFTypeRef _Nullable inPropertyData) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFArrayRef _Nullable LSSharedFileListCopySnapshot( LSSharedFileListRef inList, UInt32 * _Nullable outSnapshotSeed) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern LSSharedFileListItemRef _Nullable LSSharedFileListInsertItemURL( LSSharedFileListRef inList, LSSharedFileListItemRef insertAfterThisItem, CFStringRef _Nullable inDisplayName, IconRef _Nullable inIconRef, CFURLRef inURL, CFDictionaryRef _Nullable inPropertiesToSet, CFArrayRef _Nullable inPropertiesToClear) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern LSSharedFileListItemRef LSSharedFileListInsertItemFSRef( LSSharedFileListRef inList, LSSharedFileListItemRef insertAfterThisItem, CFStringRef _Nullable inDisplayName, IconRef _Nullable inIconRef, const FSRef * inFSRef, CFDictionaryRef _Nullable inPropertiesToSet, CFArrayRef _Nullable inPropertiesToClear) __attribute__((availability(macos,introduced=10.5,deprecated=10.10,replacement="LSSharedFileListInsertItemURL"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListItemMove( LSSharedFileListRef inList, LSSharedFileListItemRef inItem, LSSharedFileListItemRef inMoveAfterItem) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListItemRemove( LSSharedFileListRef inList, LSSharedFileListItemRef inItem) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListRemoveAllItems(LSSharedFileListRef inList) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern UInt32 LSSharedFileListItemGetID(LSSharedFileListItemRef inItem) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern IconRef LSSharedFileListItemCopyIconRef(LSSharedFileListItemRef inItem) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFStringRef LSSharedFileListItemCopyDisplayName(LSSharedFileListItemRef inItem) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListItemResolve( LSSharedFileListItemRef inItem, LSSharedFileListResolutionFlags inFlags, CFURLRef _Nullable * _Nullable outURL, FSRef * _Nullable outRef) __attribute__((availability(macos,introduced=10.5,deprecated=10.10,replacement="LSSharedFileListItemCopyResolvedURL"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFURLRef _Nullable LSSharedFileListItemCopyResolvedURL( LSSharedFileListItemRef inItem, LSSharedFileListResolutionFlags inFlags, CFErrorRef _Nullable * _Nullable outError) __attribute__((availability(macos,introduced=10.10,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern CFTypeRef _Nullable LSSharedFileListItemCopyProperty( LSSharedFileListItemRef inItem, CFStringRef inPropertyName) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); extern OSStatus LSSharedFileListItemSetProperty( LSSharedFileListItemRef inItem, CFStringRef inPropertyName, CFTypeRef inPropertyData) __attribute__((availability(macos,introduced=10.5,deprecated=10.11,message="No longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((availability(watchos,unavailable))); } #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin extern "C" NSErrorDomain const NSURLErrorDomain; extern "C" NSString * const NSURLErrorFailingURLErrorKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLErrorFailingURLStringErrorKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSErrorFailingURLStringKey __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message="Use NSURLErrorFailingURLStringErrorKey instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=4.0,message="Use NSURLErrorFailingURLStringErrorKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLErrorFailingURLStringErrorKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLErrorFailingURLStringErrorKey instead"))); extern "C" NSString * const NSURLErrorFailingURLPeerTrustErrorKey __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSURLErrorBackgroundTaskCancelledReasonKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); enum { NSURLErrorCancelledReasonUserForceQuitApplication = 0, NSURLErrorCancelledReasonBackgroundUpdatesDisabled = 1, NSURLErrorCancelledReasonInsufficientSystemResources __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 2, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSErrorUserInfoKey const NSURLErrorNetworkUnavailableReasonKey __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); typedef NSInteger NSURLErrorNetworkUnavailableReason; enum { NSURLErrorNetworkUnavailableReasonCellular = 0, NSURLErrorNetworkUnavailableReasonExpensive = 1, NSURLErrorNetworkUnavailableReasonConstrained = 2, } __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); enum { NSURLErrorUnknown = -1, NSURLErrorCancelled = -999, NSURLErrorBadURL = -1000, NSURLErrorTimedOut = -1001, NSURLErrorUnsupportedURL = -1002, NSURLErrorCannotFindHost = -1003, NSURLErrorCannotConnectToHost = -1004, NSURLErrorNetworkConnectionLost = -1005, NSURLErrorDNSLookupFailed = -1006, NSURLErrorHTTPTooManyRedirects = -1007, NSURLErrorResourceUnavailable = -1008, NSURLErrorNotConnectedToInternet = -1009, NSURLErrorRedirectToNonExistentLocation = -1010, NSURLErrorBadServerResponse = -1011, NSURLErrorUserCancelledAuthentication = -1012, NSURLErrorUserAuthenticationRequired = -1013, NSURLErrorZeroByteResource = -1014, NSURLErrorCannotDecodeRawData = -1015, NSURLErrorCannotDecodeContentData = -1016, NSURLErrorCannotParseResponse = -1017, NSURLErrorAppTransportSecurityRequiresSecureConnection __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1022, NSURLErrorFileDoesNotExist = -1100, NSURLErrorFileIsDirectory = -1101, NSURLErrorNoPermissionsToReadFile = -1102, NSURLErrorDataLengthExceedsMaximum __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1103, NSURLErrorFileOutsideSafeArea __attribute__((availability(macos,introduced=10.12.4))) __attribute__((availability(ios,introduced=10.3))) __attribute__((availability(watchos,introduced=3.2))) __attribute__((availability(tvos,introduced=10.2))) = -1104, NSURLErrorSecureConnectionFailed = -1200, NSURLErrorServerCertificateHasBadDate = -1201, NSURLErrorServerCertificateUntrusted = -1202, NSURLErrorServerCertificateHasUnknownRoot = -1203, NSURLErrorServerCertificateNotYetValid = -1204, NSURLErrorClientCertificateRejected = -1205, NSURLErrorClientCertificateRequired = -1206, NSURLErrorCannotLoadFromNetwork = -2000, NSURLErrorCannotCreateFile = -3000, NSURLErrorCannotOpenFile = -3001, NSURLErrorCannotCloseFile = -3002, NSURLErrorCannotWriteToFile = -3003, NSURLErrorCannotRemoveFile = -3004, NSURLErrorCannotMoveFile = -3005, NSURLErrorDownloadDecodingFailedMidStream = -3006, NSURLErrorDownloadDecodingFailedToComplete =-3007, NSURLErrorInternationalRoamingOff __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1018, NSURLErrorCallIsActive __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1019, NSURLErrorDataNotAllowed __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1020, NSURLErrorRequestBodyStreamExhausted __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -1021, NSURLErrorBackgroundSessionRequiresSharedContainer __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -995, NSURLErrorBackgroundSessionInUseByAnotherProcess __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = -996, NSURLErrorBackgroundSessionWasDisconnected __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0)))= -997, }; #pragma clang assume_nonnull end // @class NSCachedURLResponse; #ifndef _REWRITER_typedef_NSCachedURLResponse #define _REWRITER_typedef_NSCachedURLResponse typedef struct objc_object NSCachedURLResponse; typedef struct {} _objc_exc_NSCachedURLResponse; #endif // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @class NSMutableURLRequest; #ifndef _REWRITER_typedef_NSMutableURLRequest #define _REWRITER_typedef_NSMutableURLRequest typedef struct objc_object NSMutableURLRequest; typedef struct {} _objc_exc_NSMutableURLRequest; #endif // @class NSURLAuthenticationChallenge; #ifndef _REWRITER_typedef_NSURLAuthenticationChallenge #define _REWRITER_typedef_NSURLAuthenticationChallenge typedef struct objc_object NSURLAuthenticationChallenge; typedef struct {} _objc_exc_NSURLAuthenticationChallenge; #endif // @class NSURLConnection; #ifndef _REWRITER_typedef_NSURLConnection #define _REWRITER_typedef_NSURLConnection typedef struct objc_object NSURLConnection; typedef struct {} _objc_exc_NSURLConnection; #endif // @class NSURLProtocol; #ifndef _REWRITER_typedef_NSURLProtocol #define _REWRITER_typedef_NSURLProtocol typedef struct objc_object NSURLProtocol; typedef struct {} _objc_exc_NSURLProtocol; #endif // @class NSURLProtocolInternal; #ifndef _REWRITER_typedef_NSURLProtocolInternal #define _REWRITER_typedef_NSURLProtocolInternal typedef struct objc_object NSURLProtocolInternal; typedef struct {} _objc_exc_NSURLProtocolInternal; #endif // @class NSURLRequest; #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif // @class NSURLResponse; #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif // @class NSURLSessionTask; #ifndef _REWRITER_typedef_NSURLSessionTask #define _REWRITER_typedef_NSURLSessionTask typedef struct objc_object NSURLSessionTask; typedef struct {} _objc_exc_NSURLSessionTask; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLProtocolClient <NSObject> // - (void)URLProtocol:(NSURLProtocol *)protocol wasRedirectedToRequest:(NSURLRequest *)request redirectResponse:(NSURLResponse *)redirectResponse; // - (void)URLProtocol:(NSURLProtocol *)protocol cachedResponseIsValid:(NSCachedURLResponse *)cachedResponse; // - (void)URLProtocol:(NSURLProtocol *)protocol didReceiveResponse:(NSURLResponse *)response cacheStoragePolicy:(NSURLCacheStoragePolicy)policy; // - (void)URLProtocol:(NSURLProtocol *)protocol didLoadData:(NSData *)data; // - (void)URLProtocolDidFinishLoading:(NSURLProtocol *)protocol; // - (void)URLProtocol:(NSURLProtocol *)protocol didFailWithError:(NSError *)error; // - (void)URLProtocol:(NSURLProtocol *)protocol didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (void)URLProtocol:(NSURLProtocol *)protocol didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLProtocol #define _REWRITER_typedef_NSURLProtocol typedef struct objc_object NSURLProtocol; typedef struct {} _objc_exc_NSURLProtocol; #endif struct NSURLProtocol_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLProtocolInternal *_internal; }; // - (instancetype)initWithRequest:(NSURLRequest *)request cachedResponse:(nullable NSCachedURLResponse *)cachedResponse client:(nullable id <NSURLProtocolClient>)client __attribute__((objc_designated_initializer)); // @property (nullable, readonly, retain) id <NSURLProtocolClient> client; // @property (readonly, copy) NSURLRequest *request; // @property (nullable, readonly, copy) NSCachedURLResponse *cachedResponse; // + (BOOL)canInitWithRequest:(NSURLRequest *)request; // + (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request; // + (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b; // - (void)startLoading; // - (void)stopLoading; // + (nullable id)propertyForKey:(NSString *)key inRequest:(NSURLRequest *)request; // + (void)setProperty:(id)value forKey:(NSString *)key inRequest:(NSMutableURLRequest *)request; // + (void)removePropertyForKey:(NSString *)key inRequest:(NSMutableURLRequest *)request; // + (BOOL)registerClass:(Class)protocolClass; // + (void)unregisterClass:(Class)protocolClass; /* @end */ // @interface NSURLProtocol (NSURLSessionTaskAdditions) // + (BOOL)canInitWithTask:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithTask:(NSURLSessionTask *)task cachedResponse:(nullable NSCachedURLResponse *)cachedResponse client:(nullable id <NSURLProtocolClient>)client __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSURLSessionTask *task __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSInputStream; #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @class NSURLRequestInternal; #ifndef _REWRITER_typedef_NSURLRequestInternal #define _REWRITER_typedef_NSURLRequestInternal typedef struct objc_object NSURLRequestInternal; typedef struct {} _objc_exc_NSURLRequestInternal; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSURLRequestCachePolicy; enum { NSURLRequestUseProtocolCachePolicy = 0, NSURLRequestReloadIgnoringLocalCacheData = 1, NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReturnCacheDataElseLoad = 2, NSURLRequestReturnCacheDataDontLoad = 3, NSURLRequestReloadRevalidatingCacheData = 5, }; typedef NSUInteger NSURLRequestNetworkServiceType; enum { NSURLNetworkServiceTypeDefault = 0, NSURLNetworkServiceTypeVoIP __attribute__((availability(macos,introduced=10.7,deprecated=10.15,message="Use PushKit for VoIP control purposes"))) __attribute__((availability(ios,introduced=4.0,deprecated=13.0,message="Use PushKit for VoIP control purposes"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Use PushKit for VoIP control purposes"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Use PushKit for VoIP control purposes"))) = 1, NSURLNetworkServiceTypeVideo = 2, NSURLNetworkServiceTypeBackground = 3, NSURLNetworkServiceTypeVoice = 4, NSURLNetworkServiceTypeResponsiveData = 6, NSURLNetworkServiceTypeAVStreaming __attribute__((availability(macosx,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 8 , NSURLNetworkServiceTypeResponsiveAV __attribute__((availability(macosx,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 9, NSURLNetworkServiceTypeCallSignaling __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) = 11, }; typedef NSUInteger NSURLRequestAttribution; enum { NSURLRequestAttributionDeveloper = 0, NSURLRequestAttributionUser = 1, } __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif struct NSURLRequest_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLRequestInternal *_internal; }; // + (instancetype)requestWithURL:(NSURL *)URL; @property (class, readonly) BOOL supportsSecureCoding; // + (instancetype)requestWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval; // - (instancetype)initWithURL:(NSURL *)URL; // - (instancetype)initWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval __attribute__((objc_designated_initializer)); // @property (nullable, readonly, copy) NSURL *URL; // @property (readonly) NSURLRequestCachePolicy cachePolicy; // @property (readonly) NSTimeInterval timeoutInterval; // @property (nullable, readonly, copy) NSURL *mainDocumentURL; // @property (readonly) NSURLRequestNetworkServiceType networkServiceType __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL allowsCellularAccess __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL allowsExpensiveNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) BOOL allowsConstrainedNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) BOOL assumesHTTP3Capable __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); // @property (readonly) NSURLRequestAttribution attribution __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMutableURLRequest #define _REWRITER_typedef_NSMutableURLRequest typedef struct objc_object NSMutableURLRequest; typedef struct {} _objc_exc_NSMutableURLRequest; #endif struct NSMutableURLRequest_IMPL { struct NSURLRequest_IMPL NSURLRequest_IVARS; }; // @property (nullable, copy) NSURL *URL; // @property NSURLRequestCachePolicy cachePolicy; // @property NSTimeInterval timeoutInterval; // @property (nullable, copy) NSURL *mainDocumentURL; // @property NSURLRequestNetworkServiceType networkServiceType __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property BOOL allowsCellularAccess __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property BOOL allowsExpensiveNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property BOOL allowsConstrainedNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property BOOL assumesHTTP3Capable __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); // @property NSURLRequestAttribution attribution __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); /* @end */ // @interface NSURLRequest (NSHTTPURLRequest) // @property (nullable, readonly, copy) NSString *HTTPMethod; // @property (nullable, readonly, copy) NSDictionary<NSString *, NSString *> *allHTTPHeaderFields; // - (nullable NSString *)valueForHTTPHeaderField:(NSString *)field; // @property (nullable, readonly, copy) NSData *HTTPBody; // @property (nullable, readonly, retain) NSInputStream *HTTPBodyStream; // @property (readonly) BOOL HTTPShouldHandleCookies; // @property (readonly) BOOL HTTPShouldUsePipelining __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableURLRequest (NSMutableHTTPURLRequest) // @property (copy) NSString *HTTPMethod; // @property (nullable, copy) NSDictionary<NSString *, NSString *> *allHTTPHeaderFields; // - (void)setValue:(nullable NSString *)value forHTTPHeaderField:(NSString *)field; // - (void)addValue:(NSString *)value forHTTPHeaderField:(NSString *)field; // @property (nullable, copy) NSData *HTTPBody; // @property (nullable, retain) NSInputStream *HTTPBodyStream; // @property BOOL HTTPShouldHandleCookies; // @property BOOL HTTPShouldUsePipelining __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @class NSURLRequest; #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif // @class NSURLResponseInternal; #ifndef _REWRITER_typedef_NSURLResponseInternal #define _REWRITER_typedef_NSURLResponseInternal typedef struct objc_object NSURLResponseInternal; typedef struct {} _objc_exc_NSURLResponseInternal; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif struct NSURLResponse_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLResponseInternal *_internal; }; // - (instancetype)initWithURL:(NSURL *)URL MIMEType:(nullable NSString *)MIMEType expectedContentLength:(NSInteger)length textEncodingName:(nullable NSString *)name __attribute__((objc_designated_initializer)); // @property (nullable, readonly, copy) NSURL *URL; // @property (nullable, readonly, copy) NSString *MIMEType; // @property (readonly) long long expectedContentLength; // @property (nullable, readonly, copy) NSString *textEncodingName; // @property (nullable, readonly, copy) NSString *suggestedFilename; /* @end */ // @class NSHTTPURLResponseInternal; #ifndef _REWRITER_typedef_NSHTTPURLResponseInternal #define _REWRITER_typedef_NSHTTPURLResponseInternal typedef struct objc_object NSHTTPURLResponseInternal; typedef struct {} _objc_exc_NSHTTPURLResponseInternal; #endif __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSHTTPURLResponse #define _REWRITER_typedef_NSHTTPURLResponse typedef struct objc_object NSHTTPURLResponse; typedef struct {} _objc_exc_NSHTTPURLResponse; #endif struct NSHTTPURLResponse_IMPL { struct NSURLResponse_IMPL NSURLResponse_IVARS; NSHTTPURLResponseInternal *_httpInternal; }; // - (nullable instancetype)initWithURL:(NSURL *)url statusCode:(NSInteger)statusCode HTTPVersion:(nullable NSString *)HTTPVersion headerFields:(nullable NSDictionary<NSString *, NSString *> *)headerFields __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) NSInteger statusCode; // @property (readonly, copy) NSDictionary *allHeaderFields; // - (nullable NSString *)valueForHTTPHeaderField:(NSString *)field __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // + (NSString *)localizedStringForStatusCode:(NSInteger)statusCode; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #pragma clang assume_nonnull begin extern "C" NSString * const NSGlobalDomain; extern "C" NSString * const NSArgumentDomain; extern "C" NSString * const NSRegistrationDomain; #ifndef _REWRITER_typedef_NSUserDefaults #define _REWRITER_typedef_NSUserDefaults typedef struct objc_object NSUserDefaults; typedef struct {} _objc_exc_NSUserDefaults; #endif struct NSUserDefaults_IMPL { struct NSObject_IMPL NSObject_IVARS; id _kvo_; CFStringRef _identifier_; CFStringRef _container_; void *_reserved[2]; }; @property (class, readonly, strong) NSUserDefaults *standardUserDefaults; // + (void)resetStandardUserDefaults; // - (instancetype)init; // - (nullable instancetype)initWithSuiteName:(nullable NSString *)suitename __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((objc_designated_initializer)); // - (nullable id)initWithUser:(NSString *)username __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Use -init instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Use -init instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use -init instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use -init instead"))); // - (nullable id)objectForKey:(NSString *)defaultName; // - (void)setObject:(nullable id)value forKey:(NSString *)defaultName; // - (void)removeObjectForKey:(NSString *)defaultName; // - (nullable NSString *)stringForKey:(NSString *)defaultName; // - (nullable NSArray *)arrayForKey:(NSString *)defaultName; // - (nullable NSDictionary<NSString *, id> *)dictionaryForKey:(NSString *)defaultName; // - (nullable NSData *)dataForKey:(NSString *)defaultName; // - (nullable NSArray<NSString *> *)stringArrayForKey:(NSString *)defaultName; // - (NSInteger)integerForKey:(NSString *)defaultName; // - (float)floatForKey:(NSString *)defaultName; // - (double)doubleForKey:(NSString *)defaultName; // - (BOOL)boolForKey:(NSString *)defaultName; // - (nullable NSURL *)URLForKey:(NSString *)defaultName __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName; // - (void)setFloat:(float)value forKey:(NSString *)defaultName; // - (void)setDouble:(double)value forKey:(NSString *)defaultName; // - (void)setBool:(BOOL)value forKey:(NSString *)defaultName; // - (void)setURL:(nullable NSURL *)url forKey:(NSString *)defaultName __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)registerDefaults:(NSDictionary<NSString *, id> *)registrationDictionary; // - (void)addSuiteNamed:(NSString *)suiteName; // - (void)removeSuiteNamed:(NSString *)suiteName; // - (NSDictionary<NSString *, id> *)dictionaryRepresentation; // @property (readonly, copy) NSArray<NSString *> *volatileDomainNames; // - (NSDictionary<NSString *, id> *)volatileDomainForName:(NSString *)domainName; // - (void)setVolatileDomain:(NSDictionary<NSString *, id> *)domain forName:(NSString *)domainName; // - (void)removeVolatileDomainForName:(NSString *)domainName; // - (NSArray *)persistentDomainNames __attribute__((availability(macos,introduced=10.0,deprecated=10.9,message="Not recommended"))) __attribute__((availability(ios,introduced=2.0,deprecated=7.0,message="Not recommended"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not recommended"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not recommended"))); // - (nullable NSDictionary<NSString *, id> *)persistentDomainForName:(NSString *)domainName; // - (void)setPersistentDomain:(NSDictionary<NSString *, id> *)domain forName:(NSString *)domainName; // - (void)removePersistentDomainForName:(NSString *)domainName; // - (BOOL)synchronize; // - (BOOL)objectIsForcedForKey:(NSString *)key; // - (BOOL)objectIsForcedForKey:(NSString *)key inDomain:(NSString *)domain; /* @end */ extern "C" NSNotificationName const NSUserDefaultsSizeLimitExceededNotification __attribute__((availability(ios,introduced=9.3))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSNotificationName const NSUbiquitousUserDefaultsNoCloudAccountNotification __attribute__((availability(ios,introduced=9.3))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSNotificationName const NSUbiquitousUserDefaultsDidChangeAccountsNotification __attribute__((availability(ios,introduced=9.3))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSNotificationName const NSUbiquitousUserDefaultsCompletedInitialSyncNotification __attribute__((availability(ios,introduced=9.3))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSNotificationName const NSUserDefaultsDidChangeNotification; extern "C" NSString * const NSWeekDayNameArray __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSShortWeekDayNameArray __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMonthNameArray __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSShortMonthNameArray __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSTimeFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSDateFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSTimeDateFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSShortTimeDateFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSCurrencySymbol __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSDecimalSeparator __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSThousandsSeparator __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSDecimalDigits __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSAMPMDesignation __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSHourNameDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSYearMonthWeekDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSEarlierTimeDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSLaterTimeDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSThisDayDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSNextDayDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSNextNextDayDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSPriorDayDesignations __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSDateTimeOrdering __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSInternationalCurrencyString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSShortDateFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSPositiveCurrencyFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSNegativeCurrencyFormatString __attribute__((availability(macos,introduced=10.0,deprecated=10.5,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef NSString *NSValueTransformerName __attribute__((swift_wrapper(struct))); extern "C" NSValueTransformerName const NSNegateBooleanTransformerName __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSValueTransformerName const NSIsNilTransformerName __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSValueTransformerName const NSIsNotNilTransformerName __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSValueTransformerName const NSUnarchiveFromDataTransformerName __attribute__((availability(macos,introduced=10.3,deprecated=10.14,replacement="NSSecureUnarchiveFromDataTransformerName"))) __attribute__((availability(ios,introduced=3.0,deprecated=12.0,replacement="NSSecureUnarchiveFromDataTransformerName"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,replacement="NSSecureUnarchiveFromDataTransformerName"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,replacement="NSSecureUnarchiveFromDataTransformerName"))); extern "C" NSValueTransformerName const NSKeyedUnarchiveFromDataTransformerName __attribute__((availability(macos,introduced=10.3,deprecated=10.14,replacement="NSSecureUnarchiveFromDataTransformerName"))) __attribute__((availability(ios,introduced=3.0,deprecated=12.0,replacement="NSSecureUnarchiveFromDataTransformerName"))) __attribute__((availability(watchos,introduced=2.0,deprecated=5.0,replacement="NSSecureUnarchiveFromDataTransformerName"))) __attribute__((availability(tvos,introduced=9.0,deprecated=12.0,replacement="NSSecureUnarchiveFromDataTransformerName"))); extern "C" NSValueTransformerName const NSSecureUnarchiveFromDataTransformerName __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))); __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSValueTransformer #define _REWRITER_typedef_NSValueTransformer typedef struct objc_object NSValueTransformer; typedef struct {} _objc_exc_NSValueTransformer; #endif struct NSValueTransformer_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (void)setValueTransformer:(nullable NSValueTransformer *)transformer forName:(NSValueTransformerName)name; // + (nullable NSValueTransformer *)valueTransformerForName:(NSValueTransformerName)name; // + (NSArray<NSValueTransformerName> *)valueTransformerNames; // + (Class)transformedValueClass; // + (BOOL)allowsReverseTransformation; // - (nullable id)transformedValue:(nullable id)value; // - (nullable id)reverseTransformedValue:(nullable id)value; /* @end */ __attribute__((availability(macos,introduced=10.14))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,introduced=12.0))) #ifndef _REWRITER_typedef_NSSecureUnarchiveFromDataTransformer #define _REWRITER_typedef_NSSecureUnarchiveFromDataTransformer typedef struct objc_object NSSecureUnarchiveFromDataTransformer; typedef struct {} _objc_exc_NSSecureUnarchiveFromDataTransformer; #endif struct NSSecureUnarchiveFromDataTransformer_IMPL { struct NSValueTransformer_IMPL NSValueTransformer_IVARS; }; @property (class, readonly, copy) NSArray<Class> *allowedTopLevelClasses; /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif // @protocol NSXMLParserDelegate; #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) typedef NSUInteger NSXMLParserExternalEntityResolvingPolicy; enum { NSXMLParserResolveExternalEntitiesNever = 0, NSXMLParserResolveExternalEntitiesNoNetwork, NSXMLParserResolveExternalEntitiesSameOriginOnly, NSXMLParserResolveExternalEntitiesAlways }; #ifndef _REWRITER_typedef_NSXMLParser #define _REWRITER_typedef_NSXMLParser typedef struct objc_object NSXMLParser; typedef struct {} _objc_exc_NSXMLParser; #endif struct NSXMLParser_IMPL { struct NSObject_IMPL NSObject_IVARS; id _reserved0; id _delegate; id _reserved1; id _reserved2; id _reserved3; }; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url; // - (instancetype)initWithData:(NSData *)data __attribute__((objc_designated_initializer)); // - (instancetype)initWithStream:(NSInputStream *)stream __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, assign) id <NSXMLParserDelegate> delegate; // @property BOOL shouldProcessNamespaces; // @property BOOL shouldReportNamespacePrefixes; // @property NSXMLParserExternalEntityResolvingPolicy externalEntityResolvingPolicy __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSSet<NSURL *> *allowedExternalEntityURLs __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)parse; // - (void)abortParsing; // @property (nullable, readonly, copy) NSError *parserError; // @property BOOL shouldResolveExternalEntities; /* @end */ // @interface NSXMLParser (NSXMLParserLocatorAdditions) // @property (nullable, readonly, copy) NSString *publicID; // @property (nullable, readonly, copy) NSString *systemID; // @property (readonly) NSInteger lineNumber; // @property (readonly) NSInteger columnNumber; /* @end */ // @protocol NSXMLParserDelegate <NSObject> /* @optional */ // - (void)parserDidStartDocument:(NSXMLParser *)parser; // - (void)parserDidEndDocument:(NSXMLParser *)parser; // - (void)parser:(NSXMLParser *)parser foundNotationDeclarationWithName:(NSString *)name publicID:(nullable NSString *)publicID systemID:(nullable NSString *)systemID; // - (void)parser:(NSXMLParser *)parser foundUnparsedEntityDeclarationWithName:(NSString *)name publicID:(nullable NSString *)publicID systemID:(nullable NSString *)systemID notationName:(nullable NSString *)notationName; // - (void)parser:(NSXMLParser *)parser foundAttributeDeclarationWithName:(NSString *)attributeName forElement:(NSString *)elementName type:(nullable NSString *)type defaultValue:(nullable NSString *)defaultValue; // - (void)parser:(NSXMLParser *)parser foundElementDeclarationWithName:(NSString *)elementName model:(NSString *)model; // - (void)parser:(NSXMLParser *)parser foundInternalEntityDeclarationWithName:(NSString *)name value:(nullable NSString *)value; // - (void)parser:(NSXMLParser *)parser foundExternalEntityDeclarationWithName:(NSString *)name publicID:(nullable NSString *)publicID systemID:(nullable NSString *)systemID; // - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(nullable NSString *)namespaceURI qualifiedName:(nullable NSString *)qName attributes:(NSDictionary<NSString *, NSString *> *)attributeDict; // - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(nullable NSString *)namespaceURI qualifiedName:(nullable NSString *)qName; // - (void)parser:(NSXMLParser *)parser didStartMappingPrefix:(NSString *)prefix toURI:(NSString *)namespaceURI; // - (void)parser:(NSXMLParser *)parser didEndMappingPrefix:(NSString *)prefix; // - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string; // - (void)parser:(NSXMLParser *)parser foundIgnorableWhitespace:(NSString *)whitespaceString; // - (void)parser:(NSXMLParser *)parser foundProcessingInstructionWithTarget:(NSString *)target data:(nullable NSString *)data; // - (void)parser:(NSXMLParser *)parser foundComment:(NSString *)comment; // - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock; // - (nullable NSData *)parser:(NSXMLParser *)parser resolveExternalEntityName:(NSString *)name systemID:(nullable NSString *)systemID; // - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError; // - (void)parser:(NSXMLParser *)parser validationErrorOccurred:(NSError *)validationError; /* @end */ extern "C" NSErrorDomain const NSXMLParserErrorDomain __attribute__((availability(macos,introduced=10.3))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSInteger NSXMLParserError; enum { NSXMLParserInternalError = 1, NSXMLParserOutOfMemoryError = 2, NSXMLParserDocumentStartError = 3, NSXMLParserEmptyDocumentError = 4, NSXMLParserPrematureDocumentEndError = 5, NSXMLParserInvalidHexCharacterRefError = 6, NSXMLParserInvalidDecimalCharacterRefError = 7, NSXMLParserInvalidCharacterRefError = 8, NSXMLParserInvalidCharacterError = 9, NSXMLParserCharacterRefAtEOFError = 10, NSXMLParserCharacterRefInPrologError = 11, NSXMLParserCharacterRefInEpilogError = 12, NSXMLParserCharacterRefInDTDError = 13, NSXMLParserEntityRefAtEOFError = 14, NSXMLParserEntityRefInPrologError = 15, NSXMLParserEntityRefInEpilogError = 16, NSXMLParserEntityRefInDTDError = 17, NSXMLParserParsedEntityRefAtEOFError = 18, NSXMLParserParsedEntityRefInPrologError = 19, NSXMLParserParsedEntityRefInEpilogError = 20, NSXMLParserParsedEntityRefInInternalSubsetError = 21, NSXMLParserEntityReferenceWithoutNameError = 22, NSXMLParserEntityReferenceMissingSemiError = 23, NSXMLParserParsedEntityRefNoNameError = 24, NSXMLParserParsedEntityRefMissingSemiError = 25, NSXMLParserUndeclaredEntityError = 26, NSXMLParserUnparsedEntityError = 28, NSXMLParserEntityIsExternalError = 29, NSXMLParserEntityIsParameterError = 30, NSXMLParserUnknownEncodingError = 31, NSXMLParserEncodingNotSupportedError = 32, NSXMLParserStringNotStartedError = 33, NSXMLParserStringNotClosedError = 34, NSXMLParserNamespaceDeclarationError = 35, NSXMLParserEntityNotStartedError = 36, NSXMLParserEntityNotFinishedError = 37, NSXMLParserLessThanSymbolInAttributeError = 38, NSXMLParserAttributeNotStartedError = 39, NSXMLParserAttributeNotFinishedError = 40, NSXMLParserAttributeHasNoValueError = 41, NSXMLParserAttributeRedefinedError = 42, NSXMLParserLiteralNotStartedError = 43, NSXMLParserLiteralNotFinishedError = 44, NSXMLParserCommentNotFinishedError = 45, NSXMLParserProcessingInstructionNotStartedError = 46, NSXMLParserProcessingInstructionNotFinishedError = 47, NSXMLParserNotationNotStartedError = 48, NSXMLParserNotationNotFinishedError = 49, NSXMLParserAttributeListNotStartedError = 50, NSXMLParserAttributeListNotFinishedError = 51, NSXMLParserMixedContentDeclNotStartedError = 52, NSXMLParserMixedContentDeclNotFinishedError = 53, NSXMLParserElementContentDeclNotStartedError = 54, NSXMLParserElementContentDeclNotFinishedError = 55, NSXMLParserXMLDeclNotStartedError = 56, NSXMLParserXMLDeclNotFinishedError = 57, NSXMLParserConditionalSectionNotStartedError = 58, NSXMLParserConditionalSectionNotFinishedError = 59, NSXMLParserExternalSubsetNotFinishedError = 60, NSXMLParserDOCTYPEDeclNotFinishedError = 61, NSXMLParserMisplacedCDATAEndStringError = 62, NSXMLParserCDATANotFinishedError = 63, NSXMLParserMisplacedXMLDeclarationError = 64, NSXMLParserSpaceRequiredError = 65, NSXMLParserSeparatorRequiredError = 66, NSXMLParserNMTOKENRequiredError = 67, NSXMLParserNAMERequiredError = 68, NSXMLParserPCDATARequiredError = 69, NSXMLParserURIRequiredError = 70, NSXMLParserPublicIdentifierRequiredError = 71, NSXMLParserLTRequiredError = 72, NSXMLParserGTRequiredError = 73, NSXMLParserLTSlashRequiredError = 74, NSXMLParserEqualExpectedError = 75, NSXMLParserTagNameMismatchError = 76, NSXMLParserUnfinishedTagError = 77, NSXMLParserStandaloneValueError = 78, NSXMLParserInvalidEncodingNameError = 79, NSXMLParserCommentContainsDoubleHyphenError = 80, NSXMLParserInvalidEncodingError = 81, NSXMLParserExternalStandaloneEntityError = 82, NSXMLParserInvalidConditionalSectionError = 83, NSXMLParserEntityValueRequiredError = 84, NSXMLParserNotWellBalancedError = 85, NSXMLParserExtraContentError = 86, NSXMLParserInvalidCharacterInEntityError = 87, NSXMLParserParsedEntityRefInInternalError = 88, NSXMLParserEntityRefLoopError = 89, NSXMLParserEntityBoundaryError = 90, NSXMLParserInvalidURIError = 91, NSXMLParserURIFragmentError = 92, NSXMLParserNoDTDError = 94, NSXMLParserDelegateAbortedParseError = 512 }; #pragma clang assume_nonnull end // @class NSMutableDictionary; #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #ifndef _REWRITER_typedef_NSLock #define _REWRITER_typedef_NSLock typedef struct objc_object NSLock; typedef struct {} _objc_exc_NSLock; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @class NSXPCConnection; #ifndef _REWRITER_typedef_NSXPCConnection #define _REWRITER_typedef_NSXPCConnection typedef struct objc_object NSXPCConnection; typedef struct {} _objc_exc_NSXPCConnection; #endif #ifndef _REWRITER_typedef_NSXPCListener #define _REWRITER_typedef_NSXPCListener typedef struct objc_object NSXPCListener; typedef struct {} _objc_exc_NSXPCListener; #endif #ifndef _REWRITER_typedef_NSXPCInterface #define _REWRITER_typedef_NSXPCInterface typedef struct objc_object NSXPCInterface; typedef struct {} _objc_exc_NSXPCInterface; #endif #ifndef _REWRITER_typedef_NSXPCListenerEndpoint #define _REWRITER_typedef_NSXPCListenerEndpoint typedef struct objc_object NSXPCListenerEndpoint; typedef struct {} _objc_exc_NSXPCListenerEndpoint; #endif // @protocol NSXPCListenerDelegate; #pragma clang assume_nonnull begin // @protocol NSXPCProxyCreating // - (id)remoteObjectProxy; // - (id)remoteObjectProxyWithErrorHandler:(void (^)(NSError *error))handler; /* @optional */ // - (id)synchronousRemoteObjectProxyWithErrorHandler:(void (^)(NSError *error))handler __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ typedef NSUInteger NSXPCConnectionOptions; enum { NSXPCConnectionPrivileged = (1 << 12UL) } __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSXPCConnection #define _REWRITER_typedef_NSXPCConnection typedef struct objc_object NSXPCConnection; typedef struct {} _objc_exc_NSXPCConnection; #endif struct NSXPCConnection_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithServiceName:(NSString *)serviceName __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, readonly, copy) NSString *serviceName; // - (instancetype)initWithMachServiceName:(NSString *)name options:(NSXPCConnectionOptions)options __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithListenerEndpoint:(NSXPCListenerEndpoint *)endpoint; // @property (readonly, retain) NSXPCListenerEndpoint *endpoint; // @property (nullable, retain) NSXPCInterface *exportedInterface; // @property (nullable, retain) id exportedObject; // @property (nullable, retain) NSXPCInterface *remoteObjectInterface; // @property (readonly, retain) id remoteObjectProxy; // - (id)remoteObjectProxyWithErrorHandler:(void (^)(NSError *error))handler; // - (id)synchronousRemoteObjectProxyWithErrorHandler:(void (^)(NSError *error))handler __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) void (^interruptionHandler)(void); // @property (nullable, copy) void (^invalidationHandler)(void); // - (void)resume; // - (void)suspend; // - (void)invalidate; // @property (readonly) au_asid_t auditSessionIdentifier; // @property (readonly) pid_t processIdentifier; // @property (readonly) uid_t effectiveUserIdentifier; // @property (readonly) gid_t effectiveGroupIdentifier; // + (nullable NSXPCConnection *)currentConnection __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)scheduleSendBarrierBlock:(void (^)(void))block __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSXPCListener #define _REWRITER_typedef_NSXPCListener typedef struct objc_object NSXPCListener; typedef struct {} _objc_exc_NSXPCListener; #endif struct NSXPCListener_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSXPCListener *)serviceListener; // + (NSXPCListener *)anonymousListener; // - (instancetype)initWithMachServiceName:(NSString *)name __attribute__((objc_designated_initializer)) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, weak) id <NSXPCListenerDelegate> delegate; // @property (readonly, retain) NSXPCListenerEndpoint *endpoint; // - (void)resume; // - (void)suspend; // - (void)invalidate; /* @end */ // @protocol NSXPCListenerDelegate <NSObject> /* @optional */ // - (BOOL)listener:(NSXPCListener *)listener shouldAcceptNewConnection:(NSXPCConnection *)newConnection; /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSXPCInterface #define _REWRITER_typedef_NSXPCInterface typedef struct objc_object NSXPCInterface; typedef struct {} _objc_exc_NSXPCInterface; #endif struct NSXPCInterface_IMPL { struct NSObject_IMPL NSObject_IVARS; Protocol *_protocol; void *_reserved2; id _reserved1; }; // + (NSXPCInterface *)interfaceWithProtocol:(Protocol *)protocol; // @property (assign) Protocol *protocol; // - (void)setClasses:(NSSet<Class> *)classes forSelector:(SEL)sel argumentIndex:(NSUInteger)arg ofReply:(BOOL)ofReply; // - (NSSet<Class> *)classesForSelector:(SEL)sel argumentIndex:(NSUInteger)arg ofReply:(BOOL)ofReply; // - (void)setInterface:(NSXPCInterface *)ifc forSelector:(SEL)sel argumentIndex:(NSUInteger)arg ofReply:(BOOL)ofReply; // - (nullable NSXPCInterface *)interfaceForSelector:(SEL)sel argumentIndex:(NSUInteger)arg ofReply:(BOOL)ofReply; // - (void)setXPCType:(xpc_type_t)type forSelector:(SEL)sel argumentIndex:(NSUInteger)arg ofReply:(BOOL)ofReply __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (nullable xpc_type_t)XPCTypeForSelector:(SEL)sel argumentIndex:(NSUInteger)arg ofReply:(BOOL)ofReply __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSXPCListenerEndpoint #define _REWRITER_typedef_NSXPCListenerEndpoint typedef struct objc_object NSXPCListenerEndpoint; typedef struct {} _objc_exc_NSXPCListenerEndpoint; #endif struct NSXPCListenerEndpoint_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_internal; }; /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSXPCCoder #define _REWRITER_typedef_NSXPCCoder typedef struct objc_object NSXPCCoder; typedef struct {} _objc_exc_NSXPCCoder; #endif struct NSXPCCoder_IMPL { struct NSCoder_IMPL NSCoder_IVARS; id _userInfo; id _reserved1; }; // - (void)encodeXPCObject:(xpc_object_t)xpcObject forKey:(NSString *)key; // - (nullable xpc_object_t)decodeXPCObjectOfType:(xpc_type_t)type forKey:(NSString *)key __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, retain) id <NSObject> userInfo; // @property (nullable, readonly, strong) NSXPCConnection *connection __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); /* @end */ #pragma clang assume_nonnull end enum { NSFileNoSuchFileError = 4, NSFileLockingError = 255, NSFileReadUnknownError = 256, NSFileReadNoPermissionError = 257, NSFileReadInvalidFileNameError = 258, NSFileReadCorruptFileError = 259, NSFileReadNoSuchFileError = 260, NSFileReadInapplicableStringEncodingError = 261, NSFileReadUnsupportedSchemeError = 262, NSFileReadTooLargeError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 263, NSFileReadUnknownStringEncodingError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 264, NSFileWriteUnknownError = 512, NSFileWriteNoPermissionError = 513, NSFileWriteInvalidFileNameError = 514, NSFileWriteFileExistsError __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 516, NSFileWriteInapplicableStringEncodingError = 517, NSFileWriteUnsupportedSchemeError = 518, NSFileWriteOutOfSpaceError = 640, NSFileWriteVolumeReadOnlyError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 642, NSFileManagerUnmountUnknownError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 768, NSFileManagerUnmountBusyError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 769, NSKeyValueValidationError = 1024, NSFormattingError = 2048, NSUserCancelledError = 3072, NSFeatureUnsupportedError __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3328, NSExecutableNotLoadableError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3584, NSExecutableArchitectureMismatchError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3585, NSExecutableRuntimeMismatchError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3586, NSExecutableLoadError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3587, NSExecutableLinkError __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3588, NSFileErrorMinimum = 0, NSFileErrorMaximum = 1023, NSValidationErrorMinimum = 1024, NSValidationErrorMaximum = 2047, NSExecutableErrorMinimum __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3584, NSExecutableErrorMaximum __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3839, NSFormattingErrorMinimum = 2048, NSFormattingErrorMaximum = 2559, NSPropertyListReadCorruptError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3840, NSPropertyListReadUnknownVersionError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3841, NSPropertyListReadStreamError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3842, NSPropertyListWriteStreamError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3851, NSPropertyListWriteInvalidError __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3852, NSPropertyListErrorMinimum __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3840, NSPropertyListErrorMaximum __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4095, NSXPCConnectionInterrupted __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4097, NSXPCConnectionInvalid __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4099, NSXPCConnectionReplyInvalid __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4101, NSXPCConnectionErrorMinimum __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4096, NSXPCConnectionErrorMaximum __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4224, NSUbiquitousFileUnavailableError __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4353, NSUbiquitousFileNotUploadedDueToQuotaError __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4354, NSUbiquitousFileUbiquityServerNotAvailable __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4355, NSUbiquitousFileErrorMinimum __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4352, NSUbiquitousFileErrorMaximum __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4607, NSUserActivityHandoffFailedError __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4608, NSUserActivityConnectionUnavailableError __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4609, NSUserActivityRemoteApplicationTimedOutError __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4610, NSUserActivityHandoffUserInfoTooLargeError __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4611, NSUserActivityErrorMinimum __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4608, NSUserActivityErrorMaximum __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4863, NSCoderReadCorruptError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4864, NSCoderValueNotFoundError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4865, NSCoderInvalidValueError __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))) = 4866, NSCoderErrorMinimum __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4864, NSCoderErrorMaximum __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4991, NSBundleErrorMinimum __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4992, NSBundleErrorMaximum __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 5119, NSBundleOnDemandResourceOutOfSpaceError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4992, NSBundleOnDemandResourceExceededMaximumSizeError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4993, NSBundleOnDemandResourceInvalidTagError __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 4994, NSCloudSharingNetworkFailureError __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5120, NSCloudSharingQuotaExceededError __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5121, NSCloudSharingTooManyParticipantsError __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5122, NSCloudSharingConflictError __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5123, NSCloudSharingNoPermissionError __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5124, NSCloudSharingOtherError __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5375, NSCloudSharingErrorMinimum __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5120, NSCloudSharingErrorMaximum __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 5375, NSCompressionFailedError __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 5376, NSDecompressionFailedError __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 5377, NSCompressionErrorMinimum __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 5376, NSCompressionErrorMaximum __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) = 5503, }; #pragma clang assume_nonnull begin typedef NSUInteger NSByteCountFormatterUnits; enum { NSByteCountFormatterUseDefault = 0, NSByteCountFormatterUseBytes = 1UL << 0, NSByteCountFormatterUseKB = 1UL << 1, NSByteCountFormatterUseMB = 1UL << 2, NSByteCountFormatterUseGB = 1UL << 3, NSByteCountFormatterUseTB = 1UL << 4, NSByteCountFormatterUsePB = 1UL << 5, NSByteCountFormatterUseEB = 1UL << 6, NSByteCountFormatterUseZB = 1UL << 7, NSByteCountFormatterUseYBOrHigher = 0x0FFUL << 8, NSByteCountFormatterUseAll = 0x0FFFFUL }; typedef NSInteger NSByteCountFormatterCountStyle; enum { NSByteCountFormatterCountStyleFile = 0, NSByteCountFormatterCountStyleMemory = 1, NSByteCountFormatterCountStyleDecimal = 2, NSByteCountFormatterCountStyleBinary = 3 }; __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSByteCountFormatter #define _REWRITER_typedef_NSByteCountFormatter typedef struct objc_object NSByteCountFormatter; typedef struct {} _objc_exc_NSByteCountFormatter; #endif struct NSByteCountFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; unsigned int _allowedUnits; char _countStyle; BOOL _allowsNonnumericFormatting; BOOL _includesUnit; BOOL _includesCount; BOOL _includesActualByteCount; BOOL _adaptive; BOOL _zeroPadsFractionDigits; int _formattingContext; int _reserved[5]; }; // + (NSString *)stringFromByteCount:(long long)byteCount countStyle:(NSByteCountFormatterCountStyle)countStyle; // - (NSString *)stringFromByteCount:(long long)byteCount; // + (NSString *)stringFromMeasurement:(NSMeasurement<NSUnitInformationStorage *> *)measurement countStyle:(NSByteCountFormatterCountStyle)countStyle __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); // - (NSString *)stringFromMeasurement:(NSMeasurement<NSUnitInformationStorage *> *)measurement __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(tvos,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))); // - (nullable NSString *)stringForObjectValue:(nullable id)obj; // @property NSByteCountFormatterUnits allowedUnits; // @property NSByteCountFormatterCountStyle countStyle; // @property BOOL allowsNonnumericFormatting; // @property BOOL includesUnit; // @property BOOL includesCount; // @property BOOL includesActualByteCount; // @property (getter=isAdaptive) BOOL adaptive; // @property BOOL zeroPadsFractionDigits; // @property NSFormattingContext formattingContext __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @protocol NSCacheDelegate; #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSCache #define _REWRITER_typedef_NSCache typedef struct objc_object NSCache; typedef struct {} _objc_exc_NSCache; #endif struct NSCache_IMPL { struct NSObject_IMPL NSObject_IVARS; id _delegate; void *_private[5]; void *_reserved; }; // @property (copy) NSString *name; // @property (nullable, assign) id<NSCacheDelegate> delegate; // - (nullable ObjectType)objectForKey:(KeyType)key; // - (void)setObject:(ObjectType)obj forKey:(KeyType)key; // - (void)setObject:(ObjectType)obj forKey:(KeyType)key cost:(NSUInteger)g; // - (void)removeObjectForKey:(KeyType)key; // - (void)removeAllObjects; // @property NSUInteger totalCostLimit; // @property NSUInteger countLimit; // @property BOOL evictsObjectsWithDiscardedContent; /* @end */ // @protocol NSCacheDelegate <NSObject> /* @optional */ // - (void)cache:(NSCache *)cache willEvictObject:(id)obj; /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSPredicate #define _REWRITER_typedef_NSPredicate typedef struct objc_object NSPredicate; typedef struct {} _objc_exc_NSPredicate; #endif struct _predicateFlags { unsigned int _evaluationBlocked : 1; unsigned int _reservedPredicateFlags : 31; } ; struct NSPredicate_IMPL { struct NSObject_IMPL NSObject_IVARS; struct _predicateFlags _predicateFlags; uint32_t reserved; }; // + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat argumentArray:(nullable NSArray *)arguments; // + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat, ...; // + (NSPredicate *)predicateWithFormat:(NSString *)predicateFormat arguments:(va_list)argList; // + (nullable NSPredicate *)predicateFromMetadataQueryString:(NSString *)queryString __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSPredicate *)predicateWithValue:(BOOL)value; // + (NSPredicate*)predicateWithBlock:(BOOL (^)(id _Nullable evaluatedObject, NSDictionary<NSString *, id> * _Nullable bindings))block __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *predicateFormat; // - (instancetype)predicateWithSubstitutionVariables:(NSDictionary<NSString *, id> *)variables; // - (BOOL)evaluateWithObject:(nullable id)object; // - (BOOL)evaluateWithObject:(nullable id)object substitutionVariables:(nullable NSDictionary<NSString *, id> *)bindings __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)allowEvaluation __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSArray<ObjectType> (NSPredicateSupport) // - (NSArray<ObjectType> *)filteredArrayUsingPredicate:(NSPredicate *)predicate; /* @end */ // @interface NSMutableArray<ObjectType> (NSPredicateSupport) // - (void)filterUsingPredicate:(NSPredicate *)predicate; /* @end */ // @interface NSSet<ObjectType> (NSPredicateSupport) // - (NSSet<ObjectType> *)filteredSetUsingPredicate:(NSPredicate *)predicate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableSet<ObjectType> (NSPredicateSupport) // - (void)filterUsingPredicate:(NSPredicate *)predicate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSOrderedSet<ObjectType> (NSPredicateSupport) // - (NSOrderedSet<ObjectType> *)filteredOrderedSetUsingPredicate:(NSPredicate *)p __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSMutableOrderedSet<ObjectType> (NSPredicateSupport) // - (void)filterUsingPredicate:(NSPredicate *)p __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSUInteger NSComparisonPredicateOptions; enum { NSCaseInsensitivePredicateOption = 0x01, NSDiacriticInsensitivePredicateOption = 0x02, NSNormalizedPredicateOption __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 0x04, }; typedef NSUInteger NSComparisonPredicateModifier; enum { NSDirectPredicateModifier = 0, NSAllPredicateModifier, NSAnyPredicateModifier }; typedef NSUInteger NSPredicateOperatorType; enum { NSLessThanPredicateOperatorType = 0, NSLessThanOrEqualToPredicateOperatorType, NSGreaterThanPredicateOperatorType, NSGreaterThanOrEqualToPredicateOperatorType, NSEqualToPredicateOperatorType, NSNotEqualToPredicateOperatorType, NSMatchesPredicateOperatorType, NSLikePredicateOperatorType, NSBeginsWithPredicateOperatorType, NSEndsWithPredicateOperatorType, NSInPredicateOperatorType, NSCustomSelectorPredicateOperatorType, NSContainsPredicateOperatorType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 99, NSBetweenPredicateOperatorType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) }; // @class NSPredicateOperator; #ifndef _REWRITER_typedef_NSPredicateOperator #define _REWRITER_typedef_NSPredicateOperator typedef struct objc_object NSPredicateOperator; typedef struct {} _objc_exc_NSPredicateOperator; #endif // @class NSExpression; #ifndef _REWRITER_typedef_NSExpression #define _REWRITER_typedef_NSExpression typedef struct objc_object NSExpression; typedef struct {} _objc_exc_NSExpression; #endif __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSComparisonPredicate #define _REWRITER_typedef_NSComparisonPredicate typedef struct objc_object NSComparisonPredicate; typedef struct {} _objc_exc_NSComparisonPredicate; #endif struct NSComparisonPredicate_IMPL { struct NSPredicate_IMPL NSPredicate_IVARS; void *_reserved2; NSPredicateOperator *_predicateOperator; NSExpression *_lhs; NSExpression *_rhs; }; // + (NSComparisonPredicate *)predicateWithLeftExpression:(NSExpression *)lhs rightExpression:(NSExpression *)rhs modifier:(NSComparisonPredicateModifier)modifier type:(NSPredicateOperatorType)type options:(NSComparisonPredicateOptions)options; // + (NSComparisonPredicate *)predicateWithLeftExpression:(NSExpression *)lhs rightExpression:(NSExpression *)rhs customSelector:(SEL)selector; // - (instancetype)initWithLeftExpression:(NSExpression *)lhs rightExpression:(NSExpression *)rhs modifier:(NSComparisonPredicateModifier)modifier type:(NSPredicateOperatorType)type options:(NSComparisonPredicateOptions)options __attribute__((objc_designated_initializer)); // - (instancetype)initWithLeftExpression:(NSExpression *)lhs rightExpression:(NSExpression *)rhs customSelector:(SEL)selector __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // @property (readonly) NSPredicateOperatorType predicateOperatorType; // @property (readonly) NSComparisonPredicateModifier comparisonPredicateModifier; // @property (readonly, retain) NSExpression *leftExpression; // @property (readonly, retain) NSExpression *rightExpression; // @property (nullable, readonly) SEL customSelector; // @property (readonly) NSComparisonPredicateOptions options; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSCompoundPredicateType; enum { NSNotPredicateType = 0, NSAndPredicateType, NSOrPredicateType, }; __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSCompoundPredicate #define _REWRITER_typedef_NSCompoundPredicate typedef struct objc_object NSCompoundPredicate; typedef struct {} _objc_exc_NSCompoundPredicate; #endif struct NSCompoundPredicate_IMPL { struct NSPredicate_IMPL NSPredicate_IVARS; void *_reserved2; NSUInteger _type; NSArray *_subpredicates; }; // - (instancetype)initWithType:(NSCompoundPredicateType)type subpredicates:(NSArray<NSPredicate *> *)subpredicates __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // @property (readonly) NSCompoundPredicateType compoundPredicateType; // @property (readonly, copy) NSArray *subpredicates; // + (NSCompoundPredicate *)andPredicateWithSubpredicates:(NSArray<NSPredicate *> *)subpredicates __attribute__((swift_name("init(andPredicateWithSubpredicates:)"))); // + (NSCompoundPredicate *)orPredicateWithSubpredicates:(NSArray<NSPredicate *> *)subpredicates __attribute__((swift_name("init(orPredicateWithSubpredicates:)"))); // + (NSCompoundPredicate *)notPredicateWithSubpredicate:(NSPredicate *)predicate __attribute__((swift_name("init(notPredicateWithSubpredicate:)"))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) typedef NSInteger NSDateComponentsFormatterUnitsStyle; enum { NSDateComponentsFormatterUnitsStylePositional = 0, NSDateComponentsFormatterUnitsStyleAbbreviated, NSDateComponentsFormatterUnitsStyleShort, NSDateComponentsFormatterUnitsStyleFull, NSDateComponentsFormatterUnitsStyleSpellOut, NSDateComponentsFormatterUnitsStyleBrief __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) }; __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) typedef NSUInteger NSDateComponentsFormatterZeroFormattingBehavior; enum { NSDateComponentsFormatterZeroFormattingBehaviorNone = (0), NSDateComponentsFormatterZeroFormattingBehaviorDefault = (1 << 0), NSDateComponentsFormatterZeroFormattingBehaviorDropLeading = (1 << 1), NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle = (1 << 2), NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing = (1 << 3), NSDateComponentsFormatterZeroFormattingBehaviorDropAll = (NSDateComponentsFormatterZeroFormattingBehaviorDropLeading | NSDateComponentsFormatterZeroFormattingBehaviorDropMiddle | NSDateComponentsFormatterZeroFormattingBehaviorDropTrailing), NSDateComponentsFormatterZeroFormattingBehaviorPad = (1 << 16), }; __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSDateComponentsFormatter #define _REWRITER_typedef_NSDateComponentsFormatter typedef struct objc_object NSDateComponentsFormatter; typedef struct {} _objc_exc_NSDateComponentsFormatter; #endif struct NSDateComponentsFormatter_IMPL { struct NSFormatter_IMPL NSFormatter_IVARS; pthread_mutex_t _lock; void *_fmt; void *_unused; NSString *_fmtLocaleIdent; NSCalendar *_calendar; NSDate *_referenceDate; NSNumberFormatter *_unitFormatter; NSCalendarUnit _allowedUnits; NSFormattingContext _formattingContext; NSDateComponentsFormatterUnitsStyle _unitsStyle; NSDateComponentsFormatterZeroFormattingBehavior _zeroFormattingBehavior; NSInteger _maximumUnitCount; BOOL _allowsFractionalUnits; BOOL _collapsesLargestUnit; BOOL _includesApproximationPhrase; BOOL _includesTimeRemainingPhrase; void *_reserved; }; // - (nullable NSString *)stringForObjectValue:(nullable id)obj; // - (nullable NSString *)stringFromDateComponents:(NSDateComponents *)components; // - (nullable NSString *)stringFromDate:(NSDate *)startDate toDate:(NSDate *)endDate; // - (nullable NSString *)stringFromTimeInterval:(NSTimeInterval)ti; // + (nullable NSString *)localizedStringFromDateComponents:(NSDateComponents *)components unitsStyle:(NSDateComponentsFormatterUnitsStyle) unitsStyle; // @property NSDateComponentsFormatterUnitsStyle unitsStyle; // @property NSCalendarUnit allowedUnits; // @property NSDateComponentsFormatterZeroFormattingBehavior zeroFormattingBehavior; // @property (nullable, copy) NSCalendar *calendar; // @property (nullable, copy) NSDate *referenceDate __attribute__((availability(macosx,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property BOOL allowsFractionalUnits; // @property NSInteger maximumUnitCount; // @property BOOL collapsesLargestUnit; // @property BOOL includesApproximationPhrase; // @property BOOL includesTimeRemainingPhrase; // @property NSFormattingContext formattingContext; // - (BOOL)getObjectValue:(out id _Nullable * _Nullable)obj forString:(NSString *)string errorDescription:(out NSString * _Nullable * _Nullable)error; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSMutableDictionary; #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif // @class NSPredicate; #ifndef _REWRITER_typedef_NSPredicate #define _REWRITER_typedef_NSPredicate typedef struct objc_object NSPredicate; typedef struct {} _objc_exc_NSPredicate; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSExpressionType; enum { NSConstantValueExpressionType = 0, NSEvaluatedObjectExpressionType, NSVariableExpressionType, NSKeyPathExpressionType, NSFunctionExpressionType, NSUnionSetExpressionType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))), NSIntersectSetExpressionType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))), NSMinusSetExpressionType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))), NSSubqueryExpressionType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 13, NSAggregateExpressionType __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 14, NSAnyKeyExpressionType __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 15, NSBlockExpressionType = 19, NSConditionalExpressionType __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 20 }; __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSExpression #define _REWRITER_typedef_NSExpression typedef struct objc_object NSExpression; typedef struct {} _objc_exc_NSExpression; #endif struct _expressionFlags { unsigned int _evaluationBlocked : 1; unsigned int _reservedExpressionFlags : 31; } ; struct NSExpression_IMPL { struct NSObject_IMPL NSObject_IVARS; struct _expressionFlags _expressionFlags; uint32_t reserved; NSExpressionType _expressionType; }; // + (NSExpression *)expressionWithFormat:(NSString *)expressionFormat argumentArray:(NSArray *)arguments __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionWithFormat:(NSString *)expressionFormat, ... __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionWithFormat:(NSString *)expressionFormat arguments:(va_list)argList __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForConstantValue:(nullable id)obj; // + (NSExpression *)expressionForEvaluatedObject; // + (NSExpression *)expressionForVariable:(NSString *)string; // + (NSExpression *)expressionForKeyPath:(NSString *)keyPath; // + (NSExpression *)expressionForFunction:(NSString *)name arguments:(NSArray *)parameters; // + (NSExpression *)expressionForAggregate:(NSArray<NSExpression *> *)subexpressions __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForUnionSet:(NSExpression *)left with:(NSExpression *)right __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForIntersectSet:(NSExpression *)left with:(NSExpression *)right __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForMinusSet:(NSExpression *)left with:(NSExpression *)right __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForSubquery:(NSExpression *)expression usingIteratorVariable:(NSString *)variable predicate:(NSPredicate *)predicate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForFunction:(NSExpression *)target selectorName:(NSString *)name arguments:(nullable NSArray *)parameters __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForAnyKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForBlock:(id (^)(id _Nullable evaluatedObject, NSArray<NSExpression *> *expressions, NSMutableDictionary * _Nullable context))block arguments:(nullable NSArray<NSExpression *> *)arguments __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (NSExpression *)expressionForConditional:(NSPredicate *)predicate trueExpression:(NSExpression *)trueExpression falseExpression:(NSExpression *)falseExpression __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initWithExpressionType:(NSExpressionType)type __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)coder __attribute__((objc_designated_initializer)); // @property (readonly) NSExpressionType expressionType; // @property (nullable, readonly, retain) id constantValue; // @property (readonly, copy) NSString *keyPath; // @property (readonly, copy) NSString *function; // @property (readonly, copy) NSString *variable; // @property (readonly, copy) NSExpression *operand; // @property (nullable, readonly, copy) NSArray<NSExpression *> *arguments; // @property (readonly, retain) id collection __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSPredicate *predicate __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSExpression *leftExpression __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSExpression *rightExpression __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSExpression *trueExpression __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSExpression *falseExpression __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) id (^expressionBlock)(id _Nullable, NSArray<NSExpression *> *, NSMutableDictionary * _Nullable) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable id)expressionValueWithObject:(nullable id)object context:(nullable NSMutableDictionary *)context; // - (void)allowEvaluation __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSExtensionContext #define _REWRITER_typedef_NSExtensionContext typedef struct objc_object NSExtensionContext; typedef struct {} _objc_exc_NSExtensionContext; #endif struct NSExtensionContext_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property(readonly, copy, atomic) NSArray *inputItems; // - (void)completeRequestReturningItems:(nullable NSArray *)items completionHandler:(void(^ _Nullable)(BOOL expired))completionHandler __attribute__((swift_async(none))); // - (void)cancelRequestWithError:(NSError *)error; // - (void)openURL:(NSURL *)URL completionHandler:(void (^ _Nullable)(BOOL success))completionHandler; /* @end */ extern "C" NSString * _Null_unspecified const NSExtensionItemsAndErrorsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * _Null_unspecified const NSExtensionHostWillEnterForegroundNotification __attribute__((availability(ios,introduced=8.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSString * _Null_unspecified const NSExtensionHostDidEnterBackgroundNotification __attribute__((availability(ios,introduced=8.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSString * _Null_unspecified const NSExtensionHostWillResignActiveNotification __attribute__((availability(ios,introduced=8.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); extern "C" NSString * _Null_unspecified const NSExtensionHostDidBecomeActiveNotification __attribute__((availability(ios,introduced=8.2))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(macos,unavailable))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSExtensionItem #define _REWRITER_typedef_NSExtensionItem typedef struct objc_object NSExtensionItem; typedef struct {} _objc_exc_NSExtensionItem; #endif struct NSExtensionItem_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property(nullable, copy, atomic) NSAttributedString *attributedTitle; // @property(nullable, copy, atomic) NSAttributedString *attributedContentText; // @property(nullable, copy, atomic) NSArray<NSItemProvider *> *attachments; // @property(nullable, copy, atomic) NSDictionary *userInfo; /* @end */ extern "C" NSString * _Null_unspecified const NSExtensionItemAttributedTitleKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * _Null_unspecified const NSExtensionItemAttributedContentTextKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * _Null_unspecified const NSExtensionItemAttachmentsKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @class NSExtensionContext; #ifndef _REWRITER_typedef_NSExtensionContext #define _REWRITER_typedef_NSExtensionContext typedef struct objc_object NSExtensionContext; typedef struct {} _objc_exc_NSExtensionContext; #endif // @protocol NSExtensionRequestHandling <NSObject> /* @required */ // - (void)beginRequestWithExtensionContext:(NSExtensionContext *)context; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif // @protocol NSFilePresenter; #pragma clang assume_nonnull begin typedef NSUInteger NSFileCoordinatorReadingOptions; enum { NSFileCoordinatorReadingWithoutChanges = 1 << 0, NSFileCoordinatorReadingResolvesSymbolicLink = 1 << 1, NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1 << 2, NSFileCoordinatorReadingForUploading __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1 << 3, }; typedef NSUInteger NSFileCoordinatorWritingOptions; enum { NSFileCoordinatorWritingForDeleting = 1 << 0, NSFileCoordinatorWritingForMoving = 1 << 1, NSFileCoordinatorWritingForMerging = 1 << 2, NSFileCoordinatorWritingForReplacing = 1 << 3, NSFileCoordinatorWritingContentIndependentMetadataOnly __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1 << 4 }; __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSFileAccessIntent #define _REWRITER_typedef_NSFileAccessIntent typedef struct objc_object NSFileAccessIntent; typedef struct {} _objc_exc_NSFileAccessIntent; #endif struct NSFileAccessIntent_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURL *_url; BOOL _isRead; NSInteger _options; }; // + (instancetype)readingIntentWithURL:(NSURL *)url options:(NSFileCoordinatorReadingOptions)options; // + (instancetype)writingIntentWithURL:(NSURL *)url options:(NSFileCoordinatorWritingOptions)options; // @property (readonly, copy) NSURL *URL; /* @end */ __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSFileCoordinator #define _REWRITER_typedef_NSFileCoordinator typedef struct objc_object NSFileCoordinator; typedef struct {} _objc_exc_NSFileCoordinator; #endif struct NSFileCoordinator_IMPL { struct NSObject_IMPL NSObject_IVARS; id _accessArbiter; id _fileReactor; id _purposeID; NSURL *_recentFilePresenterURL; id _accessClaimIDOrIDs; BOOL _isCancelled; NSMutableDictionary *_movedItems; }; // + (void)addFilePresenter:(id<NSFilePresenter>)filePresenter; // + (void)removeFilePresenter:(id<NSFilePresenter>)filePresenter; @property (class, readonly, copy) NSArray<id<NSFilePresenter>> *filePresenters; // - (instancetype)initWithFilePresenter:(nullable id<NSFilePresenter>)filePresenterOrNil __attribute__((objc_designated_initializer)); // @property (copy) NSString *purposeIdentifier __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)coordinateAccessWithIntents:(NSArray<NSFileAccessIntent *> *)intents queue:(NSOperationQueue *)queue byAccessor:(void (^)(NSError * _Nullable error))accessor __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)coordinateReadingItemAtURL:(NSURL *)url options:(NSFileCoordinatorReadingOptions)options error:(NSError **)outError byAccessor:(void (__attribute__((noescape)) ^)(NSURL *newURL))reader; // - (void)coordinateWritingItemAtURL:(NSURL *)url options:(NSFileCoordinatorWritingOptions)options error:(NSError **)outError byAccessor:(void (__attribute__((noescape)) ^)(NSURL *newURL))writer; // - (void)coordinateReadingItemAtURL:(NSURL *)readingURL options:(NSFileCoordinatorReadingOptions)readingOptions writingItemAtURL:(NSURL *)writingURL options:(NSFileCoordinatorWritingOptions)writingOptions error:(NSError **)outError byAccessor:(void (__attribute__((noescape)) ^)(NSURL *newReadingURL, NSURL *newWritingURL))readerWriter; // - (void)coordinateWritingItemAtURL:(NSURL *)url1 options:(NSFileCoordinatorWritingOptions)options1 writingItemAtURL:(NSURL *)url2 options:(NSFileCoordinatorWritingOptions)options2 error:(NSError **)outError byAccessor:(void (__attribute__((noescape)) ^)(NSURL *newURL1, NSURL *newURL2))writer; // - (void)prepareForReadingItemsAtURLs:(NSArray<NSURL *> *)readingURLs options:(NSFileCoordinatorReadingOptions)readingOptions writingItemsAtURLs:(NSArray<NSURL *> *)writingURLs options:(NSFileCoordinatorWritingOptions)writingOptions error:(NSError **)outError byAccessor:(void (__attribute__((noescape)) ^)(void (^completionHandler)(void)))batchAccessor; // - (void)itemAtURL:(NSURL *)oldURL willMoveToURL:(NSURL *)newURL __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)itemAtURL:(NSURL *)oldURL didMoveToURL:(NSURL *)newURL; // - (void)itemAtURL:(NSURL *)url didChangeUbiquityAttributes:(NSSet <NSURLResourceKey> *)attributes __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)cancel; /* @end */ #pragma clang assume_nonnull end // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSFileVersion #define _REWRITER_typedef_NSFileVersion typedef struct objc_object NSFileVersion; typedef struct {} _objc_exc_NSFileVersion; #endif #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #pragma clang assume_nonnull begin // @protocol NSFilePresenter<NSObject> /* @required */ // @property (nullable, readonly, copy) NSURL *presentedItemURL; // @property (readonly, retain) NSOperationQueue *presentedItemOperationQueue; /* @optional */ // @property (nullable, readonly, copy) NSURL *primaryPresentedItemURL __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)relinquishPresentedItemToReader:(void (^)(void (^ _Nullable reacquirer)(void)))reader; // - (void)relinquishPresentedItemToWriter:(void (^)(void (^ _Nullable reacquirer)(void)))writer; // - (void)savePresentedItemChangesWithCompletionHandler:(void (^)(NSError * _Nullable errorOrNil))completionHandler; // - (void)accommodatePresentedItemDeletionWithCompletionHandler:(void (^)(NSError * _Nullable errorOrNil))completionHandler; // - (void)presentedItemDidMoveToURL:(NSURL *)newURL; // - (void)presentedItemDidChange; // - (void)presentedItemDidChangeUbiquityAttributes:(NSSet<NSURLResourceKey> *)attributes __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly, strong) NSSet<NSURLResourceKey> *observedPresentedItemUbiquityAttributes __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)presentedItemDidGainVersion:(NSFileVersion *)version; // - (void)presentedItemDidLoseVersion:(NSFileVersion *)version; // - (void)presentedItemDidResolveConflictVersion:(NSFileVersion *)version; // - (void)accommodatePresentedSubitemDeletionAtURL:(NSURL *)url completionHandler:(void (^)(NSError * _Nullable errorOrNil))completionHandler; // - (void)presentedSubitemDidAppearAtURL:(NSURL *)url; // - (void)presentedSubitemAtURL:(NSURL *)oldURL didMoveToURL:(NSURL *)newURL; // - (void)presentedSubitemDidChangeAtURL:(NSURL *)url; // - (void)presentedSubitemAtURL:(NSURL *)url didGainVersion:(NSFileVersion *)version; // - (void)presentedSubitemAtURL:(NSURL *)url didLoseVersion:(NSFileVersion *)version; // - (void)presentedSubitemAtURL:(NSURL *)url didResolveConflictVersion:(NSFileVersion *)version; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSPersonNameComponents #define _REWRITER_typedef_NSPersonNameComponents typedef struct objc_object NSPersonNameComponents; typedef struct {} _objc_exc_NSPersonNameComponents; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSFileVersionAddingOptions; enum { NSFileVersionAddingByMoving = 1 << 0 }; typedef NSUInteger NSFileVersionReplacingOptions; enum { NSFileVersionReplacingByMoving = 1 << 0 }; __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSFileVersion #define _REWRITER_typedef_NSFileVersion typedef struct objc_object NSFileVersion; typedef struct {} _objc_exc_NSFileVersion; #endif struct NSFileVersion_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURL *_fileURL; id _addition; id _deadVersionIdentifier; id _nonLocalVersion; NSURL *_contentsURL; BOOL _isBackup; NSString *_localizedName; NSString *_localizedComputerName; NSDate *_modificationDate; BOOL _isResolved; BOOL _contentsURLIsAccessed; id _reserved; NSString *_name; }; // + (nullable NSFileVersion *)currentVersionOfItemAtURL:(NSURL *)url; // + (nullable NSArray<NSFileVersion *> *)otherVersionsOfItemAtURL:(NSURL *)url; // + (nullable NSArray<NSFileVersion *> *)unresolvedConflictVersionsOfItemAtURL:(NSURL *)url; // + (void)getNonlocalVersionsOfItemAtURL:(NSURL *)url completionHandler:(void (^)(NSArray<NSFileVersion *> * _Nullable nonlocalFileVersions, NSError * _Nullable error))completionHandler __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable NSFileVersion *)versionOfItemAtURL:(NSURL *)url forPersistentIdentifier:(id)persistentIdentifier; // + (nullable NSFileVersion *)addVersionOfItemAtURL:(NSURL *)url withContentsOfURL:(NSURL *)contentsURL options:(NSFileVersionAddingOptions)options error:(NSError **)outError __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSURL *)temporaryDirectoryURLForNewVersionOfItemAtURL:(NSURL *)url __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly, copy) NSURL *URL; // @property (nullable, readonly, copy) NSString *localizedName; // @property (nullable, readonly, copy) NSString *localizedNameOfSavingComputer; // @property (nullable, readonly, copy) NSPersonNameComponents *originatorNameComponents __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, readonly, copy) NSDate *modificationDate; // @property (readonly, retain) id<NSCoding> persistentIdentifier; // @property (readonly, getter=isConflict) BOOL conflict; // @property (getter=isResolved) BOOL resolved; // @property (getter=isDiscardable) BOOL discardable __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly) BOOL hasLocalContents __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL hasThumbnail __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable NSURL *)replaceItemAtURL:(NSURL *)url options:(NSFileVersionReplacingOptions)options error:(NSError **)error; // - (BOOL)removeAndReturnError:(NSError **)outError; // + (BOOL)removeOtherVersionsOfItemAtURL:(NSURL *)url error:(NSError **)outError; /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSFileWrapperReadingOptions; enum { NSFileWrapperReadingImmediate = 1 << 0, NSFileWrapperReadingWithoutMapping = 1 << 1 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSUInteger NSFileWrapperWritingOptions; enum { NSFileWrapperWritingAtomic = 1 << 0, NSFileWrapperWritingWithNameUpdating = 1 << 1 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSFileWrapper #define _REWRITER_typedef_NSFileWrapper typedef struct objc_object NSFileWrapper; typedef struct {} _objc_exc_NSFileWrapper; #endif struct NSFileWrapper_IMPL { struct NSObject_IMPL NSObject_IVARS; NSDictionary *_fileAttributes; NSString *_preferredFileName; NSString *_fileName; id _contents; id _icon; id _moreVars; }; // - (nullable instancetype)initWithURL:(NSURL *)url options:(NSFileWrapperReadingOptions)options error:(NSError **)outError __attribute__((objc_designated_initializer)) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (instancetype)initDirectoryWithFileWrappers:(NSDictionary<NSString *, NSFileWrapper *> *)childrenByPreferredName __attribute__((objc_designated_initializer)); // - (instancetype)initRegularFileWithContents:(NSData *)contents __attribute__((objc_designated_initializer)); // - (instancetype)initSymbolicLinkWithDestinationURL:(NSURL *)url __attribute__((objc_designated_initializer)) __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (nullable instancetype)initWithSerializedRepresentation:(NSData *)serializeRepresentation __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // @property (readonly, getter=isDirectory) BOOL directory; // @property (readonly, getter=isRegularFile) BOOL regularFile; // @property (readonly, getter=isSymbolicLink) BOOL symbolicLink; // @property (nullable, copy) NSString *preferredFilename; // @property (nullable, copy) NSString *filename; // @property (copy) NSDictionary<NSString *, id> *fileAttributes; // - (BOOL)matchesContentsOfURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)readFromURL:(NSURL *)url options:(NSFileWrapperReadingOptions)options error:(NSError **)outError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)writeToURL:(NSURL *)url options:(NSFileWrapperWritingOptions)options originalContentsURL:(nullable NSURL *)originalContentsURL error:(NSError **)outError __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSData *serializedRepresentation; // - (NSString *)addFileWrapper:(NSFileWrapper *)child; // - (NSString *)addRegularFileWithContents:(NSData *)data preferredFilename:(NSString *)fileName; // - (void)removeFileWrapper:(NSFileWrapper *)child; // @property (nullable, readonly, copy) NSDictionary<NSString *, NSFileWrapper *> *fileWrappers; // - (nullable NSString *)keyForFileWrapper:(NSFileWrapper *)child; // @property (nullable, readonly, copy) NSData *regularFileContents; // @property (nullable, readonly, copy) NSURL *symbolicLinkDestinationURL __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,introduced=4.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSFileWrapper(NSDeprecated) // - (nullable id)initWithPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -initWithURL:options:error: instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (id)initSymbolicLinkWithDestination:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -initSymbolicLinkWithDestinationURL: and -setPreferredFileName:, if necessary, instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)needsToBeUpdatedFromPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -matchesContentsOfURL: instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)updateFromPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -readFromURL:options:error: instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)atomicFlag updateFilenames:(BOOL)updateFilenamesFlag __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -writeToURL:options:originalContentsURL:error: instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSString *)addFileWithPath:(NSString *)path __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Instantiate a new NSFileWrapper with -initWithURL:options:error:, send it -setPreferredFileName: if necessary, then use -addFileWrapper: instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSString *)addSymbolicLinkWithDestination:(NSString *)path preferredFilename:(NSString *)filename __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Instantiate a new NSFileWrapper with -initWithSymbolicLinkDestinationURL:, send it -setPreferredFileName: if necessary, then use -addFileWrapper: instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (NSString *)symbolicLinkDestination __attribute__((availability(macos,introduced=10.0,deprecated=10.10,message="Use -symbolicLinkDestinationURL instead."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSOrthography #define _REWRITER_typedef_NSOrthography typedef struct objc_object NSOrthography; typedef struct {} _objc_exc_NSOrthography; #endif #ifndef _REWRITER_typedef_NSValue #define _REWRITER_typedef_NSValue typedef struct objc_object NSValue; typedef struct {} _objc_exc_NSValue; #endif #pragma clang assume_nonnull begin typedef NSString *NSLinguisticTagScheme __attribute__((swift_wrapper(struct))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeTokenType __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeLexicalClass __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeNameType __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeNameTypeOrLexicalClass __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeLemma __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeLanguage __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTagScheme const NSLinguisticTagSchemeScript __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); typedef NSString *NSLinguisticTag __attribute__((swift_wrapper(struct))); extern "C" NSLinguisticTag const NSLinguisticTagWord __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagPunctuation __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagWhitespace __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOther __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagNoun __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagVerb __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagAdjective __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagAdverb __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagPronoun __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagDeterminer __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagParticle __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagPreposition __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagNumber __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagConjunction __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagInterjection __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagClassifier __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagIdiom __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOtherWord __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagSentenceTerminator __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOpenQuote __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagCloseQuote __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOpenParenthesis __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagCloseParenthesis __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagWordJoiner __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagDash __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOtherPunctuation __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagParagraphBreak __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOtherWhitespace __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagPersonalName __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagPlaceName __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); extern "C" NSLinguisticTag const NSLinguisticTagOrganizationName __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); typedef NSInteger NSLinguisticTaggerUnit; enum { NSLinguisticTaggerUnitWord, NSLinguisticTaggerUnitSentence, NSLinguisticTaggerUnitParagraph, NSLinguisticTaggerUnitDocument }; typedef NSUInteger NSLinguisticTaggerOptions; enum { NSLinguisticTaggerOmitWords = 1 << 0, NSLinguisticTaggerOmitPunctuation = 1 << 1, NSLinguisticTaggerOmitWhitespace = 1 << 2, NSLinguisticTaggerOmitOther = 1 << 3, NSLinguisticTaggerJoinNames = 1 << 4 }; __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) #ifndef _REWRITER_typedef_NSLinguisticTagger #define _REWRITER_typedef_NSLinguisticTagger typedef struct objc_object NSLinguisticTagger; typedef struct {} _objc_exc_NSLinguisticTagger; #endif struct NSLinguisticTagger_IMPL { struct NSObject_IMPL NSObject_IVARS; NSArray *_schemes; NSUInteger _options; NSString *_string; id _orthographyArray; id _tokenArray; void *_reserved; }; // - (instancetype)initWithTagSchemes:(NSArray<NSLinguisticTagScheme> *)tagSchemes options:(NSUInteger)opts __attribute__((objc_designated_initializer)) __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // @property (readonly, copy) NSArray<NSLinguisticTagScheme> *tagSchemes __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // @property (nullable, retain) NSString *string __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // + (NSArray<NSLinguisticTagScheme> *)availableTagSchemesForUnit:(NSLinguisticTaggerUnit)unit language:(NSString *)language __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // + (NSArray<NSLinguisticTagScheme> *)availableTagSchemesForLanguage:(NSString *)language __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (void)setOrthography:(nullable NSOrthography *)orthography range:(NSRange)range __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (nullable NSOrthography *)orthographyAtIndex:(NSUInteger)charIndex effectiveRange:(nullable NSRangePointer)effectiveRange __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (void)stringEditedInRange:(NSRange)newRange changeInLength:(NSInteger)delta __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (NSRange)tokenRangeAtIndex:(NSUInteger)charIndex unit:(NSLinguisticTaggerUnit)unit __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (NSRange)sentenceRangeForRange:(NSRange)range __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (void)enumerateTagsInRange:(NSRange)range unit:(NSLinguisticTaggerUnit)unit scheme:(NSLinguisticTagScheme)scheme options:(NSLinguisticTaggerOptions)options usingBlock:(void (__attribute__((noescape)) ^)(NSLinguisticTag _Nullable tag, NSRange tokenRange, BOOL *stop))block __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (nullable NSLinguisticTag)tagAtIndex:(NSUInteger)charIndex unit:(NSLinguisticTaggerUnit)unit scheme:(NSLinguisticTagScheme)scheme tokenRange:(nullable NSRangePointer)tokenRange __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (NSArray<NSLinguisticTag> *)tagsInRange:(NSRange)range unit:(NSLinguisticTaggerUnit)unit scheme:(NSLinguisticTagScheme)scheme options:(NSLinguisticTaggerOptions)options tokenRanges:(NSArray<NSValue *> * _Nullable * _Nullable)tokenRanges __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (void)enumerateTagsInRange:(NSRange)range scheme:(NSLinguisticTagScheme)tagScheme options:(NSLinguisticTaggerOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(NSLinguisticTag _Nullable tag, NSRange tokenRange, NSRange sentenceRange, BOOL *stop))block __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (nullable NSLinguisticTag)tagAtIndex:(NSUInteger)charIndex scheme:(NSLinguisticTagScheme)scheme tokenRange:(nullable NSRangePointer)tokenRange sentenceRange:(nullable NSRangePointer)sentenceRange __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (NSArray<NSString *> *)tagsInRange:(NSRange)range scheme:(NSString *)tagScheme options:(NSLinguisticTaggerOptions)opts tokenRanges:(NSArray<NSValue *> * _Nullable * _Nullable)tokenRanges __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // @property (nullable, readonly, copy) NSString *dominantLanguage __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // + (nullable NSString *)dominantLanguageForString:(NSString *)string __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // + (nullable NSLinguisticTag)tagForString:(NSString *)string atIndex:(NSUInteger)charIndex unit:(NSLinguisticTaggerUnit)unit scheme:(NSLinguisticTagScheme)scheme orthography:(nullable NSOrthography *)orthography tokenRange:(nullable NSRangePointer)tokenRange __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // + (NSArray<NSLinguisticTag> *)tagsForString:(NSString *)string range:(NSRange)range unit:(NSLinguisticTaggerUnit)unit scheme:(NSLinguisticTagScheme)scheme options:(NSLinguisticTaggerOptions)options orthography:(nullable NSOrthography *)orthography tokenRanges:(NSArray<NSValue *> * _Nullable * _Nullable)tokenRanges __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // + (void)enumerateTagsForString:(NSString *)string range:(NSRange)range unit:(NSLinguisticTaggerUnit)unit scheme:(NSLinguisticTagScheme)scheme options:(NSLinguisticTaggerOptions)options orthography:(nullable NSOrthography *)orthography usingBlock:(void (__attribute__((noescape)) ^)(NSLinguisticTag _Nullable tag, NSRange tokenRange, BOOL *stop))block __attribute__((availability(macos,introduced=10.13,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=4.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=11.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (nullable NSArray<NSString *> *)possibleTagsAtIndex:(NSUInteger)charIndex scheme:(NSString *)tagScheme tokenRange:(nullable NSRangePointer)tokenRange sentenceRange:(nullable NSRangePointer)sentenceRange scores:(NSArray<NSValue *> * _Nullable * _Nullable)scores __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); /* @end */ // @interface NSString (NSLinguisticAnalysis) // - (NSArray<NSLinguisticTag> *)linguisticTagsInRange:(NSRange)range scheme:(NSLinguisticTagScheme)scheme options:(NSLinguisticTaggerOptions)options orthography:(nullable NSOrthography *)orthography tokenRanges:(NSArray<NSValue *> * _Nullable * _Nullable)tokenRanges __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); // - (void)enumerateLinguisticTagsInRange:(NSRange)range scheme:(NSLinguisticTagScheme)scheme options:(NSLinguisticTaggerOptions)options orthography:(nullable NSOrthography *)orthography usingBlock:(void (__attribute__((noescape)) ^)(NSLinguisticTag _Nullable tag, NSRange tokenRange, NSRange sentenceRange, BOOL *stop))block __attribute__((availability(macos,introduced=10.7,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(ios,introduced=5.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="All NSLinguisticTagger API should be replaced with NaturalLanguage.framework API"))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin extern "C" NSString * const NSMetadataItemFSNameKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemDisplayNameKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemURLKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemPathKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemFSSizeKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemFSCreationDateKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemFSContentChangeDateKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemContentTypeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemContentTypeTreeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataItemIsUbiquitousKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemHasUnresolvedConflictsKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemIsDownloadedKey __attribute__((availability(macos,introduced=10.7,deprecated=10.9,message="Use NSMetadataUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(ios,introduced=5.0,deprecated=7.0,message="Use NSMetadataUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSMetadataUbiquitousItemDownloadingStatusKey instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSMetadataUbiquitousItemDownloadingStatusKey instead"))); extern "C" NSString * const NSMetadataUbiquitousItemDownloadingStatusKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemDownloadingStatusNotDownloaded __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemDownloadingStatusDownloaded __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemDownloadingStatusCurrent __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemIsDownloadingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemIsUploadedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemIsUploadingKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemPercentDownloadedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemPercentUploadedKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemDownloadingErrorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemUploadingErrorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemDownloadRequestedKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemIsExternalDocumentKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemContainerDisplayNameKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemURLInLocalContainerKey __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataUbiquitousItemIsSharedKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemCurrentUserRoleKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemCurrentUserPermissionsKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemOwnerNameComponentsKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemMostRecentEditorNameComponentsKey __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemRoleOwner __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemRoleParticipant __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemPermissionsReadOnly __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataUbiquitousSharedItemPermissionsReadWrite __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAttributeChangeDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemKeywordsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemTitleKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAuthorsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemEditorsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemParticipantsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemProjectsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDownloadedDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemWhereFromsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCommentKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCopyrightKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLastUsedDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemContentCreationDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemContentModificationDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDateAddedKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDurationSecondsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemContactKeywordsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemVersionKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPixelHeightKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPixelWidthKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPixelCountKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemColorSpaceKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemBitsPerSampleKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemFlashOnOffKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemFocalLengthKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAcquisitionMakeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAcquisitionModelKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemISOSpeedKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemOrientationKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLayerNamesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemWhiteBalanceKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemApertureKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemProfileNameKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemResolutionWidthDPIKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemResolutionHeightDPIKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemExposureModeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemExposureTimeSecondsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemEXIFVersionKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCameraOwnerKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemFocalLength35mmKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLensModelKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemEXIFGPSVersionKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAltitudeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLatitudeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLongitudeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemSpeedKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemTimestampKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSTrackKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemImageDirectionKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemNamedLocationKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSStatusKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSMeasureModeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDOPKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSMapDatumKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDestLatitudeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDestLongitudeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDestBearingKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDestDistanceKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSProcessingMethodKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSAreaInformationKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDateStampKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGPSDifferentalKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCodecsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemMediaTypesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemStreamableKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemTotalBitRateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemVideoBitRateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAudioBitRateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDeliveryTypeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAlbumKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemHasAlphaChannelKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRedEyeOnOffKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemMeteringModeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemMaxApertureKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemFNumberKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemExposureProgramKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemExposureTimeStringKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemHeadlineKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemInstructionsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCityKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemStateOrProvinceKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCountryKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemTextContentKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAudioSampleRateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAudioChannelCountKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemTempoKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemKeySignatureKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemTimeSignatureKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAudioEncodingApplicationKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemComposerKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLyricistKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAudioTrackNumberKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRecordingDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemMusicalGenreKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemIsGeneralMIDISequenceKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRecordingYearKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemOrganizationsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemLanguagesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRightsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPublishersKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemContributorsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCoverageKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemSubjectKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemThemeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDescriptionKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemIdentifierKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAudiencesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemNumberOfPagesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPageWidthKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPageHeightKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemSecurityMethodKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCreatorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemEncodingApplicationsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDueDateKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemStarRatingKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPhoneNumbersKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemEmailAddressesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemInstantMessageAddressesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemKindKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRecipientsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemFinderCommentKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemFontsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAppleLoopsRootKeyKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAppleLoopsKeyFilterTypeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAppleLoopsLoopModeKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAppleLoopDescriptorsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemMusicalInstrumentCategoryKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemMusicalInstrumentNameKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemCFBundleIdentifierKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemInformationKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemDirectorKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemProducerKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemGenreKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemPerformersKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemOriginalFormatKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemOriginalSourceKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAuthorEmailAddressesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRecipientEmailAddressesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemAuthorAddressesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemRecipientAddressesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemIsLikelyJunkKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemExecutableArchitecturesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemExecutablePlatformKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemApplicationCategoriesKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataItemIsApplicationManagedKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSPredicate #define _REWRITER_typedef_NSPredicate typedef struct objc_object NSPredicate; typedef struct {} _objc_exc_NSPredicate; #endif #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif #ifndef _REWRITER_typedef_NSSortDescriptor #define _REWRITER_typedef_NSSortDescriptor typedef struct objc_object NSSortDescriptor; typedef struct {} _objc_exc_NSSortDescriptor; #endif // @class NSMetadataItem; #ifndef _REWRITER_typedef_NSMetadataItem #define _REWRITER_typedef_NSMetadataItem typedef struct objc_object NSMetadataItem; typedef struct {} _objc_exc_NSMetadataItem; #endif #ifndef _REWRITER_typedef_NSMetadataQueryAttributeValueTuple #define _REWRITER_typedef_NSMetadataQueryAttributeValueTuple typedef struct objc_object NSMetadataQueryAttributeValueTuple; typedef struct {} _objc_exc_NSMetadataQueryAttributeValueTuple; #endif #ifndef _REWRITER_typedef_NSMetadataQueryResultGroup #define _REWRITER_typedef_NSMetadataQueryResultGroup typedef struct objc_object NSMetadataQueryResultGroup; typedef struct {} _objc_exc_NSMetadataQueryResultGroup; #endif // @protocol NSMetadataQueryDelegate; #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMetadataQuery #define _REWRITER_typedef_NSMetadataQuery typedef struct objc_object NSMetadataQuery; typedef struct {} _objc_exc_NSMetadataQuery; #endif struct NSMetadataQuery_IMPL { struct NSObject_IMPL NSObject_IVARS; NSUInteger _flags; NSTimeInterval _interval; id _private[11]; void *_reserved; }; // @property (nullable, assign) id<NSMetadataQueryDelegate> delegate; // @property (nullable, copy) NSPredicate *predicate; // @property (copy) NSArray<NSSortDescriptor *> *sortDescriptors; // @property (copy) NSArray<NSString *> *valueListAttributes; // @property (nullable, copy) NSArray<NSString *> *groupingAttributes; // @property NSTimeInterval notificationBatchingInterval; // @property (copy) NSArray *searchScopes; // @property (nullable, copy) NSArray *searchItems __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, retain) NSOperationQueue *operationQueue __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (BOOL)startQuery; // - (void)stopQuery; // @property (readonly, getter=isStarted) BOOL started; // @property (readonly, getter=isGathering) BOOL gathering; // @property (readonly, getter=isStopped) BOOL stopped; // - (void)disableUpdates; // - (void)enableUpdates; // @property (readonly) NSUInteger resultCount; // - (id)resultAtIndex:(NSUInteger)idx; // - (void)enumerateResultsUsingBlock:(void (__attribute__((noescape)) ^)(id result, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)enumerateResultsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (__attribute__((noescape)) ^)(id result, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSArray *results; // - (NSUInteger)indexOfResult:(id)result; // @property (readonly, copy) NSDictionary<NSString *, NSArray<NSMetadataQueryAttributeValueTuple *> *> *valueLists; // @property (readonly, copy) NSArray<NSMetadataQueryResultGroup *> *groupedResults; // - (nullable id)valueOfAttribute:(NSString *)attrName forResultAtIndex:(NSUInteger)idx; /* @end */ // @protocol NSMetadataQueryDelegate <NSObject> /* @optional */ // - (id)metadataQuery:(NSMetadataQuery *)query replacementObjectForResultObject:(NSMetadataItem *)result; // - (id)metadataQuery:(NSMetadataQuery *)query replacementValueForAttribute:(NSString *)attrName value:(id)attrValue; /* @end */ extern "C" NSNotificationName const NSMetadataQueryDidStartGatheringNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSMetadataQueryGatheringProgressNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSMetadataQueryDidFinishGatheringNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSMetadataQueryDidUpdateNotification __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryUpdateAddedItemsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryUpdateChangedItemsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryUpdateRemovedItemsKey __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryResultContentRelevanceAttribute __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryUserHomeScope __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataQueryLocalComputerScope __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataQueryNetworkScope __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataQueryIndexedLocalComputerScope __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataQueryIndexedNetworkScope __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString * const NSMetadataQueryUbiquitousDocumentsScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryUbiquitousDataScope __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSMetadataQueryAccessibleUbiquitousExternalDocumentsScope __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMetadataItem #define _REWRITER_typedef_NSMetadataItem typedef struct objc_object NSMetadataItem; typedef struct {} _objc_exc_NSMetadataItem; #endif struct NSMetadataItem_IMPL { struct NSObject_IMPL NSObject_IVARS; id _item; void *_reserved; }; // - (nullable instancetype)initWithURL:(NSURL *)url __attribute__((objc_designated_initializer)) __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable id)valueForAttribute:(NSString *)key; // - (nullable NSDictionary<NSString *, id> *)valuesForAttributes:(NSArray<NSString *> *)keys; // @property (readonly, copy) NSArray<NSString *> *attributes; /* @end */ __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMetadataQueryAttributeValueTuple #define _REWRITER_typedef_NSMetadataQueryAttributeValueTuple typedef struct objc_object NSMetadataQueryAttributeValueTuple; typedef struct {} _objc_exc_NSMetadataQueryAttributeValueTuple; #endif struct NSMetadataQueryAttributeValueTuple_IMPL { struct NSObject_IMPL NSObject_IVARS; id _attr; id _value; NSUInteger _count; void *_reserved; }; // @property (readonly, copy) NSString *attribute; // @property (nullable, readonly, retain) id value; // @property (readonly) NSUInteger count; /* @end */ __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSMetadataQueryResultGroup #define _REWRITER_typedef_NSMetadataQueryResultGroup typedef struct objc_object NSMetadataQueryResultGroup; typedef struct {} _objc_exc_NSMetadataQueryResultGroup; #endif struct NSMetadataQueryResultGroup_IMPL { struct NSObject_IMPL NSObject_IVARS; id _private[9]; NSUInteger _private2[1]; void *_reserved; }; // @property (readonly, copy) NSString *attribute; // @property (readonly, retain) id value; // @property (nullable, readonly, copy) NSArray<NSMetadataQueryResultGroup *> *subgroups; // @property (readonly) NSUInteger resultCount; // - (id)resultAtIndex:(NSUInteger)idx; // @property (readonly, copy) NSArray *results; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif #ifndef _REWRITER_typedef_NSRunLoop #define _REWRITER_typedef_NSRunLoop typedef struct objc_object NSRunLoop; typedef struct {} _objc_exc_NSRunLoop; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @protocol NSNetServiceDelegate, NSNetServiceBrowserDelegate; #pragma clang assume_nonnull begin extern "C" NSString * const NSNetServicesErrorCode __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,unavailable))); extern "C" NSErrorDomain const NSNetServicesErrorDomain __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,unavailable))); typedef NSInteger NSNetServicesError; enum { NSNetServicesUnknownError = -72000L, NSNetServicesCollisionError = -72001L, NSNetServicesNotFoundError = -72002L, NSNetServicesActivityInProgress = -72003L, NSNetServicesBadArgumentError = -72004L, NSNetServicesCancelledError = -72005L, NSNetServicesInvalidError = -72006L, NSNetServicesTimeoutError = -72007L, NSNetServicesMissingRequiredConfigurationError __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(tvos,introduced=14.0))) __attribute__((availability(watchos,unavailable))) = -72008L, }; typedef NSUInteger NSNetServiceOptions; enum { NSNetServiceNoAutoRename = 1UL << 0, NSNetServiceListenForConnections __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 1UL << 1 }; __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_connection_t or nw_listener_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_connection_t or nw_listener_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_connection_t or nw_listener_t in Network framework instead"))) __attribute__((availability(watchos,unavailable))) #ifndef _REWRITER_typedef_NSNetService #define _REWRITER_typedef_NSNetService typedef struct objc_object NSNetService; typedef struct {} _objc_exc_NSNetService; #endif struct NSNetService_IMPL { struct NSObject_IMPL NSObject_IVARS; id _netService; id _delegate; id _reserved; }; // - (instancetype)initWithDomain:(NSString *)domain type:(NSString *)type name:(NSString *)name port:(int)port __attribute__((objc_designated_initializer)); // - (instancetype)initWithDomain:(NSString *)domain type:(NSString *)type name:(NSString *)name; // - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode; // - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode; // @property (nullable, assign) id <NSNetServiceDelegate> delegate; // @property BOOL includesPeerToPeer __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *name; // @property (readonly, copy) NSString *type; // @property (readonly, copy) NSString *domain; // @property (nullable, readonly, copy) NSString *hostName; // @property (nullable, readonly, copy) NSArray<NSData *> *addresses; // @property (readonly) NSInteger port __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)publish; // - (void)publishWithOptions:(NSNetServiceOptions)options __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)resolve __attribute__((availability(macos,introduced=10.2,deprecated=10.4,message="Not supported"))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Not supported"))); // - (void)stop; // + (NSDictionary<NSString *, NSData *> *)dictionaryFromTXTRecordData:(NSData *)txtData; // + (NSData *)dataFromTXTRecordDictionary:(NSDictionary<NSString *, NSData *> *)txtDictionary; // - (void)resolveWithTimeout:(NSTimeInterval)timeout; // - (BOOL)getInputStream:(out __attribute__((objc_ownership(strong))) NSInputStream * _Nullable * _Nullable)inputStream outputStream:(out __attribute__((objc_ownership(strong))) NSOutputStream * _Nullable * _Nullable)outputStream; // - (BOOL)setTXTRecordData:(nullable NSData *)recordData; // - (nullable NSData *)TXTRecordData; // - (void)startMonitoring; // - (void)stopMonitoring; /* @end */ __attribute__((availability(macos,introduced=10.2,deprecated=100000,message="Use nw_browser_t in Network framework instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,message="Use nw_browser_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_browser_t in Network framework instead"))) __attribute__((availability(watchos,unavailable))) #ifndef _REWRITER_typedef_NSNetServiceBrowser #define _REWRITER_typedef_NSNetServiceBrowser typedef struct objc_object NSNetServiceBrowser; typedef struct {} _objc_exc_NSNetServiceBrowser; #endif struct NSNetServiceBrowser_IMPL { struct NSObject_IMPL NSObject_IVARS; id _netServiceBrowser; id _delegate; void *_reserved; }; // - (instancetype)init; // @property (nullable, assign) id <NSNetServiceBrowserDelegate> delegate; // @property BOOL includesPeerToPeer __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode; // - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode; // - (void)searchForBrowsableDomains; // - (void)searchForRegistrationDomains; // - (void)searchForServicesOfType:(NSString *)type inDomain:(NSString *)domainString; // - (void)stop; /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,unavailable))) // @protocol NSNetServiceDelegate <NSObject> /* @optional */ // - (void)netServiceWillPublish:(NSNetService *)sender; // - (void)netServiceDidPublish:(NSNetService *)sender; // - (void)netService:(NSNetService *)sender didNotPublish:(NSDictionary<NSString *, NSNumber *> *)errorDict; // - (void)netServiceWillResolve:(NSNetService *)sender; // - (void)netServiceDidResolveAddress:(NSNetService *)sender; // - (void)netService:(NSNetService *)sender didNotResolve:(NSDictionary<NSString *, NSNumber *> *)errorDict; // - (void)netServiceDidStop:(NSNetService *)sender; // - (void)netService:(NSNetService *)sender didUpdateTXTRecordData:(NSData *)data; // - (void)netService:(NSNetService *)sender didAcceptConnectionWithInputStream:(NSInputStream *)inputStream outputStream:(NSOutputStream *)outputStream __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,unavailable))) // @protocol NSNetServiceBrowserDelegate <NSObject> /* @optional */ // - (void)netServiceBrowserWillSearch:(NSNetServiceBrowser *)browser; // - (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)browser; // - (void)netServiceBrowser:(NSNetServiceBrowser *)browser didNotSearch:(NSDictionary<NSString *, NSNumber *> *)errorDict; // - (void)netServiceBrowser:(NSNetServiceBrowser *)browser didFindDomain:(NSString *)domainString moreComing:(BOOL)moreComing; // - (void)netServiceBrowser:(NSNetServiceBrowser *)browser didFindService:(NSNetService *)service moreComing:(BOOL)moreComing; // - (void)netServiceBrowser:(NSNetServiceBrowser *)browser didRemoveDomain:(NSString *)domainString moreComing:(BOOL)moreComing; // - (void)netServiceBrowser:(NSNetServiceBrowser *)browser didRemoveService:(NSNetService *)service moreComing:(BOOL)moreComing; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((availability(watchos,unavailable))) #ifndef _REWRITER_typedef_NSUbiquitousKeyValueStore #define _REWRITER_typedef_NSUbiquitousKeyValueStore typedef struct objc_object NSUbiquitousKeyValueStore; typedef struct {} _objc_exc_NSUbiquitousKeyValueStore; #endif struct NSUbiquitousKeyValueStore_IMPL { struct NSObject_IMPL NSObject_IVARS; id _private1; id _private2; id _private3; void *_private4; void *_reserved[3]; int _daemonWakeToken; BOOL _disabledSuddenTermination; }; @property (class, readonly, strong) NSUbiquitousKeyValueStore *defaultStore; // - (nullable id)objectForKey:(NSString *)aKey; // - (void)setObject:(nullable id)anObject forKey:(NSString *)aKey; // - (void)removeObjectForKey:(NSString *)aKey; // - (nullable NSString *)stringForKey:(NSString *)aKey; // - (nullable NSArray *)arrayForKey:(NSString *)aKey; // - (nullable NSDictionary<NSString *, id> *)dictionaryForKey:(NSString *)aKey; // - (nullable NSData *)dataForKey:(NSString *)aKey; // - (long long)longLongForKey:(NSString *)aKey; // - (double)doubleForKey:(NSString *)aKey; // - (BOOL)boolForKey:(NSString *)aKey; // - (void)setString:(nullable NSString *)aString forKey:(NSString *)aKey; // - (void)setData:(nullable NSData *)aData forKey:(NSString *)aKey; // - (void)setArray:(nullable NSArray *)anArray forKey:(NSString *)aKey; // - (void)setDictionary:(nullable NSDictionary<NSString *, id> *)aDictionary forKey:(NSString *)aKey; // - (void)setLongLong:(long long)value forKey:(NSString *)aKey; // - (void)setDouble:(double)value forKey:(NSString *)aKey; // - (void)setBool:(BOOL)value forKey:(NSString *)aKey; // @property (readonly, copy) NSDictionary<NSString *, id> *dictionaryRepresentation; // - (BOOL)synchronize; /* @end */ extern "C" NSNotificationName const NSUbiquitousKeyValueStoreDidChangeExternallyNotification __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSUbiquitousKeyValueStoreChangeReasonKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSUbiquitousKeyValueStoreChangedKeysKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); enum { NSUbiquitousKeyValueStoreServerChange __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))), NSUbiquitousKeyValueStoreInitialSyncChange __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))), NSUbiquitousKeyValueStoreQuotaViolationChange __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))), NSUbiquitousKeyValueStoreAccountChange __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) }; #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin static const NSUInteger NSUndoCloseGroupingRunLoopOrdering = 350000; __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSUndoManager #define _REWRITER_typedef_NSUndoManager typedef struct objc_object NSUndoManager; typedef struct {} _objc_exc_NSUndoManager; #endif struct NSUndoManager_IMPL { struct NSObject_IMPL NSObject_IVARS; id _undoStack; id _redoStack; NSArray *_runLoopModes; uint64_t _NSUndoManagerPrivate1; id _target; id _proxy; void *_NSUndoManagerPrivate2; void *_NSUndoManagerPrivate3; }; // - (void)beginUndoGrouping; // - (void)endUndoGrouping; // @property (readonly) NSInteger groupingLevel; // - (void)disableUndoRegistration; // - (void)enableUndoRegistration; // @property (readonly, getter=isUndoRegistrationEnabled) BOOL undoRegistrationEnabled; // @property BOOL groupsByEvent; // @property NSUInteger levelsOfUndo; // @property (copy) NSArray<NSRunLoopMode> *runLoopModes; // - (void)undo; // - (void)redo; // - (void)undoNestedGroup; // @property (readonly) BOOL canUndo; // @property (readonly) BOOL canRedo; // @property (readonly, getter=isUndoing) BOOL undoing; // @property (readonly, getter=isRedoing) BOOL redoing; // - (void)removeAllActions; // - (void)removeAllActionsWithTarget:(id)target; // - (void)registerUndoWithTarget:(id)target selector:(SEL)selector object:(nullable id)anObject; // - (id)prepareWithInvocationTarget:(id)target; // - (void)registerUndoWithTarget:(id)target handler:(void (^)(id target))undoHandler __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) __attribute__((swift_private)); // - (void)setActionIsDiscardable:(BOOL)discardable __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSString * const NSUndoManagerGroupIsDiscardableKey __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL undoActionIsDiscardable __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly) BOOL redoActionIsDiscardable __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (readonly, copy) NSString *undoActionName; // @property (readonly, copy) NSString *redoActionName; // - (void)setActionName:(NSString *)actionName; // @property (readonly, copy) NSString *undoMenuItemTitle; // @property (readonly, copy) NSString *redoMenuItemTitle; // - (NSString *)undoMenuTitleForUndoActionName:(NSString *)actionName; // - (NSString *)redoMenuTitleForUndoActionName:(NSString *)actionName; /* @end */ extern "C" NSNotificationName const NSUndoManagerCheckpointNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerWillUndoChangeNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerWillRedoChangeNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerDidUndoChangeNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerDidRedoChangeNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerDidOpenUndoGroupNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerWillCloseUndoGroupNotification __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=3.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" NSNotificationName const NSUndoManagerDidCloseUndoGroupNotification __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSURL; #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSInputStream; #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif // @class NSOutputStream; #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @class NSOperationQueue; #ifndef _REWRITER_typedef_NSOperationQueue #define _REWRITER_typedef_NSOperationQueue typedef struct objc_object NSOperationQueue; typedef struct {} _objc_exc_NSOperationQueue; #endif // @class NSURLCache; #ifndef _REWRITER_typedef_NSURLCache #define _REWRITER_typedef_NSURLCache typedef struct objc_object NSURLCache; typedef struct {} _objc_exc_NSURLCache; #endif // @class NSURLResponse; #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif // @class NSHTTPURLResponse; #ifndef _REWRITER_typedef_NSHTTPURLResponse #define _REWRITER_typedef_NSHTTPURLResponse typedef struct objc_object NSHTTPURLResponse; typedef struct {} _objc_exc_NSHTTPURLResponse; #endif // @class NSHTTPCookie; #ifndef _REWRITER_typedef_NSHTTPCookie #define _REWRITER_typedef_NSHTTPCookie typedef struct objc_object NSHTTPCookie; typedef struct {} _objc_exc_NSHTTPCookie; #endif // @class NSCachedURLResponse; #ifndef _REWRITER_typedef_NSCachedURLResponse #define _REWRITER_typedef_NSCachedURLResponse typedef struct objc_object NSCachedURLResponse; typedef struct {} _objc_exc_NSCachedURLResponse; #endif // @class NSURLAuthenticationChallenge; #ifndef _REWRITER_typedef_NSURLAuthenticationChallenge #define _REWRITER_typedef_NSURLAuthenticationChallenge typedef struct objc_object NSURLAuthenticationChallenge; typedef struct {} _objc_exc_NSURLAuthenticationChallenge; #endif // @class NSURLProtectionSpace; #ifndef _REWRITER_typedef_NSURLProtectionSpace #define _REWRITER_typedef_NSURLProtectionSpace typedef struct objc_object NSURLProtectionSpace; typedef struct {} _objc_exc_NSURLProtectionSpace; #endif // @class NSURLCredential; #ifndef _REWRITER_typedef_NSURLCredential #define _REWRITER_typedef_NSURLCredential typedef struct objc_object NSURLCredential; typedef struct {} _objc_exc_NSURLCredential; #endif // @class NSURLCredentialStorage; #ifndef _REWRITER_typedef_NSURLCredentialStorage #define _REWRITER_typedef_NSURLCredentialStorage typedef struct objc_object NSURLCredentialStorage; typedef struct {} _objc_exc_NSURLCredentialStorage; #endif // @class NSURLSessionDataTask; #ifndef _REWRITER_typedef_NSURLSessionDataTask #define _REWRITER_typedef_NSURLSessionDataTask typedef struct objc_object NSURLSessionDataTask; typedef struct {} _objc_exc_NSURLSessionDataTask; #endif // @class NSURLSessionUploadTask; #ifndef _REWRITER_typedef_NSURLSessionUploadTask #define _REWRITER_typedef_NSURLSessionUploadTask typedef struct objc_object NSURLSessionUploadTask; typedef struct {} _objc_exc_NSURLSessionUploadTask; #endif // @class NSURLSessionDownloadTask; #ifndef _REWRITER_typedef_NSURLSessionDownloadTask #define _REWRITER_typedef_NSURLSessionDownloadTask typedef struct objc_object NSURLSessionDownloadTask; typedef struct {} _objc_exc_NSURLSessionDownloadTask; #endif // @class NSNetService; #ifndef _REWRITER_typedef_NSNetService #define _REWRITER_typedef_NSNetService typedef struct objc_object NSNetService; typedef struct {} _objc_exc_NSNetService; #endif // @class NSURLSession; #ifndef _REWRITER_typedef_NSURLSession #define _REWRITER_typedef_NSURLSession typedef struct objc_object NSURLSession; typedef struct {} _objc_exc_NSURLSession; #endif // @class NSURLSessionDataTask; #ifndef _REWRITER_typedef_NSURLSessionDataTask #define _REWRITER_typedef_NSURLSessionDataTask typedef struct objc_object NSURLSessionDataTask; typedef struct {} _objc_exc_NSURLSessionDataTask; #endif // @class NSURLSessionUploadTask; #ifndef _REWRITER_typedef_NSURLSessionUploadTask #define _REWRITER_typedef_NSURLSessionUploadTask typedef struct objc_object NSURLSessionUploadTask; typedef struct {} _objc_exc_NSURLSessionUploadTask; #endif // @class NSURLSessionDownloadTask; #ifndef _REWRITER_typedef_NSURLSessionDownloadTask #define _REWRITER_typedef_NSURLSessionDownloadTask typedef struct objc_object NSURLSessionDownloadTask; typedef struct {} _objc_exc_NSURLSessionDownloadTask; #endif // @class NSURLSessionStreamTask; #ifndef _REWRITER_typedef_NSURLSessionStreamTask #define _REWRITER_typedef_NSURLSessionStreamTask typedef struct objc_object NSURLSessionStreamTask; typedef struct {} _objc_exc_NSURLSessionStreamTask; #endif // @class NSURLSessionWebSocketTask; #ifndef _REWRITER_typedef_NSURLSessionWebSocketTask #define _REWRITER_typedef_NSURLSessionWebSocketTask typedef struct objc_object NSURLSessionWebSocketTask; typedef struct {} _objc_exc_NSURLSessionWebSocketTask; #endif // @class NSURLSessionConfiguration; #ifndef _REWRITER_typedef_NSURLSessionConfiguration #define _REWRITER_typedef_NSURLSessionConfiguration typedef struct objc_object NSURLSessionConfiguration; typedef struct {} _objc_exc_NSURLSessionConfiguration; #endif // @protocol NSURLSessionDelegate; // @protocol NSURLSessionTaskDelegate; // @class NSURLSessionTaskMetrics; #ifndef _REWRITER_typedef_NSURLSessionTaskMetrics #define _REWRITER_typedef_NSURLSessionTaskMetrics typedef struct objc_object NSURLSessionTaskMetrics; typedef struct {} _objc_exc_NSURLSessionTaskMetrics; #endif // @class NSDateInterval; #ifndef _REWRITER_typedef_NSDateInterval #define _REWRITER_typedef_NSDateInterval typedef struct objc_object NSDateInterval; typedef struct {} _objc_exc_NSDateInterval; #endif #pragma clang assume_nonnull begin extern "C" const int64_t NSURLSessionTransferSizeUnknown __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSession #define _REWRITER_typedef_NSURLSession typedef struct objc_object NSURLSession; typedef struct {} _objc_exc_NSURLSession; #endif struct NSURLSession_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (class, readonly, strong) NSURLSession *sharedSession; // + (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration; // + (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration delegate:(nullable id <NSURLSessionDelegate>)delegate delegateQueue:(nullable NSOperationQueue *)queue; // @property (readonly, retain) NSOperationQueue *delegateQueue; // @property (nullable, readonly, retain) id <NSURLSessionDelegate> delegate; // @property (readonly, copy) NSURLSessionConfiguration *configuration; // @property (nullable, copy) NSString *sessionDescription; // - (void)finishTasksAndInvalidate; // - (void)invalidateAndCancel; // - (void)resetWithCompletionHandler:(void (^)(void))completionHandler; // - (void)flushWithCompletionHandler:(void (^)(void))completionHandler; // - (void)getTasksWithCompletionHandler:(void (^)(NSArray<NSURLSessionDataTask *> *dataTasks, NSArray<NSURLSessionUploadTask *> *uploadTasks, NSArray<NSURLSessionDownloadTask *> *downloadTasks))completionHandler __attribute__((swift_async_name("getter:tasks()"))); // - (void)getAllTasksWithCompletionHandler:(void (^)(NSArray<__kindof NSURLSessionTask *> *tasks))completionHandler __attribute__((swift_async_name("getter:allTasks()"))) __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request; // - (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url; // - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL; // - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(NSData *)bodyData; // - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request; // - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request; // - (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url; // - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData; // - (NSURLSessionStreamTask *)streamTaskWithHostName:(NSString *)hostname port:(NSInteger)port __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // - (NSURLSessionStreamTask *)streamTaskWithNetService:(NSNetService *)service __attribute__((availability(macos,introduced=10.11,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(ios,introduced=9.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,message="Use nw_connection_t in Network framework instead"))) __attribute__((availability(watchos,unavailable))); // - (NSURLSessionWebSocketTask *)webSocketTaskWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (NSURLSessionWebSocketTask *)webSocketTaskWithURL:(NSURL *)url protocols:(NSArray<NSString *>*)protocols __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (NSURLSessionWebSocketTask *)webSocketTaskWithRequest:(NSURLRequest *)request __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances"))); /* @end */ // @interface NSURLSession (NSURLSessionAsynchronousConvenience) // - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(void (^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; // - (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url completionHandler:(void (^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; // - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL completionHandler:(void (^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; // - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(nullable NSData *)bodyData completionHandler:(void (^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; // - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; // - (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url completionHandler:(void (^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; // - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler; /* @end */ typedef NSInteger NSURLSessionTaskState; enum { NSURLSessionTaskStateRunning = 0, NSURLSessionTaskStateSuspended = 1, NSURLSessionTaskStateCanceling = 2, NSURLSessionTaskStateCompleted = 3, } __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSessionTask #define _REWRITER_typedef_NSURLSessionTask typedef struct objc_object NSURLSessionTask; typedef struct {} _objc_exc_NSURLSessionTask; #endif struct NSURLSessionTask_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly) NSUInteger taskIdentifier; // @property (nullable, readonly, copy) NSURLRequest *originalRequest; // @property (nullable, readonly, copy) NSURLRequest *currentRequest; // @property (nullable, readonly, copy) NSURLResponse *response; // @property (nullable, retain) id <NSURLSessionTaskDelegate> delegate __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); // @property (readonly, strong) NSProgress *progress __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (nullable, copy) NSDate *earliestBeginDate __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property int64_t countOfBytesClientExpectsToSend __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property int64_t countOfBytesClientExpectsToReceive __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (readonly) int64_t countOfBytesSent; // @property (readonly) int64_t countOfBytesReceived; // @property (readonly) int64_t countOfBytesExpectedToSend; // @property (readonly) int64_t countOfBytesExpectedToReceive; // @property (nullable, copy) NSString *taskDescription; // - (void)cancel; // @property (readonly) NSURLSessionTaskState state; // @property (nullable, readonly, copy) NSError *error; // - (void)suspend; // - (void)resume; // @property float priority __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property BOOL prefersIncrementalDelivery __attribute__((availability(macos,introduced=11.3))) __attribute__((availability(ios,introduced=14.5))) __attribute__((availability(watchos,introduced=7.4))) __attribute__((availability(tvos,introduced=14.5))); // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Not supported"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Not supported"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Not supported"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Not supported"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Not supported"))); /* @end */ extern "C" const float NSURLSessionTaskPriorityDefault __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" const float NSURLSessionTaskPriorityLow __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); extern "C" const float NSURLSessionTaskPriorityHigh __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSessionDataTask #define _REWRITER_typedef_NSURLSessionDataTask typedef struct objc_object NSURLSessionDataTask; typedef struct {} _objc_exc_NSURLSessionDataTask; #endif struct NSURLSessionDataTask_IMPL { struct NSURLSessionTask_IMPL NSURLSessionTask_IVARS; }; // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances"))); /* @end */ __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSessionUploadTask #define _REWRITER_typedef_NSURLSessionUploadTask typedef struct objc_object NSURLSessionUploadTask; typedef struct {} _objc_exc_NSURLSessionUploadTask; #endif struct NSURLSessionUploadTask_IMPL { struct NSURLSessionDataTask_IMPL NSURLSessionDataTask_IVARS; }; // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances"))); /* @end */ __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSessionDownloadTask #define _REWRITER_typedef_NSURLSessionDownloadTask typedef struct objc_object NSURLSessionDownloadTask; typedef struct {} _objc_exc_NSURLSessionDownloadTask; #endif struct NSURLSessionDownloadTask_IMPL { struct NSURLSessionTask_IMPL NSURLSessionTask_IVARS; }; // - (void)cancelByProducingResumeData:(void (^)(NSData * _Nullable resumeData))completionHandler; // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances"))); /* @end */ __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSessionStreamTask #define _REWRITER_typedef_NSURLSessionStreamTask typedef struct objc_object NSURLSessionStreamTask; typedef struct {} _objc_exc_NSURLSessionStreamTask; #endif struct NSURLSessionStreamTask_IMPL { struct NSURLSessionTask_IMPL NSURLSessionTask_IVARS; }; // - (void)readDataOfMinLength:(NSUInteger)minBytes maxLength:(NSUInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler; // - (void)writeData:(NSData *)data timeout:(NSTimeInterval)timeout completionHandler:(void (^) (NSError * _Nullable error))completionHandler; // - (void)captureStreams; // - (void)closeWrite; // - (void)closeRead; // - (void)startSecureConnection; // - (void)stopSecureConnection __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="TLS cannot be disabled once it is enabled"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="TLS cannot be disabled once it is enabled"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="TLS cannot be disabled once it is enabled"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="TLS cannot be disabled once it is enabled"))); // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances"))); /* @end */ typedef NSInteger NSURLSessionWebSocketMessageType; enum { NSURLSessionWebSocketMessageTypeData = 0, NSURLSessionWebSocketMessageTypeString = 1, } __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) #ifndef _REWRITER_typedef_NSURLSessionWebSocketMessage #define _REWRITER_typedef_NSURLSessionWebSocketMessage typedef struct objc_object NSURLSessionWebSocketMessage; typedef struct {} _objc_exc_NSURLSessionWebSocketMessage; #endif struct NSURLSessionWebSocketMessage_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithData:(NSData *)data __attribute__((objc_designated_initializer)); // - (instancetype)initWithString:(NSString *)string __attribute__((objc_designated_initializer)); // @property (readonly) NSURLSessionWebSocketMessageType type; // @property (nullable, readonly, copy) NSData *data; // @property (nullable, readonly, copy) NSString *string; // - (instancetype)init __attribute__((unavailable)); // + (instancetype)new __attribute__((unavailable)); /* @end */ typedef NSInteger NSURLSessionWebSocketCloseCode; enum { NSURLSessionWebSocketCloseCodeInvalid = 0, NSURLSessionWebSocketCloseCodeNormalClosure = 1000, NSURLSessionWebSocketCloseCodeGoingAway = 1001, NSURLSessionWebSocketCloseCodeProtocolError = 1002, NSURLSessionWebSocketCloseCodeUnsupportedData = 1003, NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005, NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006, NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007, NSURLSessionWebSocketCloseCodePolicyViolation = 1008, NSURLSessionWebSocketCloseCodeMessageTooBig = 1009, NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = 1010, NSURLSessionWebSocketCloseCodeInternalServerError = 1011, NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015, } __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) #ifndef _REWRITER_typedef_NSURLSessionWebSocketTask #define _REWRITER_typedef_NSURLSessionWebSocketTask typedef struct objc_object NSURLSessionWebSocketTask; typedef struct {} _objc_exc_NSURLSessionWebSocketTask; #endif struct NSURLSessionWebSocketTask_IMPL { struct NSURLSessionTask_IMPL NSURLSessionTask_IVARS; }; // - (void)sendMessage:(NSURLSessionWebSocketMessage *)message completionHandler:(void (^)(NSError * _Nullable error))completionHandler; // - (void)receiveMessageWithCompletionHandler:(void (^)(NSURLSessionWebSocketMessage * _Nullable message, NSError * _Nullable error))completionHandler; // - (void)sendPingWithPongReceiveHandler:(void (^)(NSError * _Nullable error))pongReceiveHandler; // - (void)cancelWithCloseCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(nullable NSData *)reason; // @property NSInteger maximumMessageSize; // @property (readonly) NSURLSessionWebSocketCloseCode closeCode; // @property (nullable, readonly, copy) NSData *closeReason; // - (instancetype)init __attribute__((unavailable)); // + (instancetype)new __attribute__((unavailable)); /* @end */ typedef NSInteger NSURLSessionMultipathServiceType; enum { NSURLSessionMultipathServiceTypeNone = 0, NSURLSessionMultipathServiceTypeHandover = 1, NSURLSessionMultipathServiceTypeInteractive = 2, NSURLSessionMultipathServiceTypeAggregate = 3 } __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(macos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) __attribute__((swift_name("URLSessionConfiguration.MultipathServiceType"))); __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSURLSessionConfiguration #define _REWRITER_typedef_NSURLSessionConfiguration typedef struct objc_object NSURLSessionConfiguration; typedef struct {} _objc_exc_NSURLSessionConfiguration; #endif struct NSURLSessionConfiguration_IMPL { struct NSObject_IMPL NSObject_IVARS; }; @property (class, readonly, strong) NSURLSessionConfiguration *defaultSessionConfiguration; @property (class, readonly, strong) NSURLSessionConfiguration *ephemeralSessionConfiguration; // + (NSURLSessionConfiguration *)backgroundSessionConfigurationWithIdentifier:(NSString *)identifier __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, readonly, copy) NSString *identifier; // @property NSURLRequestCachePolicy requestCachePolicy; // @property NSTimeInterval timeoutIntervalForRequest; // @property NSTimeInterval timeoutIntervalForResource; // @property NSURLRequestNetworkServiceType networkServiceType; // @property BOOL allowsCellularAccess; // @property BOOL allowsExpensiveNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property BOOL allowsConstrainedNetworkAccess __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property BOOL waitsForConnectivity __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (getter=isDiscretionary) BOOL discretionary __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSString *sharedContainerIdentifier __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property BOOL sessionSendsLaunchEvents __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSDictionary *connectionProxyDictionary; // @property SSLProtocol TLSMinimumSupportedProtocol __attribute__((availability(macos,introduced=10.9,deprecated=100000,replacement="TLSMinimumSupportedProtocolVersion"))) __attribute__((availability(ios,introduced=7.0,deprecated=100000,replacement="TLSMinimumSupportedProtocolVersion"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="TLSMinimumSupportedProtocolVersion"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="TLSMinimumSupportedProtocolVersion"))); // @property SSLProtocol TLSMaximumSupportedProtocol __attribute__((availability(macos,introduced=10.9,deprecated=100000,replacement="TLSMaximumSupportedProtocolVersion"))) __attribute__((availability(ios,introduced=7.0,deprecated=100000,replacement="TLSMaximumSupportedProtocolVersion"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="TLSMaximumSupportedProtocolVersion"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="TLSMaximumSupportedProtocolVersion"))); // @property tls_protocol_version_t TLSMinimumSupportedProtocolVersion __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property tls_protocol_version_t TLSMaximumSupportedProtocolVersion __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property BOOL HTTPShouldUsePipelining; // @property BOOL HTTPShouldSetCookies; // @property NSHTTPCookieAcceptPolicy HTTPCookieAcceptPolicy; // @property (nullable, copy) NSDictionary *HTTPAdditionalHeaders; // @property NSInteger HTTPMaximumConnectionsPerHost; // @property (nullable, retain) NSHTTPCookieStorage *HTTPCookieStorage; // @property (nullable, retain) NSURLCredentialStorage *URLCredentialStorage; // @property (nullable, retain) NSURLCache *URLCache; // @property BOOL shouldUseExtendedBackgroundIdleMode __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property (nullable, copy) NSArray<Class> *protocolClasses; // @property NSURLSessionMultipathServiceType multipathServiceType __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(macos,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)init __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.9,deprecated=10.15,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))) __attribute__((availability(ios,introduced=7.0,deprecated=13.0,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))) __attribute__((availability(watchos,introduced=2.0,deprecated=6.0,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))) __attribute__((availability(tvos,introduced=9.0,deprecated=13.0,message="Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances"))); /* @end */ typedef NSInteger NSURLSessionDelayedRequestDisposition; enum { NSURLSessionDelayedRequestContinueLoading = 0, NSURLSessionDelayedRequestUseNewRequest = 1, NSURLSessionDelayedRequestCancel = 2, } __attribute__((swift_name("URLSession.DelayedRequestDisposition"))) __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); typedef NSInteger NSURLSessionAuthChallengeDisposition; enum { NSURLSessionAuthChallengeUseCredential = 0, NSURLSessionAuthChallengePerformDefaultHandling = 1, NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2, NSURLSessionAuthChallengeRejectProtectionSpace = 3, } __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); typedef NSInteger NSURLSessionResponseDisposition; enum { NSURLSessionResponseCancel = 0, NSURLSessionResponseAllow = 1, NSURLSessionResponseBecomeDownload = 2, NSURLSessionResponseBecomeStream __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) = 3, } __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLSessionDelegate <NSObject> /* @optional */ // - (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(nullable NSError *)error; #if 0 - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler; #endif // - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLSessionTaskDelegate <NSURLSessionDelegate> /* @optional */ #if 0 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willBeginDelayedRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLSessionDelayedRequestDisposition disposition, NSURLRequest * _Nullable newRequest))completionHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif #if 0 - (void)URLSession:(NSURLSession *)session taskIsWaitingForConnectivity:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); #endif #if 0 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task willPerformHTTPRedirection:(NSHTTPURLResponse *)response newRequest:(NSURLRequest *)request completionHandler:(void (^)(NSURLRequest * _Nullable))completionHandler; #endif #if 0 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler; #endif #if 0 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task needNewBodyStream:(void (^)(NSInputStream * _Nullable bodyStream))completionHandler __attribute__((swift_async_name("urlSession(_:needNewBodyStreamForTask:)"))); #endif #if 0 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesSent totalBytesExpectedToSend:(int64_t)totalBytesExpectedToSend; #endif // - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didFinishCollectingMetrics:(NSURLSessionTaskMetrics *)metrics __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); #if 0 - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(nullable NSError *)error; #endif /* @end */ __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLSessionDataDelegate <NSURLSessionTaskDelegate> /* @optional */ #if 0 - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler; #endif #if 0 - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didBecomeDownloadTask:(NSURLSessionDownloadTask *)downloadTask; #endif #if 0 - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didBecomeStreamTask:(NSURLSessionStreamTask *)streamTask __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); #endif #if 0 - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveData:(NSData *)data; #endif #if 0 - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask willCacheResponse:(NSCachedURLResponse *)proposedResponse completionHandler:(void (^)(NSCachedURLResponse * _Nullable cachedResponse))completionHandler; #endif /* @end */ __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLSessionDownloadDelegate <NSURLSessionTaskDelegate> #if 0 - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location; #endif /* @optional */ #if 0 - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didWriteData:(int64_t)bytesWritten totalBytesWritten:(int64_t)totalBytesWritten totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite; #endif #if 0 - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask didResumeAtOffset:(int64_t)fileOffset expectedTotalBytes:(int64_t)expectedTotalBytes; #endif /* @end */ __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSURLSessionStreamDelegate <NSURLSessionTaskDelegate> /* @optional */ // - (void)URLSession:(NSURLSession *)session readClosedForStreamTask:(NSURLSessionStreamTask *)streamTask; // - (void)URLSession:(NSURLSession *)session writeClosedForStreamTask:(NSURLSessionStreamTask *)streamTask; // - (void)URLSession:(NSURLSession *)session betterRouteDiscoveredForStreamTask:(NSURLSessionStreamTask *)streamTask; #if 0 - (void)URLSession:(NSURLSession *)session streamTask:(NSURLSessionStreamTask *)streamTask didBecomeInputStream:(NSInputStream *)inputStream outputStream:(NSOutputStream *)outputStream; #endif /* @end */ __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))) // @protocol NSURLSessionWebSocketDelegate <NSURLSessionTaskDelegate> /* @optional */ // - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didOpenWithProtocol:(nullable NSString *) protocol; // - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(nullable NSData *)reason; /* @end */ extern "C" NSString * const NSURLSessionDownloadTaskResumeData __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,introduced=7.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @interface NSURLSessionConfiguration (NSURLSessionDeprecated) // + (NSURLSessionConfiguration *)backgroundSessionConfiguration:(NSString *)identifier __attribute__((availability(macos,introduced=10.9,deprecated=10.10,replacement="-backgroundSessionConfigurationWithIdentifier:"))) __attribute__((availability(ios,introduced=7.0,deprecated=8.0,replacement="-backgroundSessionConfigurationWithIdentifier:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-backgroundSessionConfigurationWithIdentifier:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-backgroundSessionConfigurationWithIdentifier:"))); /* @end */ typedef NSInteger NSURLSessionTaskMetricsResourceFetchType; enum { NSURLSessionTaskMetricsResourceFetchTypeUnknown, NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad, NSURLSessionTaskMetricsResourceFetchTypeServerPush, NSURLSessionTaskMetricsResourceFetchTypeLocalCache, } __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); typedef NSInteger NSURLSessionTaskMetricsDomainResolutionProtocol; enum { NSURLSessionTaskMetricsDomainResolutionProtocolUnknown, NSURLSessionTaskMetricsDomainResolutionProtocolUDP, NSURLSessionTaskMetricsDomainResolutionProtocolTCP, NSURLSessionTaskMetricsDomainResolutionProtocolTLS, NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, } __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSURLSessionTaskTransactionMetrics #define _REWRITER_typedef_NSURLSessionTaskTransactionMetrics typedef struct objc_object NSURLSessionTaskTransactionMetrics; typedef struct {} _objc_exc_NSURLSessionTaskTransactionMetrics; #endif struct NSURLSessionTaskTransactionMetrics_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (copy, readonly) NSURLRequest *request; // @property (nullable, copy, readonly) NSURLResponse *response; // @property (nullable, copy, readonly) NSDate *fetchStartDate; // @property (nullable, copy, readonly) NSDate *domainLookupStartDate; // @property (nullable, copy, readonly) NSDate *domainLookupEndDate; // @property (nullable, copy, readonly) NSDate *connectStartDate; // @property (nullable, copy, readonly) NSDate *secureConnectionStartDate; // @property (nullable, copy, readonly) NSDate *secureConnectionEndDate; // @property (nullable, copy, readonly) NSDate *connectEndDate; // @property (nullable, copy, readonly) NSDate *requestStartDate; // @property (nullable, copy, readonly) NSDate *requestEndDate; // @property (nullable, copy, readonly) NSDate *responseStartDate; // @property (nullable, copy, readonly) NSDate *responseEndDate; // @property (nullable, copy, readonly) NSString *networkProtocolName; // @property (assign, readonly, getter=isProxyConnection) BOOL proxyConnection; // @property (assign, readonly, getter=isReusedConnection) BOOL reusedConnection; // @property (assign, readonly) NSURLSessionTaskMetricsResourceFetchType resourceFetchType; // @property (readonly) int64_t countOfRequestHeaderBytesSent __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) int64_t countOfRequestBodyBytesSent __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) int64_t countOfRequestBodyBytesBeforeEncoding __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) int64_t countOfResponseHeaderBytesReceived __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) int64_t countOfResponseBodyBytesReceived __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) int64_t countOfResponseBodyBytesAfterDecoding __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (nullable, copy, readonly) NSString *localAddress __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (nullable, copy, readonly) NSNumber *localPort __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (nullable, copy, readonly) NSString *remoteAddress __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (nullable, copy, readonly) NSNumber *remotePort __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (nullable, copy, readonly) NSNumber *negotiatedTLSProtocolVersion __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (nullable, copy, readonly) NSNumber *negotiatedTLSCipherSuite __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly, getter=isCellular) BOOL cellular __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly, getter=isExpensive) BOOL expensive __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly, getter=isConstrained) BOOL constrained __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly, getter=isMultipath) BOOL multipath __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // @property (readonly) NSURLSessionTaskMetricsDomainResolutionProtocol domainResolutionProtocol __attribute__((availability(macos,introduced=11.0))) __attribute__((availability(ios,introduced=14.0))) __attribute__((availability(watchos,introduced=7.0))) __attribute__((availability(tvos,introduced=14.0))); // - (instancetype)init __attribute__((availability(macos,introduced=10.12,deprecated=10.15,message="Not supported"))) __attribute__((availability(ios,introduced=10.0,deprecated=13.0,message="Not supported"))) __attribute__((availability(watchos,introduced=3.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(tvos,introduced=10.0,deprecated=13.0,message="Not supported"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.12,deprecated=10.15,message="Not supported"))) __attribute__((availability(ios,introduced=10.0,deprecated=13.0,message="Not supported"))) __attribute__((availability(watchos,introduced=3.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(tvos,introduced=10.0,deprecated=13.0,message="Not supported"))); /* @end */ __attribute__((availability(macosx,introduced=10.12))) __attribute__((availability(ios,introduced=10.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))) #ifndef _REWRITER_typedef_NSURLSessionTaskMetrics #define _REWRITER_typedef_NSURLSessionTaskMetrics typedef struct objc_object NSURLSessionTaskMetrics; typedef struct {} _objc_exc_NSURLSessionTaskMetrics; #endif struct NSURLSessionTaskMetrics_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (copy, readonly) NSArray<NSURLSessionTaskTransactionMetrics *> *transactionMetrics; // @property (copy, readonly) NSDateInterval *taskInterval; // @property (assign, readonly) NSUInteger redirectCount; // - (instancetype)init __attribute__((availability(macos,introduced=10.12,deprecated=10.15,message="Not supported"))) __attribute__((availability(ios,introduced=10.0,deprecated=13.0,message="Not supported"))) __attribute__((availability(watchos,introduced=3.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(tvos,introduced=10.0,deprecated=13.0,message="Not supported"))); // + (instancetype)new __attribute__((availability(macos,introduced=10.12,deprecated=10.15,message="Not supported"))) __attribute__((availability(ios,introduced=10.0,deprecated=13.0,message="Not supported"))) __attribute__((availability(watchos,introduced=3.0,deprecated=6.0,message="Not supported"))) __attribute__((availability(tvos,introduced=10.0,deprecated=13.0,message="Not supported"))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSSet #define _REWRITER_typedef_NSSet typedef struct objc_object NSSet; typedef struct {} _objc_exc_NSSet; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSInputStream #define _REWRITER_typedef_NSInputStream typedef struct objc_object NSInputStream; typedef struct {} _objc_exc_NSInputStream; #endif #ifndef _REWRITER_typedef_NSOutputStream #define _REWRITER_typedef_NSOutputStream typedef struct objc_object NSOutputStream; typedef struct {} _objc_exc_NSOutputStream; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @protocol NSUserActivityDelegate; typedef NSString* NSUserActivityPersistentIdentifier __attribute__((swift_bridged_typedef)); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSUserActivity #define _REWRITER_typedef_NSUserActivity typedef struct objc_object NSUserActivity; typedef struct {} _objc_exc_NSUserActivity; #endif struct NSUserActivity_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)initWithActivityType:(NSString *)activityType __attribute__((objc_designated_initializer)); // - (instancetype)init __attribute__((availability(macosx,introduced=10.10,deprecated=10.12,message="Use initWithActivityType: with a specific activity type string"))) __attribute__((availability(ios,introduced=8.0,deprecated=10.0,message="Use initWithActivityType: with a specific activity type string"))) __attribute__((availability(watchos,introduced=2.0,deprecated=3.0,message="Use initWithActivityType: with a specific activity type string"))) __attribute__((availability(tvos,introduced=9.0,deprecated=10.0,message="Use initWithActivityType: with a specific activity type string"))); // @property (readonly, copy) NSString *activityType; // @property (nullable, copy) NSString *title; // @property (nullable, copy) NSDictionary *userInfo; // - (void)addUserInfoEntriesFromDictionary:(NSDictionary *)otherDictionary; // @property (nullable, copy) NSSet<NSString *> *requiredUserInfoKeys __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (assign) BOOL needsSave; // @property (nullable, copy) NSURL *webpageURL; // @property (nullable, copy) NSURL *referrerURL __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,introduced=11.0))) __attribute__((availability(watchos,introduced=4.0))) __attribute__((availability(tvos,introduced=11.0))); // @property (nullable, copy) NSDate *expirationDate __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (copy) NSSet<NSString *> *keywords __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property BOOL supportsContinuationStreams; // @property (nullable, weak) id<NSUserActivityDelegate> delegate; // @property (nullable, copy) NSString* targetContentIdentifier __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=13.0))) __attribute__((availability(watchos,introduced=6.0))) __attribute__((availability(tvos,introduced=13.0))); // - (void)becomeCurrent; // - (void)resignCurrent __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // - (void)invalidate; // - (void)getContinuationStreamsWithCompletionHandler:(void (^)(NSInputStream * _Nullable inputStream, NSOutputStream * _Nullable outputStream, NSError * _Nullable error))completionHandler; // @property (getter=isEligibleForHandoff) BOOL eligibleForHandoff __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (getter=isEligibleForSearch) BOOL eligibleForSearch __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (getter=isEligibleForPublicIndexing) BOOL eligibleForPublicIndexing __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,introduced=9.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=10.0))); // @property (getter=isEligibleForPrediction) BOOL eligibleForPrediction __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(macos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (copy, nullable) NSUserActivityPersistentIdentifier persistentIdentifier __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,unavailable))); // +(void) deleteSavedUserActivitiesWithPersistentIdentifiers:(NSArray<NSUserActivityPersistentIdentifier>*) persistentIdentifiers completionHandler:(void(^)(void))handler __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,unavailable))); // +(void) deleteAllSavedUserActivitiesWithCompletionHandler:(void(^)(void))handler __attribute__((availability(macos,introduced=10.15))) __attribute__((availability(ios,introduced=12.0))) __attribute__((availability(watchos,introduced=5.0))) __attribute__((availability(tvos,unavailable))); /* @end */ extern "C" NSString * const NSUserActivityTypeBrowsingWeb; __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=3.0))) __attribute__((availability(tvos,introduced=9.0))) // @protocol NSUserActivityDelegate <NSObject> /* @optional */ // - (void)userActivityWillSave:(NSUserActivity *)userActivity; // - (void)userActivityWasContinued:(NSUserActivity *)userActivity; // - (void)userActivity:(NSUserActivity *)userActivity didReceiveInputStream:(NSInputStream *) inputStream outputStream:(NSOutputStream *)outputStream; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,introduced=6.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))) #ifndef _REWRITER_typedef_NSUUID #define _REWRITER_typedef_NSUUID typedef struct objc_object NSUUID; typedef struct {} _objc_exc_NSUUID; #endif struct NSUUID_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (instancetype)UUID; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithUUIDString:(NSString *)string; // - (instancetype)initWithUUIDBytes:(const uuid_t _Nullable)bytes; // - (void)getUUIDBytes:(uuid_t _Nonnull)uuid; // - (NSComparisonResult)compare:(NSUUID *)otherUUID __attribute__((availability(macos,introduced=12.0))) __attribute__((availability(ios,introduced=15.0))) __attribute__((availability(watchos,introduced=8.0))) __attribute__((availability(tvos,introduced=15.0))); // @property (readonly, copy) NSString *UUIDString; /* @end */ #pragma clang assume_nonnull end typedef struct CGAffineTransform CGAffineTransform; struct CGAffineTransform { CGFloat a, b, c, d; CGFloat tx, ty; }; extern "C" __attribute__((visibility("default"))) const CGAffineTransform CGAffineTransformIdentity __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformMakeTranslation(CGFloat tx, CGFloat ty) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformMakeScale(CGFloat sx, CGFloat sy) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformMakeRotation(CGFloat angle) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGAffineTransformIsIdentity(CGAffineTransform t) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformTranslate(CGAffineTransform t, CGFloat tx, CGFloat ty) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformScale(CGAffineTransform t, CGFloat sx, CGFloat sy) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformRotate(CGAffineTransform t, CGFloat angle) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformInvert(CGAffineTransform t) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGAffineTransform CGAffineTransformConcat(CGAffineTransform t1, CGAffineTransform t2) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) bool CGAffineTransformEqualToTransform(CGAffineTransform t1, CGAffineTransform t2) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGPoint CGPointApplyAffineTransform(CGPoint point, CGAffineTransform t) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGSize CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t) __attribute__((availability(macos,introduced=10.0))) __attribute__((availability(ios,introduced=2.0))); extern "C" __attribute__((visibility("default"))) CGRect CGRectApplyAffineTransform(CGRect rect, CGAffineTransform t) __attribute__((availability(macos,introduced=10.4))) __attribute__((availability(ios,introduced=2.0))); static inline CGAffineTransform __CGAffineTransformMake(CGFloat a, CGFloat b, CGFloat c, CGFloat d, CGFloat tx, CGFloat ty) { CGAffineTransform t; t.a = a; t.b = b; t.c = c; t.d = d; t.tx = tx; t.ty = ty; return t; } static inline CGPoint __CGPointApplyAffineTransform(CGPoint point, CGAffineTransform t) { CGPoint p; p.x = (CGFloat)((double)t.a * point.x + (double)t.c * point.y + t.tx); p.y = (CGFloat)((double)t.b * point.x + (double)t.d * point.y + t.ty); return p; } static inline CGSize __CGSizeApplyAffineTransform(CGSize size, CGAffineTransform t) { CGSize s; s.width = (CGFloat)((double)t.a * size.width + (double)t.c * size.height); s.height = (CGFloat)((double)t.b * size.width + (double)t.d * size.height); return s; } #pragma clang assume_nonnull begin typedef struct { CGFloat m11, m12, m21, m22; CGFloat tX, tY; } NSAffineTransformStruct; #ifndef _REWRITER_typedef_NSAffineTransform #define _REWRITER_typedef_NSAffineTransform typedef struct objc_object NSAffineTransform; typedef struct {} _objc_exc_NSAffineTransform; #endif struct NSAffineTransform_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSAffineTransform *)transform; // - (instancetype)initWithTransform:(NSAffineTransform *)transform; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (void)translateXBy:(CGFloat)deltaX yBy:(CGFloat)deltaY; // - (void)rotateByDegrees:(CGFloat)angle; // - (void)rotateByRadians:(CGFloat)angle; // - (void)scaleBy:(CGFloat)scale; // - (void)scaleXBy:(CGFloat)scaleX yBy:(CGFloat)scaleY; // - (void)invert; // - (void)appendTransform:(NSAffineTransform *)transform; // - (void)prependTransform:(NSAffineTransform *)transform; // - (NSPoint)transformPoint:(NSPoint)aPoint; // - (NSSize)transformSize:(NSSize)aSize; // @property NSAffineTransformStruct transformStruct; /* @end */ #pragma clang assume_nonnull end // @class NSAppleEventDescriptor; #ifndef _REWRITER_typedef_NSAppleEventDescriptor #define _REWRITER_typedef_NSAppleEventDescriptor typedef struct objc_object NSAppleEventDescriptor; typedef struct {} _objc_exc_NSAppleEventDescriptor; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #pragma clang assume_nonnull begin extern "C" NSString *const NSAppleScriptErrorMessage __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSAppleScriptErrorNumber __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSAppleScriptErrorAppName __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSAppleScriptErrorBriefMessage __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSAppleScriptErrorRange __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #ifndef _REWRITER_typedef_NSAppleScript #define _REWRITER_typedef_NSAppleScript typedef struct objc_object NSAppleScript; typedef struct {} _objc_exc_NSAppleScript; #endif struct NSAppleScript_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *_source; unsigned int _compiledScriptID; void *_reserved1; void *_reserved2; }; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url error:(NSDictionary<NSString *, id> * _Nullable * _Nullable)errorInfo __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithSource:(NSString *)source __attribute__((objc_designated_initializer)); // @property (nullable, readonly, copy) NSString *source; // @property (readonly, getter=isCompiled) BOOL compiled; // - (BOOL)compileAndReturnError:(NSDictionary<NSString *, id> * _Nullable * _Nullable)errorInfo; // - (NSAppleEventDescriptor *)executeAndReturnError:(NSDictionary<NSString *, id> * _Nullable * _Nullable)errorInfo; // - (NSAppleEventDescriptor *)executeAppleEvent:(NSAppleEventDescriptor *)event error:(NSDictionary<NSString *, id> * _Nullable * _Nullable)errorInfo; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSMutableData #define _REWRITER_typedef_NSMutableData typedef struct objc_object NSMutableData; typedef struct {} _objc_exc_NSMutableData; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.0,deprecated=10.13,message="Use NSKeyedArchiver instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSKeyedArchiver instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSKeyedArchiver instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSKeyedArchiver instead"))) #ifndef _REWRITER_typedef_NSArchiver #define _REWRITER_typedef_NSArchiver typedef struct objc_object NSArchiver; typedef struct {} _objc_exc_NSArchiver; #endif struct NSArchiver_IMPL { struct NSCoder_IMPL NSCoder_IVARS; void *mdata; void *pointerTable; void *stringTable; void *ids; void *map; void *replacementTable; void *reserved; }; // - (instancetype)initForWritingWithMutableData:(NSMutableData *)mdata __attribute__((objc_designated_initializer)); // @property (readonly, retain) NSMutableData *archiverData; // - (void)encodeRootObject:(id)rootObject; // - (void)encodeConditionalObject:(nullable id)object; // + (NSData *)archivedDataWithRootObject:(id)rootObject; // + (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path; // - (void)encodeClassName:(NSString *)trueName intoClassName:(NSString *)inArchiveName; // - (nullable NSString *)classNameEncodedForTrueClassName:(NSString *)trueName; // - (void)replaceObject:(id)object withObject:(id)newObject; /* @end */ __attribute__((availability(macos,introduced=10.0,deprecated=10.13,message="Use NSKeyedUnarchiver instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSKeyedUnarchiver instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSKeyedUnarchiver instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSKeyedUnarchiver instead"))) #ifndef _REWRITER_typedef_NSUnarchiver #define _REWRITER_typedef_NSUnarchiver typedef struct objc_object NSUnarchiver; typedef struct {} _objc_exc_NSUnarchiver; #endif struct NSUnarchiver_IMPL { struct NSCoder_IMPL NSCoder_IVARS; void *datax; NSUInteger cursor; NSZone *objectZone; NSUInteger systemVersion; signed char streamerVersion; char swap; char unused1; char unused2; void *pointerTable; void *stringTable; id classVersions; NSInteger lastLabel; void *map; void *allUnarchivedObjects; id reserved; }; // - (nullable instancetype)initForReadingWithData:(NSData *)data __attribute__((objc_designated_initializer)); // - (void)setObjectZone:(nullable NSZone *)zone ; // - (nullable NSZone *)objectZone ; // @property (getter=isAtEnd, readonly) BOOL atEnd; // @property (readonly) unsigned int systemVersion; // + (nullable id)unarchiveObjectWithData:(NSData *)data; // + (nullable id)unarchiveObjectWithFile:(NSString *)path; // + (void)decodeClassName:(NSString *)inArchiveName asClassName:(NSString *)trueName; // - (void)decodeClassName:(NSString *)inArchiveName asClassName:(NSString *)trueName; // + (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName; // - (NSString *)classNameDecodedForArchiveClassName:(NSString *)inArchiveName; // - (void)replaceObject:(id)object withObject:(id)newObject; /* @end */ // @interface NSObject (NSArchiverCallback) // @property (nullable, readonly) Class classForArchiver; // - (nullable id)replacementObjectForArchiver:(NSArchiver *)archiver __attribute__((availability(macos,introduced=10.0,deprecated=10.13,replacement="replacementObjectForCoder:"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,replacement="replacementObjectForCoder:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,replacement="replacementObjectForCoder:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,replacement="replacementObjectForCoder:"))); /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSInteger NSBackgroundActivityResult; enum { NSBackgroundActivityResultFinished = 1, NSBackgroundActivityResultDeferred = 2, } __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); typedef void (*NSBackgroundActivityCompletionHandler)(NSBackgroundActivityResult result) __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSBackgroundActivityScheduler #define _REWRITER_typedef_NSBackgroundActivityScheduler typedef struct objc_object NSBackgroundActivityScheduler; typedef struct {} _objc_exc_NSBackgroundActivityScheduler; #endif struct NSBackgroundActivityScheduler_IMPL { struct NSObject_IMPL NSObject_IVARS; id _private1; id _private2; id _private3; int64_t _flags; }; // - (instancetype)initWithIdentifier:(NSString *)identifier __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSString *identifier; // @property NSQualityOfService qualityOfService; // @property BOOL repeats; // @property NSTimeInterval interval; // @property NSTimeInterval tolerance; // - (void)scheduleWithBlock:(void (^)(NSBackgroundActivityCompletionHandler completionHandler))block __attribute__((swift_async(none))); // - (void)invalidate; // @property (readonly) BOOL shouldDefer; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSCalendar and NSDateComponents and NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSCalendar and NSDateComponents and NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSCalendar and NSDateComponents and NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSCalendar and NSDateComponents and NSDateFormatter instead"))) __attribute__((availability(swift, unavailable, message="Use NSCalendar and NSDateComponents and NSDateFormatter instead"))) #ifndef _REWRITER_typedef_NSCalendarDate #define _REWRITER_typedef_NSCalendarDate typedef struct objc_object NSCalendarDate; typedef struct {} _objc_exc_NSCalendarDate; #endif struct NSCalendarDate_IMPL { struct NSDate_IMPL NSDate_IVARS; NSUInteger refCount; NSTimeInterval _timeIntervalSinceReferenceDate; NSTimeZone *_timeZone; NSString *_formatString; void *_reserved; }; // + (id)calendarDate __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSCalendar instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSCalendar instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSCalendar instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSCalendar instead"))); // + (nullable id)dateWithString:(NSString *)description calendarFormat:(NSString *)format locale:(nullable id)locale __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); // + (nullable id)dateWithString:(NSString *)description calendarFormat:(NSString *)format __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); // + (id)dateWithYear:(NSInteger)year month:(NSUInteger)month day:(NSUInteger)day hour:(NSUInteger)hour minute:(NSUInteger)minute second:(NSUInteger)second timeZone:(nullable NSTimeZone *)aTimeZone __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSCalendar and NSDateComponents instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSCalendar and NSDateComponents instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSCalendar and NSDateComponents instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSCalendar and NSDateComponents instead"))); // - (NSCalendarDate *)dateByAddingYears:(NSInteger)year months:(NSInteger)month days:(NSInteger)day hours:(NSInteger)hour minutes:(NSInteger)minute seconds:(NSInteger)second __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSCalendar instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSCalendar instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSCalendar instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSCalendar instead"))); // - (NSInteger)dayOfCommonEra __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)dayOfMonth __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)dayOfWeek __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)dayOfYear __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)hourOfDay __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)minuteOfHour __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)monthOfYear __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)secondOfMinute __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSInteger)yearOfCommonEra __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar component:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar component:fromDate:]"))); // - (NSString *)calendarFormat __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (NSString *)descriptionWithCalendarFormat:(NSString *)format locale:(nullable id)locale __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (NSString *)descriptionWithCalendarFormat:(NSString *)format __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (NSString *)descriptionWithLocale:(nullable id)locale __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (NSTimeZone *)timeZone __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (nullable id)initWithString:(NSString *)description calendarFormat:(NSString *)format locale:(nullable id)locale __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); // - (nullable id)initWithString:(NSString *)description calendarFormat:(NSString *)format __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); // - (nullable id)initWithString:(NSString *)description __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); // - (id)initWithYear:(NSInteger)year month:(NSUInteger)month day:(NSUInteger)day hour:(NSUInteger)hour minute:(NSUInteger)minute second:(NSUInteger)second timeZone:(nullable NSTimeZone *)aTimeZone __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSCalendar and NSDateComponents instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSCalendar and NSDateComponents instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSCalendar and NSDateComponents instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSCalendar and NSDateComponents instead"))); // - (void)setCalendarFormat:(nullable NSString *)format __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (void)setTimeZone:(nullable NSTimeZone *)aTimeZone __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (void)years:(nullable NSInteger *)yp months:(nullable NSInteger *)mop days:(nullable NSInteger *)dp hours:(nullable NSInteger *)hp minutes:(nullable NSInteger *)mip seconds:(nullable NSInteger *)sp sinceDate:(NSCalendarDate *)date __attribute__((availability(macos,introduced=10.4,deprecated=10.10,replacement="-[NSCalendar components:fromDate:]"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,replacement="-[NSCalendar components:fromDate:]"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,replacement="-[NSCalendar components:fromDate:]"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,replacement="-[NSCalendar components:fromDate:]"))); // + (instancetype)distantFuture __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // + (instancetype)distantPast __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); /* @end */ // @interface NSDate (NSCalendarDateExtras) // + (nullable id)dateWithNaturalLanguageString:(NSString *)string locale:(nullable id)locale __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))); // + (nullable id)dateWithNaturalLanguageString:(NSString *)string __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Create an NSDateFormatter with `init` and set the dateFormat property instead."))); // + (id)dateWithString:(NSString *)aString __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); // - (NSCalendarDate *)dateWithCalendarFormat:(nullable NSString *)format timeZone:(nullable NSTimeZone *)aTimeZone __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (nullable NSString *)descriptionWithCalendarFormat:(nullable NSString *)format timeZone:(nullable NSTimeZone *)aTimeZone locale:(nullable id)locale __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (nullable id)initWithString:(NSString *)description __attribute__((availability(macos,introduced=10.4,deprecated=10.10,message="Use NSDateFormatter instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=8.0,message="Use NSDateFormatter instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSDateFormatter instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSDateFormatter instead"))); /* @end */ #pragma clang assume_nonnull end // @class NSMutableData; #ifndef _REWRITER_typedef_NSMutableData #define _REWRITER_typedef_NSMutableData typedef struct objc_object NSMutableData; typedef struct {} _objc_exc_NSMutableData; #endif #ifndef _REWRITER_typedef_NSDistantObject #define _REWRITER_typedef_NSDistantObject typedef struct objc_object NSDistantObject; typedef struct {} _objc_exc_NSDistantObject; #endif #ifndef _REWRITER_typedef_NSException #define _REWRITER_typedef_NSException typedef struct objc_object NSException; typedef struct {} _objc_exc_NSException; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif // @class NSPort; #ifndef _REWRITER_typedef_NSPort #define _REWRITER_typedef_NSPort typedef struct objc_object NSPort; typedef struct {} _objc_exc_NSPort; #endif #ifndef _REWRITER_typedef_NSRunLoop #define _REWRITER_typedef_NSRunLoop typedef struct objc_object NSRunLoop; typedef struct {} _objc_exc_NSRunLoop; #endif #ifndef _REWRITER_typedef_NSPortNameServer #define _REWRITER_typedef_NSPortNameServer typedef struct objc_object NSPortNameServer; typedef struct {} _objc_exc_NSPortNameServer; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSDistantObjectRequest; #ifndef _REWRITER_typedef_NSDistantObjectRequest #define _REWRITER_typedef_NSDistantObjectRequest typedef struct objc_object NSDistantObjectRequest; typedef struct {} _objc_exc_NSDistantObjectRequest; #endif // @protocol NSConnectionDelegate; __attribute__((objc_arc_weak_reference_unavailable)) #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSConnection #define _REWRITER_typedef_NSConnection typedef struct objc_object NSConnection; typedef struct {} _objc_exc_NSConnection; #endif struct NSConnection__T_1 { unsigned char authGen : 1; unsigned char authCheck : 1; unsigned char _reserved1 : 1; unsigned char _reserved2 : 1; unsigned char doRequest : 1; unsigned char isQueueing : 1; unsigned char isMulti : 1; unsigned char invalidateRP : 1; } ; struct NSConnection_IMPL { struct NSObject_IMPL NSObject_IVARS; id receivePort; id sendPort; id delegate; int32_t busy; int32_t localProxyCount; int32_t waitCount; id delayedRL; id statistics; unsigned char isDead; unsigned char isValid; unsigned char wantsInvalid; struct NSConnection__T_1 NSConnection__GRBF_1; id ___1; id ___2; id runLoops; id requestModes; id rootObject; void *registerInfo; id replMode; id classInfoImported; id releasedProxies; id reserved; }; // @property (readonly, copy) NSDictionary<NSString *, NSNumber *> *statistics; // + (NSArray<NSConnection *> *)allConnections; // + (NSConnection *)defaultConnection __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (nullable instancetype)connectionWithRegisteredName:(NSString *)name host:(nullable NSString *)hostName; // + (nullable instancetype)connectionWithRegisteredName:(NSString *)name host:(nullable NSString *)hostName usingNameServer:(NSPortNameServer *)server; // + (nullable NSDistantObject *)rootProxyForConnectionWithRegisteredName:(NSString *)name host:(nullable NSString *)hostName; // + (nullable NSDistantObject *)rootProxyForConnectionWithRegisteredName:(NSString *)name host:(nullable NSString *)hostName usingNameServer:(NSPortNameServer *)server; // + (nullable instancetype)serviceConnectionWithName:(NSString *)name rootObject:(id)root usingNameServer:(NSPortNameServer *)server __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // + (nullable instancetype)serviceConnectionWithName:(NSString *)name rootObject:(id)root __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); // @property NSTimeInterval requestTimeout; // @property NSTimeInterval replyTimeout; // @property (nullable, retain) id rootObject; // @property (nullable, assign) id<NSConnectionDelegate> delegate; // @property BOOL independentConversationQueueing; // @property (readonly, getter=isValid) BOOL valid; // @property (readonly, retain) NSDistantObject *rootProxy; // - (void)invalidate; // - (void)addRequestMode:(NSString *)rmode; // - (void)removeRequestMode:(NSString *)rmode; // @property (readonly, copy) NSArray<NSString *> *requestModes; // - (BOOL)registerName:(nullable NSString *) name; // - (BOOL)registerName:(nullable NSString *) name withNameServer:(NSPortNameServer *)server; // + (nullable instancetype)connectionWithReceivePort:(nullable NSPort *)receivePort sendPort:(nullable NSPort *)sendPort; // + (nullable id)currentConversation; // - (nullable instancetype)initWithReceivePort:(nullable NSPort *)receivePort sendPort:(nullable NSPort *)sendPort; // @property (readonly, retain) NSPort *sendPort; // @property (readonly, retain) NSPort *receivePort; // - (void)enableMultipleThreads; // @property (readonly) BOOL multipleThreadsEnabled; // - (void)addRunLoop:(NSRunLoop *)runloop; // - (void)removeRunLoop:(NSRunLoop *)runloop; // - (void)runInNewThread; // @property (readonly, copy) NSArray *remoteObjects; // @property (readonly, copy) NSArray *localObjects; // - (void)dispatchWithComponents:(NSArray *)components __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,introduced=5.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ extern "C" NSString * const NSConnectionReplyMode __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); extern "C" NSString * const NSConnectionDidDieNotification __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) // @protocol NSConnectionDelegate <NSObject> /* @optional */ // - (BOOL)makeNewConnection:(NSConnection *)conn sender:(NSConnection *)ancestor; // - (BOOL)connection:(NSConnection *)ancestor shouldMakeNewConnection:(NSConnection *)conn; // - (NSData *)authenticationDataForComponents:(NSArray *)components; // - (BOOL)authenticateComponents:(NSArray *)components withData:(NSData *)signature; // - (id)createConversationForConnection:(NSConnection *)conn; // - (BOOL)connection:(NSConnection *)connection handleRequest:(NSDistantObjectRequest *)doreq; /* @end */ extern "C" NSString * const NSFailedAuthenticationException __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); extern "C" NSString * const NSConnectionDidInitializeNotification __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSDistantObjectRequest #define _REWRITER_typedef_NSDistantObjectRequest typedef struct objc_object NSDistantObjectRequest; typedef struct {} _objc_exc_NSDistantObjectRequest; #endif struct NSDistantObjectRequest_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // @property (readonly, retain) NSInvocation *invocation; // @property (readonly, retain) NSConnection *connection; // @property (readonly, retain) id conversation; // - (void)replyWithException:(nullable NSException *)exception; /* @end */ #pragma clang assume_nonnull end // @class Protocol; #ifndef _REWRITER_typedef_Protocol #define _REWRITER_typedef_Protocol typedef struct objc_object Protocol; typedef struct {} _objc_exc_Protocol; #endif #ifndef _REWRITER_typedef_NSConnection #define _REWRITER_typedef_NSConnection typedef struct objc_object NSConnection; typedef struct {} _objc_exc_NSConnection; #endif #ifndef _REWRITER_typedef_NSCoder #define _REWRITER_typedef_NSCoder typedef struct objc_object NSCoder; typedef struct {} _objc_exc_NSCoder; #endif #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSDistantObject #define _REWRITER_typedef_NSDistantObject typedef struct objc_object NSDistantObject; typedef struct {} _objc_exc_NSDistantObject; #endif struct NSDistantObject_IMPL { struct NSProxy_IMPL NSProxy_IVARS; id _knownSelectors; NSUInteger _wireCount; NSUInteger _refCount; id _proto; uint16_t ___2; uint8_t ___1; uint8_t _wireType; id _remoteClass; }; // + (nullable id)proxyWithTarget:(id)target connection:(NSConnection *)connection; // - (nullable instancetype)initWithTarget:(id)target connection:(NSConnection *)connection; // + (id)proxyWithLocal:(id)target connection:(NSConnection *)connection; // - (instancetype)initWithLocal:(id)target connection:(NSConnection *)connection; // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (void)setProtocolForProxy:(nullable Protocol *)proto; // @property (readonly, retain) NSConnection *connectionForProxy; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin typedef NSString * NSDistributedNotificationCenterType __attribute__((swift_wrapper(struct))); extern "C" NSDistributedNotificationCenterType const NSLocalNotificationCenterType; typedef NSUInteger NSNotificationSuspensionBehavior; enum { NSNotificationSuspensionBehaviorDrop = 1, NSNotificationSuspensionBehaviorCoalesce = 2, NSNotificationSuspensionBehaviorHold = 3, NSNotificationSuspensionBehaviorDeliverImmediately = 4 }; typedef NSUInteger NSDistributedNotificationOptions; enum { NSDistributedNotificationDeliverImmediately = (1UL << 0), NSDistributedNotificationPostToAllSessions = (1UL << 1) }; static const NSDistributedNotificationOptions NSNotificationDeliverImmediately = NSDistributedNotificationDeliverImmediately; static const NSDistributedNotificationOptions NSNotificationPostToAllSessions = NSDistributedNotificationPostToAllSessions; #ifndef _REWRITER_typedef_NSDistributedNotificationCenter #define _REWRITER_typedef_NSDistributedNotificationCenter typedef struct objc_object NSDistributedNotificationCenter; typedef struct {} _objc_exc_NSDistributedNotificationCenter; #endif struct NSDistributedNotificationCenter_IMPL { struct NSNotificationCenter_IMPL NSNotificationCenter_IVARS; }; // + (NSDistributedNotificationCenter *)notificationCenterForType:(NSDistributedNotificationCenterType)notificationCenterType; // + (NSDistributedNotificationCenter *)defaultCenter; // - (void)addObserver:(id)observer selector:(SEL)selector name:(nullable NSNotificationName)name object:(nullable NSString *)object suspensionBehavior:(NSNotificationSuspensionBehavior)suspensionBehavior; // - (void)postNotificationName:(NSNotificationName)name object:(nullable NSString *)object userInfo:(nullable NSDictionary *)userInfo deliverImmediately:(BOOL)deliverImmediately; // - (void)postNotificationName:(NSNotificationName)name object:(nullable NSString *)object userInfo:(nullable NSDictionary *)userInfo options:(NSDistributedNotificationOptions)options; // @property BOOL suspended; // - (void)addObserver:(id)observer selector:(SEL)aSelector name:(nullable NSNotificationName)aName object:(nullable NSString *)anObject; // - (void)postNotificationName:(NSNotificationName)aName object:(nullable NSString *)anObject; // - (void)postNotificationName:(NSNotificationName)aName object:(nullable NSString *)anObject userInfo:(nullable NSDictionary *)aUserInfo; // - (void)removeObserver:(id)observer name:(nullable NSNotificationName)aName object:(nullable NSString *)anObject; /* @end */ #pragma clang assume_nonnull end // @class NSConnection; #ifndef _REWRITER_typedef_NSConnection #define _REWRITER_typedef_NSConnection typedef struct objc_object NSConnection; typedef struct {} _objc_exc_NSConnection; #endif #ifndef _REWRITER_typedef_NSPort #define _REWRITER_typedef_NSPort typedef struct objc_object NSPort; typedef struct {} _objc_exc_NSPort; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSPortCoder #define _REWRITER_typedef_NSPortCoder typedef struct objc_object NSPortCoder; typedef struct {} _objc_exc_NSPortCoder; #endif struct NSPortCoder_IMPL { struct NSCoder_IMPL NSCoder_IVARS; }; // - (BOOL)isBycopy; // - (BOOL)isByref; // - (void)encodePortObject:(NSPort *)aport; // - (nullable NSPort *)decodePortObject; // - (nullable NSConnection *)connection __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // + (id) portCoderWithReceivePort:(nullable NSPort *)rcvPort sendPort:(nullable NSPort *)sndPort components:(nullable NSArray *)comps __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (id)initWithReceivePort:(nullable NSPort *)rcvPort sendPort:(nullable NSPort *)sndPort components:(nullable NSArray *)comps __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); // - (void)dispatch __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message=""))) __attribute__((availability(ios,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message=""))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message=""))); /* @end */ // @interface NSObject (NSDistributedObjects) // @property (readonly) Class classForPortCoder __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); // - (nullable id)replacementObjectForPortCoder:(NSPortCoder *)coder __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))); /* @end */ #pragma clang assume_nonnull end // @class NSPort; #ifndef _REWRITER_typedef_NSPort #define _REWRITER_typedef_NSPort typedef struct objc_object NSPort; typedef struct {} _objc_exc_NSPort; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSPortMessage #define _REWRITER_typedef_NSPortMessage typedef struct objc_object NSPortMessage; typedef struct {} _objc_exc_NSPortMessage; #endif struct NSPortMessage_IMPL { struct NSObject_IMPL NSObject_IVARS; NSPort *localPort; NSPort *remotePort; NSMutableArray *components; uint32_t msgid; void *reserved2; void *reserved; }; // - (instancetype)initWithSendPort:(nullable NSPort *)sendPort receivePort:(nullable NSPort *)replyPort components:(nullable NSArray *)components __attribute__((objc_designated_initializer)); // @property (nullable, readonly, copy) NSArray *components; // @property (nullable, readonly, retain) NSPort *receivePort; // @property (nullable, readonly, retain) NSPort *sendPort; // - (BOOL)sendBeforeDate:(NSDate *)date; // @property uint32_t msgid; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSPort #define _REWRITER_typedef_NSPort typedef struct objc_object NSPort; typedef struct {} _objc_exc_NSPort; #endif #pragma clang assume_nonnull begin __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSPortNameServer #define _REWRITER_typedef_NSPortNameServer typedef struct objc_object NSPortNameServer; typedef struct {} _objc_exc_NSPortNameServer; #endif struct NSPortNameServer_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (NSPortNameServer *)systemDefaultPortNameServer; // - (nullable NSPort *)portForName:(NSString *)name; // - (nullable NSPort *)portForName:(NSString *)name host:(nullable NSString *)host; // - (BOOL)registerPort:(NSPort *)port name:(NSString *)name; // - (BOOL)removePortForName:(NSString *)name; /* @end */ __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSMachBootstrapServer #define _REWRITER_typedef_NSMachBootstrapServer typedef struct objc_object NSMachBootstrapServer; typedef struct {} _objc_exc_NSMachBootstrapServer; #endif struct NSMachBootstrapServer_IMPL { struct NSPortNameServer_IMPL NSPortNameServer_IVARS; }; // + (id)sharedInstance; // - (nullable NSPort *)portForName:(NSString *)name; // - (nullable NSPort *)portForName:(NSString *)name host:(nullable NSString *)host; // - (BOOL)registerPort:(NSPort *)port name:(NSString *)name; // - (nullable NSPort *)servicePortWithName:(NSString *)name __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSMessagePortNameServer #define _REWRITER_typedef_NSMessagePortNameServer typedef struct objc_object NSMessagePortNameServer; typedef struct {} _objc_exc_NSMessagePortNameServer; #endif struct NSMessagePortNameServer_IMPL { struct NSPortNameServer_IMPL NSPortNameServer_IVARS; }; // + (id)sharedInstance; // - (nullable NSPort *)portForName:(NSString *)name; // - (nullable NSPort *)portForName:(NSString *)name host:(nullable NSString *)host; /* @end */ __attribute__((availability(macosx,introduced=10.0,deprecated=10.13,message="Use NSXPCConnection instead"))) __attribute__((availability(ios,introduced=2.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(watchos,introduced=2.0,deprecated=4.0,message="Use NSXPCConnection instead"))) __attribute__((availability(tvos,introduced=9.0,deprecated=11.0,message="Use NSXPCConnection instead"))) __attribute__((availability(swift, unavailable, message="Use NSXPCConnection instead"))) #ifndef _REWRITER_typedef_NSSocketPortNameServer #define _REWRITER_typedef_NSSocketPortNameServer typedef struct objc_object NSSocketPortNameServer; typedef struct {} _objc_exc_NSSocketPortNameServer; #endif struct NSSocketPortNameServer_IMPL { struct NSPortNameServer_IMPL NSPortNameServer_IVARS; }; // + (id)sharedInstance; // - (nullable NSPort *)portForName:(NSString *)name; // - (nullable NSPort *)portForName:(NSString *)name host:(nullable NSString *)host; // - (BOOL)registerPort:(NSPort *)port name:(NSString *)name; // - (BOOL)removePortForName:(NSString *)name; // - (nullable NSPort *)portForName:(NSString *)name host:(nullable NSString *)host nameServerPortNumber:(uint16_t)portNumber; // - (BOOL)registerPort:(NSPort *)port name:(NSString *)name nameServerPortNumber:(uint16_t)portNumber; // @property uint16_t defaultNameServerPortNumber; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSProtocolChecker #define _REWRITER_typedef_NSProtocolChecker typedef struct objc_object NSProtocolChecker; typedef struct {} _objc_exc_NSProtocolChecker; #endif struct NSProtocolChecker_IMPL { struct NSProxy_IMPL NSProxy_IVARS; }; // @property (readonly) Protocol *protocol; // @property (nullable, readonly, retain) NSObject *target; /* @end */ // @interface NSProtocolChecker (NSProtocolCheckerCreation) // + (instancetype)protocolCheckerWithTarget:(NSObject *)anObject protocol:(Protocol *)aProtocol; // - (instancetype)initWithTarget:(NSObject *)anObject protocol:(Protocol *)aProtocol; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef NSInteger NSTaskTerminationReason; enum { NSTaskTerminationReasonExit = 1, NSTaskTerminationReasonUncaughtSignal = 2 } __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #ifndef _REWRITER_typedef_NSTask #define _REWRITER_typedef_NSTask typedef struct objc_object NSTask; typedef struct {} _objc_exc_NSTask; #endif struct NSTask_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (instancetype)init __attribute__((objc_designated_initializer)); // @property (nullable, copy) NSURL *executableURL __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) NSArray<NSString *> *arguments; // @property (nullable, copy) NSDictionary<NSString *, NSString *> *environment; // @property (nullable, copy) NSURL *currentDirectoryURL __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, retain) id standardInput; // @property (nullable, retain) id standardOutput; // @property (nullable, retain) id standardError; // - (BOOL)launchAndReturnError:(out NSError **_Nullable)error __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)interrupt; // - (void)terminate; // - (BOOL)suspend; // - (BOOL)resume; // @property (readonly) int processIdentifier; // @property (readonly, getter=isRunning) BOOL running; // @property (readonly) int terminationStatus; // @property (readonly) NSTaskTerminationReason terminationReason __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) void (^terminationHandler)(NSTask *) __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property NSQualityOfService qualityOfService __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,introduced=8.0))) __attribute__((availability(watchos,introduced=2.0))) __attribute__((availability(tvos,introduced=9.0))); /* @end */ // @interface NSTask (NSTaskConveniences) // + (nullable NSTask *)launchedTaskWithExecutableURL:(NSURL *)url arguments:(NSArray<NSString *> *)arguments error:(out NSError ** _Nullable)error terminationHandler:(void (^_Nullable)(NSTask *))terminationHandler __attribute__((availability(macos,introduced=10.13))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)waitUntilExit; /* @end */ // @interface NSTask (NSDeprecated) // @property (nullable, copy) NSString *launchPath __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="executableURL"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (copy) NSString *currentDirectoryPath __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="currentDirectoryURL"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)launch __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="launchAndReturnError:"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSTask *)launchedTaskWithLaunchPath:(NSString *)path arguments:(NSArray<NSString *> *)arguments __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="launchedTaskWithExecutableURL:arguments:error:"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ extern "C" NSNotificationName const NSTaskDidTerminateNotification; #pragma clang assume_nonnull end typedef NSUInteger NSXMLNodeOptions; enum { NSXMLNodeOptionsNone = 0, NSXMLNodeIsCDATA = 1UL << 0, NSXMLNodeExpandEmptyElement = 1UL << 1, NSXMLNodeCompactEmptyElement = 1UL << 2, NSXMLNodeUseSingleQuotes = 1UL << 3, NSXMLNodeUseDoubleQuotes = 1UL << 4, NSXMLNodeNeverEscapeContents = 1UL << 5, NSXMLDocumentTidyHTML = 1UL << 9, NSXMLDocumentTidyXML = 1UL << 10, NSXMLDocumentValidate = 1UL << 13, NSXMLNodeLoadExternalEntitiesAlways = 1UL << 14, NSXMLNodeLoadExternalEntitiesSameOriginOnly = 1UL << 15, NSXMLNodeLoadExternalEntitiesNever = 1UL << 19, NSXMLDocumentXInclude = 1UL << 16, NSXMLNodePrettyPrint = 1UL << 17, NSXMLDocumentIncludeContentTypeDeclaration = 1UL << 18, NSXMLNodePreserveNamespaceOrder = 1UL << 20, NSXMLNodePreserveAttributeOrder = 1UL << 21, NSXMLNodePreserveEntities = 1UL << 22, NSXMLNodePreservePrefixes = 1UL << 23, NSXMLNodePreserveCDATA = 1UL << 24, NSXMLNodePreserveWhitespace = 1UL << 25, NSXMLNodePreserveDTD = 1UL << 26, NSXMLNodePreserveCharacterReferences = 1UL << 27, NSXMLNodePromoteSignificantWhitespace = 1UL << 28, NSXMLNodePreserveEmptyElements = (NSXMLNodeExpandEmptyElement | NSXMLNodeCompactEmptyElement), NSXMLNodePreserveQuotes = (NSXMLNodeUseSingleQuotes | NSXMLNodeUseDoubleQuotes), NSXMLNodePreserveAll = ( NSXMLNodePreserveNamespaceOrder | NSXMLNodePreserveAttributeOrder | NSXMLNodePreserveEntities | NSXMLNodePreservePrefixes | NSXMLNodePreserveCDATA | NSXMLNodePreserveEmptyElements | NSXMLNodePreserveQuotes | NSXMLNodePreserveWhitespace | NSXMLNodePreserveDTD | NSXMLNodePreserveCharacterReferences | 0xFFF00000) }; // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif // @class NSXMLElement; #ifndef _REWRITER_typedef_NSXMLElement #define _REWRITER_typedef_NSXMLElement typedef struct objc_object NSXMLElement; typedef struct {} _objc_exc_NSXMLElement; #endif #ifndef _REWRITER_typedef_NSXMLDocument #define _REWRITER_typedef_NSXMLDocument typedef struct objc_object NSXMLDocument; typedef struct {} _objc_exc_NSXMLDocument; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSXMLNodeKind; enum { NSXMLInvalidKind = 0, NSXMLDocumentKind, NSXMLElementKind, NSXMLAttributeKind, NSXMLNamespaceKind, NSXMLProcessingInstructionKind, NSXMLCommentKind, NSXMLTextKind, NSXMLDTDKind __attribute__((swift_name("DTDKind"))), NSXMLEntityDeclarationKind, NSXMLAttributeDeclarationKind, NSXMLElementDeclarationKind, NSXMLNotationDeclarationKind }; #ifndef _REWRITER_typedef_NSXMLNode #define _REWRITER_typedef_NSXMLNode typedef struct objc_object NSXMLNode; typedef struct {} _objc_exc_NSXMLNode; #endif struct NSXMLNode__T_1 { NSXMLNodeKind _kind : 4; uint32_t _index : 28; } ; struct NSXMLNode_IMPL { struct NSObject_IMPL NSObject_IVARS; NSXMLNode *_parent; id _objectValue; struct NSXMLNode__T_1 NSXMLNode__GRBF_1; int32_t _private; }; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithKind:(NSXMLNodeKind)kind; // - (instancetype)initWithKind:(NSXMLNodeKind)kind options:(NSXMLNodeOptions)options __attribute__((objc_designated_initializer)); // + (id)document; // + (id)documentWithRootElement:(NSXMLElement *)element; // + (id)elementWithName:(NSString *)name; // + (id)elementWithName:(NSString *)name URI:(NSString *)URI; // + (id)elementWithName:(NSString *)name stringValue:(NSString *)string; // + (id)elementWithName:(NSString *)name children:(nullable NSArray<NSXMLNode *> *)children attributes:(nullable NSArray<NSXMLNode *> *)attributes; // + (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue; // + (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSString *)stringValue; // + (id)namespaceWithName:(NSString *)name stringValue:(NSString *)stringValue; // + (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)stringValue; // + (id)commentWithStringValue:(NSString *)stringValue; // + (id)textWithStringValue:(NSString *)stringValue; // + (nullable id)DTDNodeWithXMLString:(NSString *)string; // @property (readonly) NSXMLNodeKind kind; // @property (nullable, copy) NSString *name; // @property (nullable, retain) id objectValue; // @property (nullable, copy) NSString *stringValue; // - (void)setStringValue:(NSString *)string resolvingEntities:(BOOL)resolve; // @property (readonly) NSUInteger index; // @property (readonly) NSUInteger level; // @property (nullable, readonly, retain) NSXMLDocument *rootDocument; // @property (nullable, readonly, copy) NSXMLNode *parent; // @property (readonly) NSUInteger childCount; // @property (nullable, readonly, copy) NSArray<NSXMLNode *> *children; // - (nullable NSXMLNode *)childAtIndex:(NSUInteger)index; // @property (nullable, readonly, copy) NSXMLNode *previousSibling; // @property (nullable, readonly, copy) NSXMLNode *nextSibling; // @property (nullable, readonly, copy) NSXMLNode *previousNode; // @property (nullable, readonly, copy) NSXMLNode *nextNode; // - (void)detach; // @property (nullable, readonly, copy) NSString *XPath; // @property (nullable, readonly, copy) NSString *localName; // @property (nullable, readonly, copy) NSString *prefix; // @property (nullable, copy) NSString *URI; // + (NSString *)localNameForName:(NSString *)name; // + (nullable NSString *)prefixForName:(NSString *)name; // + (nullable NSXMLNode *)predefinedNamespaceForPrefix:(NSString *)name; // @property (readonly, copy) NSString *description; // @property (readonly, copy) NSString *XMLString; // - (NSString *)XMLStringWithOptions:(NSXMLNodeOptions)options; // - (NSString *)canonicalXMLStringPreservingComments:(BOOL)comments; // - (nullable NSArray<__kindof NSXMLNode *> *)nodesForXPath:(NSString *)xpath error:(NSError **)error; // - (nullable NSArray *)objectsForXQuery:(NSString *)xquery constants:(nullable NSDictionary<NSString *, id> *)constants error:(NSError **)error; // - (nullable NSArray *)objectsForXQuery:(NSString *)xquery error:(NSError **)error; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif // @class NSXMLDTDNode; #ifndef _REWRITER_typedef_NSXMLDTDNode #define _REWRITER_typedef_NSXMLDTDNode typedef struct objc_object NSXMLDTDNode; typedef struct {} _objc_exc_NSXMLDTDNode; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSXMLDTD #define _REWRITER_typedef_NSXMLDTD typedef struct objc_object NSXMLDTD; typedef struct {} _objc_exc_NSXMLDTD; #endif struct NSXMLDTD_IMPL { struct NSXMLNode_IMPL NSXMLNode_IVARS; NSString *_name; NSString *_publicID; NSString *_systemID; NSArray *_children; BOOL _childrenHaveMutated; uint8_t _padding3[3]; NSMutableDictionary *_entities; NSMutableDictionary *_elements; NSMutableDictionary *_notations; NSMutableDictionary *_attributes; NSString *_original; BOOL _modified; uint8_t _padding2[3]; }; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (instancetype)initWithKind:(NSXMLNodeKind)kind options:(NSXMLNodeOptions)options __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSXMLNodeOptions)mask error:(NSError **)error; // - (nullable instancetype)initWithData:(NSData *)data options:(NSXMLNodeOptions)mask error:(NSError **)error __attribute__((objc_designated_initializer)); // @property (nullable, copy) NSString *publicID; // @property (nullable, copy) NSString *systemID; // - (void)insertChild:(NSXMLNode *)child atIndex:(NSUInteger)index; // - (void)insertChildren:(NSArray<NSXMLNode *> *)children atIndex:(NSUInteger)index; // - (void)removeChildAtIndex:(NSUInteger)index; // - (void)setChildren:(nullable NSArray<NSXMLNode *> *)children; // - (void)addChild:(NSXMLNode *)child; // - (void)replaceChildAtIndex:(NSUInteger)index withNode:(NSXMLNode *)node; // - (nullable NSXMLDTDNode *)entityDeclarationForName:(NSString *)name; // - (nullable NSXMLDTDNode *)notationDeclarationForName:(NSString *)name; // - (nullable NSXMLDTDNode *)elementDeclarationForName:(NSString *)name; // - (nullable NSXMLDTDNode *)attributeDeclarationForName:(NSString *)name elementName:(NSString *)elementName; // + (nullable NSXMLDTDNode *)predefinedEntityDeclarationForName:(NSString *)name; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin typedef NSUInteger NSXMLDTDNodeKind; enum { NSXMLEntityGeneralKind = 1, NSXMLEntityParsedKind, NSXMLEntityUnparsedKind, NSXMLEntityParameterKind, NSXMLEntityPredefined, NSXMLAttributeCDATAKind, NSXMLAttributeIDKind, NSXMLAttributeIDRefKind, NSXMLAttributeIDRefsKind, NSXMLAttributeEntityKind, NSXMLAttributeEntitiesKind, NSXMLAttributeNMTokenKind, NSXMLAttributeNMTokensKind, NSXMLAttributeEnumerationKind, NSXMLAttributeNotationKind, NSXMLElementDeclarationUndefinedKind, NSXMLElementDeclarationEmptyKind, NSXMLElementDeclarationAnyKind, NSXMLElementDeclarationMixedKind, NSXMLElementDeclarationElementKind }; #ifndef _REWRITER_typedef_NSXMLDTDNode #define _REWRITER_typedef_NSXMLDTDNode typedef struct objc_object NSXMLDTDNode; typedef struct {} _objc_exc_NSXMLDTDNode; #endif struct NSXMLDTDNode_IMPL { struct NSXMLNode_IMPL NSXMLNode_IVARS; NSXMLDTDNodeKind _DTDKind; NSString *_name; NSString *_notationName; NSString *_publicID; NSString *_systemID; }; // - (nullable instancetype)initWithXMLString:(NSString *)string __attribute__((objc_designated_initializer)); // - (instancetype)initWithKind:(NSXMLNodeKind)kind options:(NSXMLNodeOptions)options __attribute__((objc_designated_initializer)); // - (instancetype)init __attribute__((objc_designated_initializer)); // @property NSXMLDTDNodeKind DTDKind; // @property (readonly, getter=isExternal) BOOL external; // @property (nullable, copy) NSString *publicID; // @property (nullable, copy) NSString *systemID; // @property (nullable, copy) NSString *notationName; /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSXMLDTD #define _REWRITER_typedef_NSXMLDTD typedef struct objc_object NSXMLDTD; typedef struct {} _objc_exc_NSXMLDTD; #endif #ifndef _REWRITER_typedef_NSXMLDocument #define _REWRITER_typedef_NSXMLDocument typedef struct objc_object NSXMLDocument; typedef struct {} _objc_exc_NSXMLDocument; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSXMLDocumentContentKind; enum { NSXMLDocumentXMLKind = 0, NSXMLDocumentXHTMLKind, NSXMLDocumentHTMLKind, NSXMLDocumentTextKind }; #ifndef _REWRITER_typedef_NSXMLDocument #define _REWRITER_typedef_NSXMLDocument typedef struct objc_object NSXMLDocument; typedef struct {} _objc_exc_NSXMLDocument; #endif struct NSXMLDocument_IMPL { struct NSXMLNode_IMPL NSXMLNode_IVARS; NSString *_encoding; NSString *_version; NSXMLDTD *_docType; NSArray *_children; BOOL _childrenHaveMutated; BOOL _standalone; int8_t padding[2]; NSXMLElement *_rootElement; NSString *_URI; id _extraIvars; NSUInteger _fidelityMask; NSXMLDocumentContentKind _contentKind; }; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithXMLString:(NSString *)string options:(NSXMLNodeOptions)mask error:(NSError **)error; // - (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSXMLNodeOptions)mask error:(NSError **)error; // - (nullable instancetype)initWithData:(NSData *)data options:(NSXMLNodeOptions)mask error:(NSError **)error __attribute__((objc_designated_initializer)); // - (instancetype)initWithRootElement:(nullable NSXMLElement *)element __attribute__((objc_designated_initializer)); // + (Class)replacementClassForClass:(Class)cls; // @property (nullable, copy) NSString *characterEncoding; // @property (nullable, copy) NSString *version; // @property (getter=isStandalone) BOOL standalone; // @property NSXMLDocumentContentKind documentContentKind; // @property (nullable, copy) NSString *MIMEType; // @property (nullable, copy) NSXMLDTD *DTD; // - (void)setRootElement:(NSXMLElement *)root; // - (nullable NSXMLElement *)rootElement; // - (void)insertChild:(NSXMLNode *)child atIndex:(NSUInteger)index; // - (void)insertChildren:(NSArray<NSXMLNode *> *)children atIndex:(NSUInteger)index; // - (void)removeChildAtIndex:(NSUInteger)index; // - (void)setChildren:(nullable NSArray<NSXMLNode *> *)children; // - (void)addChild:(NSXMLNode *)child; // - (void)replaceChildAtIndex:(NSUInteger)index withNode:(NSXMLNode *)node; // @property (readonly, copy) NSData *XMLData; // - (NSData *)XMLDataWithOptions:(NSXMLNodeOptions)options; // - (nullable id)objectByApplyingXSLT:(NSData *)xslt arguments:(nullable NSDictionary<NSString *, NSString *> *)arguments error:(NSError **)error; // - (nullable id)objectByApplyingXSLTString:(NSString *)xslt arguments:(nullable NSDictionary<NSString *, NSString *> *)arguments error:(NSError **)error; // - (nullable id)objectByApplyingXSLTAtURL:(NSURL *)xsltURL arguments:(nullable NSDictionary<NSString *, NSString *> *)argument error:(NSError **)error; // - (BOOL)validateAndReturnError:(NSError **)error; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #ifndef _REWRITER_typedef_NSEnumerator #define _REWRITER_typedef_NSEnumerator typedef struct objc_object NSEnumerator; typedef struct {} _objc_exc_NSEnumerator; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSXMLElement #define _REWRITER_typedef_NSXMLElement typedef struct objc_object NSXMLElement; typedef struct {} _objc_exc_NSXMLElement; #endif struct NSXMLElement_IMPL { struct NSXMLNode_IMPL NSXMLNode_IVARS; NSString *_name; id _attributes; id _namespaces; NSArray *_children; BOOL _childrenHaveMutated; BOOL _zeroOrOneAttributes; BOOL _zeroOrOneNamespaces; uint8_t _padding; NSString *_URI; NSInteger _prefixIndex; }; // - (instancetype)initWithName:(NSString *)name; // - (instancetype)initWithName:(NSString *)name URI:(nullable NSString *)URI __attribute__((objc_designated_initializer)); // - (instancetype)initWithName:(NSString *)name stringValue:(nullable NSString *)string; // - (nullable instancetype)initWithXMLString:(NSString *)string error:(NSError **)error __attribute__((objc_designated_initializer)); // - (instancetype)initWithKind:(NSXMLNodeKind)kind options:(NSXMLNodeOptions)options; // - (NSArray<NSXMLElement *> *)elementsForName:(NSString *)name; // - (NSArray<NSXMLElement *> *)elementsForLocalName:(NSString *)localName URI:(nullable NSString *)URI; // - (void)addAttribute:(NSXMLNode *)attribute; // - (void)removeAttributeForName:(NSString *)name; // @property (nullable, copy) NSArray<NSXMLNode *> *attributes; // - (void)setAttributesWithDictionary:(NSDictionary<NSString *, NSString *> *)attributes; // - (nullable NSXMLNode *)attributeForName:(NSString *)name; // - (nullable NSXMLNode *)attributeForLocalName:(NSString *)localName URI:(nullable NSString *)URI; // - (void)addNamespace:(NSXMLNode *)aNamespace; // - (void)removeNamespaceForPrefix:(NSString *)name; // @property (nullable, copy) NSArray<NSXMLNode *> *namespaces; // - (nullable NSXMLNode *)namespaceForPrefix:(NSString *)name; // - (nullable NSXMLNode *)resolveNamespaceForName:(NSString *)name; // - (nullable NSString *)resolvePrefixForNamespaceURI:(NSString *)namespaceURI; // - (void)insertChild:(NSXMLNode *)child atIndex:(NSUInteger)index; // - (void)insertChildren:(NSArray<NSXMLNode *> *)children atIndex:(NSUInteger)index; // - (void)removeChildAtIndex:(NSUInteger)index; // - (void)setChildren:(nullable NSArray<NSXMLNode *> *)children; // - (void)addChild:(NSXMLNode *)child; // - (void)replaceChildAtIndex:(NSUInteger)index withNode:(NSXMLNode *)node; // - (void)normalizeAdjacentTextNodesPreservingCDATA:(BOOL)preserve; /* @end */ // @interface NSXMLElement (NSDeprecated) // - (void)setAttributesAsDictionary:(NSDictionary *)attributes __attribute__((availability(macos,introduced=10.0,deprecated=100000,replacement="setAttributesWithDictionary:"))) __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="setAttributesWithDictionary:"))) __attribute__((availability(watchos,introduced=2.0,deprecated=100000,replacement="setAttributesWithDictionary:"))) __attribute__((availability(tvos,introduced=9.0,deprecated=100000,replacement="setAttributesWithDictionary:"))); /* @end */ #pragma clang assume_nonnull end // @class NSError; #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif // @class NSURLAuthenticationChallenge; #ifndef _REWRITER_typedef_NSURLAuthenticationChallenge #define _REWRITER_typedef_NSURLAuthenticationChallenge typedef struct objc_object NSURLAuthenticationChallenge; typedef struct {} _objc_exc_NSURLAuthenticationChallenge; #endif // @class NSURLDownloadInternal; #ifndef _REWRITER_typedef_NSURLDownloadInternal #define _REWRITER_typedef_NSURLDownloadInternal typedef struct objc_object NSURLDownloadInternal; typedef struct {} _objc_exc_NSURLDownloadInternal; #endif // @class NSURLRequest; #ifndef _REWRITER_typedef_NSURLRequest #define _REWRITER_typedef_NSURLRequest typedef struct objc_object NSURLRequest; typedef struct {} _objc_exc_NSURLRequest; #endif // @class NSURLResponse; #ifndef _REWRITER_typedef_NSURLResponse #define _REWRITER_typedef_NSURLResponse typedef struct objc_object NSURLResponse; typedef struct {} _objc_exc_NSURLResponse; #endif // @class NSURLProtectionSpace; #ifndef _REWRITER_typedef_NSURLProtectionSpace #define _REWRITER_typedef_NSURLProtectionSpace typedef struct objc_object NSURLProtectionSpace; typedef struct {} _objc_exc_NSURLProtectionSpace; #endif // @protocol NSURLDownloadDelegate; #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSURLDownload #define _REWRITER_typedef_NSURLDownload typedef struct objc_object NSURLDownload; typedef struct {} _objc_exc_NSURLDownload; #endif struct NSURLDownload_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURLDownloadInternal *_internal; }; // + (BOOL)canResumeDownloadDecodedWithEncodingMIMEType:(NSString *)MIMEType; // - (instancetype)initWithRequest:(NSURLRequest *)request delegate:(nullable id <NSURLDownloadDelegate>)delegate __attribute__((availability(macos,introduced=10.3,deprecated=10.11,message="Use NSURLSession downloadTask (see NSURLSession.h)"))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use NSURLSession downloadTask (see NSURLSession.h)"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLSession downloadTask (see NSURLSession.h)"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLSession downloadTask (see NSURLSession.h)"))); // - (instancetype)initWithResumeData:(NSData *)resumeData delegate:(nullable id <NSURLDownloadDelegate>)delegate path:(NSString *)path __attribute__((availability(macos,introduced=10.3,deprecated=10.11,message="Use NSURLSession downloadTask (see NSURLSession.h)"))) __attribute__((availability(ios,introduced=2.0,deprecated=9.0,message="Use NSURLSession downloadTask (see NSURLSession.h)"))) __attribute__((availability(watchos,introduced=2.0,deprecated=2.0,message="Use NSURLSession downloadTask (see NSURLSession.h)"))) __attribute__((availability(tvos,introduced=9.0,deprecated=9.0,message="Use NSURLSession downloadTask (see NSURLSession.h)"))); // - (void)cancel; // - (void)setDestination:(NSString *)path allowOverwrite:(BOOL)allowOverwrite; // @property (readonly, copy) NSURLRequest *request; // @property (nullable, readonly, copy) NSData *resumeData; // @property BOOL deletesFileUponFailure; /* @end */ __attribute__((availability(macos,introduced=10.2))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(tvos,unavailable))) // @protocol NSURLDownloadDelegate <NSObject> /* @optional */ // - (void)downloadDidBegin:(NSURLDownload *)download; // - (nullable NSURLRequest *)download:(NSURLDownload *)download willSendRequest:(NSURLRequest *)request redirectResponse:(nullable NSURLResponse *)redirectResponse; // - (BOOL)download:(NSURLDownload *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace; // - (void)download:(NSURLDownload *)download didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (void)download:(NSURLDownload *)download didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge; // - (BOOL)downloadShouldUseCredentialStorage:(NSURLDownload *)download; // - (void)download:(NSURLDownload *)download didReceiveResponse:(NSURLResponse *)response; // - (void)download:(NSURLDownload *)download willResumeWithResponse:(NSURLResponse *)response fromByte:(long long)startingByte; // - (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)length; // - (BOOL)download:(NSURLDownload *)download shouldDecodeSourceDataOfMIMEType:(NSString *)encodingType; // - (void)download:(NSURLDownload *)download decideDestinationWithSuggestedFilename:(NSString *)filename; // - (void)download:(NSURLDownload *)download didCreateDestination:(NSString *)path; // - (void)downloadDidFinish:(NSURLDownload *)download; // - (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error; /* @end */ #pragma clang assume_nonnull end // @class NSData; #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSAppleEventSendOptions; enum { NSAppleEventSendNoReply = kAENoReply, NSAppleEventSendQueueReply = kAEQueueReply, NSAppleEventSendWaitForReply = kAEWaitReply, NSAppleEventSendNeverInteract = kAENeverInteract, NSAppleEventSendCanInteract = kAECanInteract, NSAppleEventSendAlwaysInteract = kAEAlwaysInteract, NSAppleEventSendCanSwitchLayer = kAECanSwitchLayer, NSAppleEventSendDontRecord = kAEDontRecord, NSAppleEventSendDontExecute = kAEDontExecute, NSAppleEventSendDontAnnotate = kAEDoNotAutomaticallyAddAnnotationsToEvent, NSAppleEventSendDefaultOptions = NSAppleEventSendWaitForReply | NSAppleEventSendCanInteract } __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); #ifndef _REWRITER_typedef_NSAppleEventDescriptor #define _REWRITER_typedef_NSAppleEventDescriptor typedef struct objc_object NSAppleEventDescriptor; typedef struct {} _objc_exc_NSAppleEventDescriptor; #endif struct NSAppleEventDescriptor_IMPL { struct NSObject_IMPL NSObject_IVARS; AEDesc _desc; BOOL _hasValidDesc; char _padding[3]; }; // + (NSAppleEventDescriptor *)nullDescriptor; // + (nullable NSAppleEventDescriptor *)descriptorWithDescriptorType:(DescType)descriptorType bytes:(nullable const void *)bytes length:(NSUInteger)byteCount; // + (nullable NSAppleEventDescriptor *)descriptorWithDescriptorType:(DescType)descriptorType data:(nullable NSData *)data; // + (NSAppleEventDescriptor *)descriptorWithBoolean:(Boolean)boolean; // + (NSAppleEventDescriptor *)descriptorWithEnumCode:(OSType)enumerator; // + (NSAppleEventDescriptor *)descriptorWithInt32:(SInt32)signedInt; // + (NSAppleEventDescriptor *)descriptorWithDouble:(double)doubleValue __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSAppleEventDescriptor *)descriptorWithTypeCode:(OSType)typeCode; // + (NSAppleEventDescriptor *)descriptorWithString:(NSString *)string; // + (NSAppleEventDescriptor *)descriptorWithDate:(NSDate *)date __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSAppleEventDescriptor *)descriptorWithFileURL:(NSURL *)fileURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSAppleEventDescriptor *)appleEventWithEventClass:(AEEventClass)eventClass eventID:(AEEventID)eventID targetDescriptor:(nullable NSAppleEventDescriptor *)targetDescriptor returnID:(AEReturnID)returnID transactionID:(AETransactionID)transactionID; // + (NSAppleEventDescriptor *)listDescriptor; // + (NSAppleEventDescriptor *)recordDescriptor; // + (NSAppleEventDescriptor *)currentProcessDescriptor __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSAppleEventDescriptor *)descriptorWithProcessIdentifier:(pid_t)processIdentifier __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSAppleEventDescriptor *)descriptorWithBundleIdentifier:(NSString *)bundleIdentifier __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (NSAppleEventDescriptor *)descriptorWithApplicationURL:(NSURL *)applicationURL __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithAEDescNoCopy:(const AEDesc *)aeDesc __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithDescriptorType:(DescType)descriptorType bytes:(nullable const void *)bytes length:(NSUInteger)byteCount; // - (nullable instancetype)initWithDescriptorType:(DescType)descriptorType data:(nullable NSData *)data; // - (instancetype)initWithEventClass:(AEEventClass)eventClass eventID:(AEEventID)eventID targetDescriptor:(nullable NSAppleEventDescriptor *)targetDescriptor returnID:(AEReturnID)returnID transactionID:(AETransactionID)transactionID; // - (instancetype)initListDescriptor; // - (instancetype)initRecordDescriptor; // @property (nullable, readonly) const AEDesc *aeDesc __attribute__((objc_returns_inner_pointer)); // @property (readonly) DescType descriptorType; // @property (readonly, copy) NSData *data; // @property (readonly) Boolean booleanValue; // @property (readonly) OSType enumCodeValue; // @property (readonly) SInt32 int32Value; // @property (readonly) double doubleValue __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly) OSType typeCodeValue; // @property (nullable, readonly, copy) NSString *stringValue; // @property (nullable, readonly, copy) NSDate *dateValue __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, readonly, copy) NSURL *fileURLValue __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly) AEEventClass eventClass; // @property (readonly) AEEventID eventID; // @property (readonly) AEReturnID returnID; // @property (readonly) AETransactionID transactionID; // - (void)setParamDescriptor:(NSAppleEventDescriptor *)descriptor forKeyword:(AEKeyword)keyword; // - (nullable NSAppleEventDescriptor *)paramDescriptorForKeyword:(AEKeyword)keyword; // - (void)removeParamDescriptorWithKeyword:(AEKeyword)keyword; // - (void)setAttributeDescriptor:(NSAppleEventDescriptor *)descriptor forKeyword:(AEKeyword)keyword; // - (nullable NSAppleEventDescriptor *)attributeDescriptorForKeyword:(AEKeyword)keyword; // - (nullable NSAppleEventDescriptor *)sendEventWithOptions:(NSAppleEventSendOptions)sendOptions timeout:(NSTimeInterval)timeoutInSeconds error:(NSError **)error __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly) BOOL isRecordDescriptor __attribute__((availability(macos,introduced=10.11))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly) NSInteger numberOfItems; // - (void)insertDescriptor:(NSAppleEventDescriptor *)descriptor atIndex:(NSInteger)index; // - (nullable NSAppleEventDescriptor *)descriptorAtIndex:(NSInteger)index; // - (void)removeDescriptorAtIndex:(NSInteger)index; // - (void)setDescriptor:(NSAppleEventDescriptor *)descriptor forKeyword:(AEKeyword)keyword; // - (nullable NSAppleEventDescriptor *)descriptorForKeyword:(AEKeyword)keyword; // - (void)removeDescriptorWithKeyword:(AEKeyword)keyword; // - (AEKeyword)keywordForDescriptorAtIndex:(NSInteger)index; // - (nullable NSAppleEventDescriptor *)coerceToDescriptorType:(DescType)descriptorType; /* @end */ #pragma clang assume_nonnull end // @class NSAppleEventDescriptor; #ifndef _REWRITER_typedef_NSAppleEventDescriptor #define _REWRITER_typedef_NSAppleEventDescriptor typedef struct objc_object NSAppleEventDescriptor; typedef struct {} _objc_exc_NSAppleEventDescriptor; #endif #pragma clang assume_nonnull begin typedef const struct __NSAppleEventManagerSuspension* NSAppleEventManagerSuspensionID; extern const double NSAppleEventTimeOutDefault; extern const double NSAppleEventTimeOutNone; extern NSNotificationName NSAppleEventManagerWillProcessFirstEventNotification; #ifndef _REWRITER_typedef_NSAppleEventManager #define _REWRITER_typedef_NSAppleEventManager typedef struct objc_object NSAppleEventManager; typedef struct {} _objc_exc_NSAppleEventManager; #endif struct NSAppleEventManager_IMPL { struct NSObject_IMPL NSObject_IVARS; BOOL _isPreparedForDispatch; char _padding[3]; }; // + (NSAppleEventManager *)sharedAppleEventManager; // - (void)setEventHandler:(id)handler andSelector:(SEL)handleEventSelector forEventClass:(AEEventClass)eventClass andEventID:(AEEventID)eventID; // - (void)removeEventHandlerForEventClass:(AEEventClass)eventClass andEventID:(AEEventID)eventID; // - (OSErr)dispatchRawAppleEvent:(const AppleEvent *)theAppleEvent withRawReply:(AppleEvent *)theReply handlerRefCon:(SRefCon)handlerRefCon; // @property (nullable, readonly, retain) NSAppleEventDescriptor *currentAppleEvent; // @property (nullable, readonly, retain) NSAppleEventDescriptor *currentReplyAppleEvent; // - (nullable NSAppleEventManagerSuspensionID)suspendCurrentAppleEvent __attribute__((objc_returns_inner_pointer)); // - (NSAppleEventDescriptor *)appleEventForSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID; // - (NSAppleEventDescriptor *)replyAppleEventForSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID; // - (void)setCurrentAppleEventAndReplyEventWithSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID; // - (void)resumeWithSuspensionID:(NSAppleEventManagerSuspensionID)suspensionID; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSClassDescription #define _REWRITER_typedef_NSClassDescription typedef struct objc_object NSClassDescription; typedef struct {} _objc_exc_NSClassDescription; #endif struct NSClassDescription_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (void)registerClassDescription:(NSClassDescription *)description forClass:(Class)aClass; // + (void)invalidateClassDescriptionCache; // + (nullable NSClassDescription *)classDescriptionForClass:(Class)aClass; // @property (readonly, copy) NSArray<NSString *> *attributeKeys; // @property (readonly, copy) NSArray<NSString *> *toOneRelationshipKeys; // @property (readonly, copy) NSArray<NSString *> *toManyRelationshipKeys; // - (nullable NSString *)inverseForRelationshipKey:(NSString *)relationshipKey; /* @end */ // @interface NSObject (NSClassDescriptionPrimitives) // @property (readonly, copy) NSClassDescription *classDescription; // @property (readonly, copy) NSArray<NSString *> *attributeKeys; // @property (readonly, copy) NSArray<NSString *> *toOneRelationshipKeys; // @property (readonly, copy) NSArray<NSString *> *toManyRelationshipKeys; // - (nullable NSString *)inverseForRelationshipKey:(NSString *)relationshipKey; /* @end */ extern "C" NSNotificationName NSClassDescriptionNeededForClassNotification; #pragma clang assume_nonnull end // @class NSDate; #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSDistributedLock #define _REWRITER_typedef_NSDistributedLock typedef struct objc_object NSDistributedLock; typedef struct {} _objc_exc_NSDistributedLock; #endif struct NSDistributedLock_IMPL { struct NSObject_IMPL NSObject_IVARS; void *_priv; }; // + (nullable NSDistributedLock *)lockWithPath:(NSString *)path; // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable instancetype)initWithPath:(NSString *)path __attribute__((objc_designated_initializer)); // - (BOOL)tryLock; // - (void)unlock; // - (void)breakLock; // @property (readonly, copy) NSDate *lockDate; /* @end */ #pragma clang assume_nonnull end __attribute__((availability(macos,introduced=10.5,deprecated=10.10,message="Building Garbage Collected apps is no longer supported."))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #pragma clang assume_nonnull begin __attribute__((availability(swift, unavailable, message="Garbage Collection is not supported"))) #ifndef _REWRITER_typedef_NSGarbageCollector #define _REWRITER_typedef_NSGarbageCollector typedef struct objc_object NSGarbageCollector; typedef struct {} _objc_exc_NSGarbageCollector; #endif struct NSGarbageCollector_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (id)defaultCollector; // - (BOOL)isCollecting __attribute__((availability(macos,introduced=10.0,deprecated=10.6,message=""))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)disable; // - (void)enable; // - (BOOL)isEnabled; // - (void)collectIfNeeded; // - (void)collectExhaustively; // - (void)disableCollectorForPointer:(const void *)ptr; // - (void)enableCollectorForPointer:(const void *)ptr; // - (NSZone *)zone; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif extern "C" NSString *NSFileTypeForHFSTypeCode(OSType hfsFileTypeCode); extern "C" OSType NSHFSTypeCodeFromFileType(NSString *fileTypeString); extern "C" NSString *NSHFSTypeOfFile(NSString *fullFilePath); // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.0,deprecated=100000,message="Use Network framework instead, see deprecation notice in <Foundation/NSHost.h>"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSHost #define _REWRITER_typedef_NSHost typedef struct objc_object NSHost; typedef struct {} _objc_exc_NSHost; #endif struct NSHost_IMPL { struct NSObject_IMPL NSObject_IVARS; NSArray *names; NSArray *addresses; id reserved; }; // + (instancetype)currentHost; // + (instancetype)hostWithName:(nullable NSString *)name; // + (instancetype)hostWithAddress:(NSString *)address; // - (BOOL)isEqualToHost:(NSHost *)aHost; // @property (nullable, readonly, copy) NSString *name; // @property (readonly, copy) NSArray<NSString *> *names; // @property (nullable, readonly, copy) NSString *address; // @property (readonly, copy) NSArray<NSString *> *addresses; // @property (nullable, readonly, copy) NSString *localizedName __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (void)setHostCacheEnabled:(BOOL)flag __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Caching no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (BOOL)isHostCacheEnabled __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Caching no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // + (void)flushHostCache __attribute__((availability(macos,introduced=10.0,deprecated=10.7,message="Caching no longer supported"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSScriptObjectSpecifier #define _REWRITER_typedef_NSScriptObjectSpecifier typedef struct objc_object NSScriptObjectSpecifier; typedef struct {} _objc_exc_NSScriptObjectSpecifier; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin // @interface NSObject(NSScripting) // - (nullable id)scriptingValueForSpecifier:(NSScriptObjectSpecifier *)objectSpecifier __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) NSDictionary<NSString *, id> *scriptingProperties; // - (nullable id)copyScriptingValue:(id)value forKey:(NSString *)key withProperties:(NSDictionary<NSString *, id> *)properties __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable id)newScriptingObjectOfClass:(Class)objectClass forValueForKey:(NSString *)key withContentsValue:(nullable id)contentsValue properties:(NSDictionary<NSString *, id> *)properties __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #pragma clang assume_nonnull end // @class NSScriptCommandDescription; #ifndef _REWRITER_typedef_NSScriptCommandDescription #define _REWRITER_typedef_NSScriptCommandDescription typedef struct objc_object NSScriptCommandDescription; typedef struct {} _objc_exc_NSScriptCommandDescription; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSScriptClassDescription #define _REWRITER_typedef_NSScriptClassDescription typedef struct objc_object NSScriptClassDescription; typedef struct {} _objc_exc_NSScriptClassDescription; #endif struct NSScriptClassDescription_IMPL { struct NSClassDescription_IMPL NSClassDescription_IVARS; NSString *_suiteName; NSString *_objcClassName; FourCharCode _appleEventCode; NSObject *_superclassNameOrDescription; NSArray *_attributeDescriptions; NSArray *_toOneRelationshipDescriptions; NSArray *_toManyRelationshipDescriptions; NSDictionary *_commandMethodSelectorsByName; id _moreVars; }; // + (nullable NSScriptClassDescription *)classDescriptionForClass:(Class)aClass; // - (nullable instancetype)initWithSuiteName:(NSString *)suiteName className:(NSString *)className dictionary:(nullable NSDictionary *)classDeclaration __attribute__((objc_designated_initializer)); // @property (nullable, readonly, copy) NSString *suiteName; // @property (nullable, readonly, copy) NSString *className; // @property (nullable, readonly, copy) NSString *implementationClassName; // @property (nullable, readonly, retain) NSScriptClassDescription *superclassDescription; // @property (readonly) FourCharCode appleEventCode; // - (BOOL)matchesAppleEventCode:(FourCharCode)appleEventCode; // - (BOOL)supportsCommand:(NSScriptCommandDescription *)commandDescription; // - (nullable SEL)selectorForCommand:(NSScriptCommandDescription *)commandDescription; // - (nullable NSString *)typeForKey:(NSString *)key; // - (nullable NSScriptClassDescription *)classDescriptionForKey:(NSString *)key; // - (FourCharCode)appleEventCodeForKey:(NSString *)key; // - (nullable NSString *)keyWithAppleEventCode:(FourCharCode)appleEventCode; // @property (nullable, readonly, copy) NSString *defaultSubcontainerAttributeKey; // - (BOOL)isLocationRequiredToCreateForKey:(NSString *)toManyRelationshipKey; // - (BOOL)hasPropertyForKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)hasOrderedToManyRelationshipForKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)hasReadablePropertyForKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)hasWritablePropertyForKey:(NSString *)key __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @interface NSScriptClassDescription(NSDeprecated) // - (BOOL)isReadOnlyKey:(NSString *)key __attribute__((availability(macos,introduced=10.0,deprecated=10.5,replacement="-hasWritablePropertyForKey:"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @interface NSObject(NSScriptClassDescription) // @property (readonly) FourCharCode classCode; // @property (readonly, copy) NSString *className; /* @end */ #pragma clang assume_nonnull end #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSScriptCoercionHandler #define _REWRITER_typedef_NSScriptCoercionHandler typedef struct objc_object NSScriptCoercionHandler; typedef struct {} _objc_exc_NSScriptCoercionHandler; #endif struct NSScriptCoercionHandler_IMPL { struct NSObject_IMPL NSObject_IVARS; id _coercers; }; // + (NSScriptCoercionHandler *)sharedCoercionHandler; // - (nullable id)coerceValue:(id)value toClass:(Class)toClass; // - (void)registerCoercer:(id)coercer selector:(SEL)selector toConvertFromClass:(Class)fromClass toClass:(Class)toClass; /* @end */ #pragma clang assume_nonnull end // @class NSAppleEventDescriptor; #ifndef _REWRITER_typedef_NSAppleEventDescriptor #define _REWRITER_typedef_NSAppleEventDescriptor typedef struct objc_object NSAppleEventDescriptor; typedef struct {} _objc_exc_NSAppleEventDescriptor; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSScriptObjectSpecifier #define _REWRITER_typedef_NSScriptObjectSpecifier typedef struct objc_object NSScriptObjectSpecifier; typedef struct {} _objc_exc_NSScriptObjectSpecifier; #endif #ifndef _REWRITER_typedef_NSScriptCommandDescription #define _REWRITER_typedef_NSScriptCommandDescription typedef struct objc_object NSScriptCommandDescription; typedef struct {} _objc_exc_NSScriptCommandDescription; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin enum { NSNoScriptError = 0, NSReceiverEvaluationScriptError, NSKeySpecifierEvaluationScriptError, NSArgumentEvaluationScriptError, NSReceiversCantHandleCommandScriptError, NSRequiredArgumentsMissingScriptError, NSArgumentsWrongScriptError, NSUnknownKeyScriptError, NSInternalScriptError, NSOperationNotSupportedForKeyScriptError, NSCannotCreateScriptCommandError }; #ifndef _REWRITER_typedef_NSScriptCommand #define _REWRITER_typedef_NSScriptCommand typedef struct objc_object NSScriptCommand; typedef struct {} _objc_exc_NSScriptCommand; #endif struct NSScriptCommand_IMPL { struct NSObject_IMPL NSObject_IVARS; NSScriptCommandDescription *_commandDescription; id _directParameter; NSScriptObjectSpecifier *_receiversSpecifier; id _evaluatedReceivers; NSDictionary *_arguments; NSMutableDictionary *_evaluatedArguments; struct { unsigned int hasEvaluatedReceivers : 1; unsigned int hasEvaluatedArguments : 1; unsigned int RESERVED : 30; } _flags; id _moreVars; void *_reserved; }; // - (instancetype)initWithCommandDescription:(NSScriptCommandDescription *)commandDef __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder; // @property (readonly, retain) NSScriptCommandDescription *commandDescription; // @property (nullable, retain) id directParameter; // @property (nullable, retain) NSScriptObjectSpecifier *receiversSpecifier; // @property (nullable, readonly, retain) id evaluatedReceivers; // @property (nullable, copy) NSDictionary<NSString *, id> *arguments; // @property (nullable, readonly, copy) NSDictionary<NSString *, id> *evaluatedArguments; // @property (getter=isWellFormed, readonly) BOOL wellFormed; // - (nullable id)performDefaultImplementation; // - (nullable id)executeCommand; // @property NSInteger scriptErrorNumber; // @property (nullable, retain) NSAppleEventDescriptor *scriptErrorOffendingObjectDescriptor __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, retain) NSAppleEventDescriptor *scriptErrorExpectedTypeDescriptor __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) NSString *scriptErrorString; // + (nullable NSScriptCommand *)currentCommand; // @property (nullable, readonly, copy) NSAppleEventDescriptor *appleEvent; // - (void)suspendExecution; // - (void)resumeExecutionWithResult:(nullable id)result; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSScriptCommand #define _REWRITER_typedef_NSScriptCommand typedef struct objc_object NSScriptCommand; typedef struct {} _objc_exc_NSScriptCommand; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSScriptCommandDescription #define _REWRITER_typedef_NSScriptCommandDescription typedef struct objc_object NSScriptCommandDescription; typedef struct {} _objc_exc_NSScriptCommandDescription; #endif struct NSScriptCommandDescription_IMPL { struct NSObject_IMPL NSObject_IVARS; NSString *_suiteName; NSString *_plistCommandName; FourCharCode _classAppleEventCode; FourCharCode _idAppleEventCode; NSString *_objcClassName; NSObject *_resultTypeNameOrDescription; FourCharCode _plistResultTypeAppleEventCode; id _moreVars; }; // - (id)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable instancetype)initWithSuiteName:(NSString *)suiteName commandName:(NSString *)commandName dictionary:(nullable NSDictionary *)commandDeclaration __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSString *suiteName; // @property (readonly, copy) NSString *commandName; // @property (readonly) FourCharCode appleEventClassCode; // @property (readonly) FourCharCode appleEventCode; // @property (readonly, copy) NSString *commandClassName; // @property (nullable, readonly, copy) NSString *returnType; // @property (readonly) FourCharCode appleEventCodeForReturnType; // @property (readonly, copy) NSArray<NSString *> *argumentNames; // - (nullable NSString *)typeForArgumentWithName:(NSString *)argumentName; // - (FourCharCode)appleEventCodeForArgumentWithName:(NSString *)argumentName; // - (BOOL)isOptionalArgumentWithName:(NSString *)argumentName; // - (NSScriptCommand *)createCommandInstance; // - (NSScriptCommand *)createCommandInstanceWithZone:(nullable NSZone *)zone; /* @end */ #pragma clang assume_nonnull end // @class NSConnection; #ifndef _REWRITER_typedef_NSConnection #define _REWRITER_typedef_NSConnection typedef struct objc_object NSConnection; typedef struct {} _objc_exc_NSConnection; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSScriptExecutionContext #define _REWRITER_typedef_NSScriptExecutionContext typedef struct objc_object NSScriptExecutionContext; typedef struct {} _objc_exc_NSScriptExecutionContext; #endif struct NSScriptExecutionContext_IMPL { struct NSObject_IMPL NSObject_IVARS; id _topLevelObject; id _objectBeingTested; id _rangeContainerObject; id _moreVars; }; // + (NSScriptExecutionContext *)sharedScriptExecutionContext; // @property (nullable, retain) id topLevelObject; // @property (nullable, retain) id objectBeingTested; // @property (nullable, retain) id rangeContainerObject; /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin extern NSString *NSOperationNotSupportedForKeyException; // @interface NSObject(NSScriptKeyValueCoding) // - (nullable id)valueAtIndex:(NSUInteger)index inPropertyWithKey:(NSString *)key; // - (nullable id)valueWithName:(NSString *)name inPropertyWithKey:(NSString *)key; // - (nullable id)valueWithUniqueID:(id)uniqueID inPropertyWithKey:(NSString *)key; // - (void)insertValue:(id)value atIndex:(NSUInteger)index inPropertyWithKey:(NSString *)key; // - (void)removeValueAtIndex:(NSUInteger)index fromPropertyWithKey:(NSString *)key; // - (void)replaceValueAtIndex:(NSUInteger)index inPropertyWithKey:(NSString *)key withValue:(id)value; // - (void)insertValue:(id)value inPropertyWithKey:(NSString *)key; // - (nullable id)coerceValue:(nullable id)value forKey:(NSString *)key; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSAppleEventDescriptor #define _REWRITER_typedef_NSAppleEventDescriptor typedef struct objc_object NSAppleEventDescriptor; typedef struct {} _objc_exc_NSAppleEventDescriptor; #endif #ifndef _REWRITER_typedef_NSNumber #define _REWRITER_typedef_NSNumber typedef struct objc_object NSNumber; typedef struct {} _objc_exc_NSNumber; #endif #ifndef _REWRITER_typedef_NSScriptClassDescription #define _REWRITER_typedef_NSScriptClassDescription typedef struct objc_object NSScriptClassDescription; typedef struct {} _objc_exc_NSScriptClassDescription; #endif #ifndef _REWRITER_typedef_NSScriptWhoseTest #define _REWRITER_typedef_NSScriptWhoseTest typedef struct objc_object NSScriptWhoseTest; typedef struct {} _objc_exc_NSScriptWhoseTest; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin enum { NSNoSpecifierError = 0, NSNoTopLevelContainersSpecifierError, NSContainerSpecifierError, NSUnknownKeySpecifierError, NSInvalidIndexSpecifierError, NSInternalSpecifierError, NSOperationNotSupportedForKeySpecifierError }; typedef NSUInteger NSInsertionPosition; enum { NSPositionAfter, NSPositionBefore, NSPositionBeginning, NSPositionEnd, NSPositionReplace }; typedef NSUInteger NSRelativePosition; enum { NSRelativeAfter = 0, NSRelativeBefore }; typedef NSUInteger NSWhoseSubelementIdentifier; enum { NSIndexSubelement = 0, NSEverySubelement = 1, NSMiddleSubelement = 2, NSRandomSubelement = 3, NSNoSubelement = 4 }; #ifndef _REWRITER_typedef_NSScriptObjectSpecifier #define _REWRITER_typedef_NSScriptObjectSpecifier typedef struct objc_object NSScriptObjectSpecifier; typedef struct {} _objc_exc_NSScriptObjectSpecifier; #endif struct NSScriptObjectSpecifier_IMPL { struct NSObject_IMPL NSObject_IVARS; NSScriptObjectSpecifier *_container; NSScriptObjectSpecifier *_child; NSString *_key; NSScriptClassDescription *_containerClassDescription; BOOL _containerIsObjectBeingTested; BOOL _containerIsRangeContainerObject; char _padding[2]; NSAppleEventDescriptor *_descriptor; NSInteger _error; }; // + (nullable NSScriptObjectSpecifier *)objectSpecifierWithDescriptor:(NSAppleEventDescriptor *)descriptor __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (instancetype)initWithContainerSpecifier:(NSScriptObjectSpecifier *)container key:(NSString *)property; // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // @property (nullable, assign) NSScriptObjectSpecifier *childSpecifier; // @property (nullable, retain) NSScriptObjectSpecifier *containerSpecifier; // @property BOOL containerIsObjectBeingTested; // @property BOOL containerIsRangeContainerObject; // @property (copy) NSString *key; // @property (nullable, retain) NSScriptClassDescription *containerClassDescription; // @property (nullable, readonly, retain) NSScriptClassDescription *keyClassDescription; // - (nullable NSInteger *)indicesOfObjectsByEvaluatingWithContainer:(id)container count:(NSInteger *)count __attribute__((objc_returns_inner_pointer)); // - (nullable id)objectsByEvaluatingWithContainers:(id)containers; // @property (nullable, readonly, retain) id objectsByEvaluatingSpecifier; // @property NSInteger evaluationErrorNumber; // @property (nullable, readonly, retain) NSScriptObjectSpecifier *evaluationErrorSpecifier; // @property (nullable, readonly, copy) NSAppleEventDescriptor *descriptor __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ // @interface NSObject (NSScriptObjectSpecifiers) // @property (nullable, readonly, retain) NSScriptObjectSpecifier *objectSpecifier; // - (nullable NSArray<NSNumber *> *)indicesOfObjectsByEvaluatingObjectSpecifier:(NSScriptObjectSpecifier *)specifier; /* @end */ #ifndef _REWRITER_typedef_NSIndexSpecifier #define _REWRITER_typedef_NSIndexSpecifier typedef struct objc_object NSIndexSpecifier; typedef struct {} _objc_exc_NSIndexSpecifier; #endif struct NSIndexSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; NSInteger _index; }; // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property index:(NSInteger)index __attribute__((objc_designated_initializer)); // @property NSInteger index; /* @end */ #ifndef _REWRITER_typedef_NSMiddleSpecifier #define _REWRITER_typedef_NSMiddleSpecifier typedef struct objc_object NSMiddleSpecifier; typedef struct {} _objc_exc_NSMiddleSpecifier; #endif struct NSMiddleSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; }; /* @end */ #ifndef _REWRITER_typedef_NSNameSpecifier #define _REWRITER_typedef_NSNameSpecifier typedef struct objc_object NSNameSpecifier; typedef struct {} _objc_exc_NSNameSpecifier; #endif struct NSNameSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; NSString *_name; }; // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property name:(NSString *)name __attribute__((objc_designated_initializer)); // @property (copy) NSString *name; /* @end */ #ifndef _REWRITER_typedef_NSPositionalSpecifier #define _REWRITER_typedef_NSPositionalSpecifier typedef struct objc_object NSPositionalSpecifier; typedef struct {} _objc_exc_NSPositionalSpecifier; #endif struct NSPositionalSpecifier_IMPL { struct NSObject_IMPL NSObject_IVARS; NSScriptObjectSpecifier *_specifier; NSInsertionPosition _unadjustedPosition; NSScriptClassDescription *_insertionClassDescription; id _moreVars; void *_reserved0; }; // - (instancetype)initWithPosition:(NSInsertionPosition)position objectSpecifier:(NSScriptObjectSpecifier *)specifier __attribute__((objc_designated_initializer)); // @property (readonly) NSInsertionPosition position __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (readonly, retain) NSScriptObjectSpecifier *objectSpecifier __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)setInsertionClassDescription:(NSScriptClassDescription *)classDescription; // - (void)evaluate; // @property (nullable, readonly, retain) id insertionContainer; // @property (nullable, readonly, copy) NSString *insertionKey; // @property (readonly) NSInteger insertionIndex; // @property (readonly) BOOL insertionReplaces; /* @end */ #ifndef _REWRITER_typedef_NSPropertySpecifier #define _REWRITER_typedef_NSPropertySpecifier typedef struct objc_object NSPropertySpecifier; typedef struct {} _objc_exc_NSPropertySpecifier; #endif struct NSPropertySpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; }; /* @end */ #ifndef _REWRITER_typedef_NSRandomSpecifier #define _REWRITER_typedef_NSRandomSpecifier typedef struct objc_object NSRandomSpecifier; typedef struct {} _objc_exc_NSRandomSpecifier; #endif struct NSRandomSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; }; /* @end */ #ifndef _REWRITER_typedef_NSRangeSpecifier #define _REWRITER_typedef_NSRangeSpecifier typedef struct objc_object NSRangeSpecifier; typedef struct {} _objc_exc_NSRangeSpecifier; #endif struct NSRangeSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; NSScriptObjectSpecifier *_startSpec; NSScriptObjectSpecifier *_endSpec; }; // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property startSpecifier:(nullable NSScriptObjectSpecifier *)startSpec endSpecifier:(nullable NSScriptObjectSpecifier *)endSpec __attribute__((objc_designated_initializer)); // @property (nullable, retain) NSScriptObjectSpecifier *startSpecifier; // @property (nullable, retain) NSScriptObjectSpecifier *endSpecifier; /* @end */ #ifndef _REWRITER_typedef_NSRelativeSpecifier #define _REWRITER_typedef_NSRelativeSpecifier typedef struct objc_object NSRelativeSpecifier; typedef struct {} _objc_exc_NSRelativeSpecifier; #endif struct NSRelativeSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; NSRelativePosition _relativePosition; NSScriptObjectSpecifier *_baseSpecifier; }; // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property relativePosition:(NSRelativePosition)relPos baseSpecifier:(nullable NSScriptObjectSpecifier *)baseSpecifier __attribute__((objc_designated_initializer)); // @property NSRelativePosition relativePosition; // @property (nullable, retain) NSScriptObjectSpecifier *baseSpecifier; /* @end */ #ifndef _REWRITER_typedef_NSUniqueIDSpecifier #define _REWRITER_typedef_NSUniqueIDSpecifier typedef struct objc_object NSUniqueIDSpecifier; typedef struct {} _objc_exc_NSUniqueIDSpecifier; #endif struct NSUniqueIDSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; id _uniqueID; }; // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property uniqueID:(id)uniqueID __attribute__((objc_designated_initializer)); // @property (copy) id uniqueID; /* @end */ #ifndef _REWRITER_typedef_NSWhoseSpecifier #define _REWRITER_typedef_NSWhoseSpecifier typedef struct objc_object NSWhoseSpecifier; typedef struct {} _objc_exc_NSWhoseSpecifier; #endif struct NSWhoseSpecifier_IMPL { struct NSScriptObjectSpecifier_IMPL NSScriptObjectSpecifier_IVARS; NSScriptWhoseTest *_test; NSWhoseSubelementIdentifier _startSubelementIdentifier; NSInteger _startSubelementIndex; NSWhoseSubelementIdentifier _endSubelementIdentifier; NSInteger _endSubelementIndex; }; // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (instancetype)initWithContainerClassDescription:(NSScriptClassDescription *)classDesc containerSpecifier:(nullable NSScriptObjectSpecifier *)container key:(NSString *)property test:(NSScriptWhoseTest *)test __attribute__((objc_designated_initializer)); // @property (retain) NSScriptWhoseTest *test; // @property NSWhoseSubelementIdentifier startSubelementIdentifier; // @property NSInteger startSubelementIndex; // @property NSWhoseSubelementIdentifier endSubelementIdentifier; // @property NSInteger endSubelementIndex; /* @end */ #pragma clang assume_nonnull end // @class NSDictionary; #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif // @class NSScriptObjectSpecifier; #ifndef _REWRITER_typedef_NSScriptObjectSpecifier #define _REWRITER_typedef_NSScriptObjectSpecifier typedef struct objc_object NSScriptObjectSpecifier; typedef struct {} _objc_exc_NSScriptObjectSpecifier; #endif // @class NSScriptClassDescription; #ifndef _REWRITER_typedef_NSScriptClassDescription #define _REWRITER_typedef_NSScriptClassDescription typedef struct objc_object NSScriptClassDescription; typedef struct {} _objc_exc_NSScriptClassDescription; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSSaveOptions; enum { NSSaveOptionsYes = 0, NSSaveOptionsNo, NSSaveOptionsAsk }; #ifndef _REWRITER_typedef_NSCloneCommand #define _REWRITER_typedef_NSCloneCommand typedef struct objc_object NSCloneCommand; typedef struct {} _objc_exc_NSCloneCommand; #endif struct NSCloneCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; NSScriptObjectSpecifier *_keySpecifier; }; // - (void)setReceiversSpecifier:(nullable NSScriptObjectSpecifier *)receiversRef; // @property (readonly, retain) NSScriptObjectSpecifier *keySpecifier; /* @end */ #ifndef _REWRITER_typedef_NSCloseCommand #define _REWRITER_typedef_NSCloseCommand typedef struct objc_object NSCloseCommand; typedef struct {} _objc_exc_NSCloseCommand; #endif struct NSCloseCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; }; // @property (readonly) NSSaveOptions saveOptions; /* @end */ #ifndef _REWRITER_typedef_NSCountCommand #define _REWRITER_typedef_NSCountCommand typedef struct objc_object NSCountCommand; typedef struct {} _objc_exc_NSCountCommand; #endif struct NSCountCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; }; /* @end */ #ifndef _REWRITER_typedef_NSCreateCommand #define _REWRITER_typedef_NSCreateCommand typedef struct objc_object NSCreateCommand; typedef struct {} _objc_exc_NSCreateCommand; #endif struct NSCreateCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; id _moreVars2; }; // @property (readonly, retain) NSScriptClassDescription *createClassDescription; // @property (readonly, copy) NSDictionary<NSString *, id> *resolvedKeyDictionary; /* @end */ #ifndef _REWRITER_typedef_NSDeleteCommand #define _REWRITER_typedef_NSDeleteCommand typedef struct objc_object NSDeleteCommand; typedef struct {} _objc_exc_NSDeleteCommand; #endif struct NSDeleteCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; NSScriptObjectSpecifier *_keySpecifier; }; // - (void)setReceiversSpecifier:(nullable NSScriptObjectSpecifier *)receiversRef; // @property (readonly, retain) NSScriptObjectSpecifier *keySpecifier; /* @end */ #ifndef _REWRITER_typedef_NSExistsCommand #define _REWRITER_typedef_NSExistsCommand typedef struct objc_object NSExistsCommand; typedef struct {} _objc_exc_NSExistsCommand; #endif struct NSExistsCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; }; /* @end */ #ifndef _REWRITER_typedef_NSGetCommand #define _REWRITER_typedef_NSGetCommand typedef struct objc_object NSGetCommand; typedef struct {} _objc_exc_NSGetCommand; #endif struct NSGetCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; }; /* @end */ #ifndef _REWRITER_typedef_NSMoveCommand #define _REWRITER_typedef_NSMoveCommand typedef struct objc_object NSMoveCommand; typedef struct {} _objc_exc_NSMoveCommand; #endif struct NSMoveCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; NSScriptObjectSpecifier *_keySpecifier; }; // - (void)setReceiversSpecifier:(nullable NSScriptObjectSpecifier *)receiversRef; // @property (readonly, retain) NSScriptObjectSpecifier *keySpecifier; /* @end */ #ifndef _REWRITER_typedef_NSQuitCommand #define _REWRITER_typedef_NSQuitCommand typedef struct objc_object NSQuitCommand; typedef struct {} _objc_exc_NSQuitCommand; #endif struct NSQuitCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; }; // @property (readonly) NSSaveOptions saveOptions; /* @end */ #ifndef _REWRITER_typedef_NSSetCommand #define _REWRITER_typedef_NSSetCommand typedef struct objc_object NSSetCommand; typedef struct {} _objc_exc_NSSetCommand; #endif struct NSSetCommand_IMPL { struct NSScriptCommand_IMPL NSScriptCommand_IVARS; NSScriptObjectSpecifier *_keySpecifier; }; // - (void)setReceiversSpecifier:(nullable NSScriptObjectSpecifier *)receiversRef; // @property (readonly, retain) NSScriptObjectSpecifier *keySpecifier; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSBundle #define _REWRITER_typedef_NSBundle typedef struct objc_object NSBundle; typedef struct {} _objc_exc_NSBundle; #endif #ifndef _REWRITER_typedef_NSData #define _REWRITER_typedef_NSData typedef struct objc_object NSData; typedef struct {} _objc_exc_NSData; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSMutableArray #define _REWRITER_typedef_NSMutableArray typedef struct objc_object NSMutableArray; typedef struct {} _objc_exc_NSMutableArray; #endif #ifndef _REWRITER_typedef_NSMutableDictionary #define _REWRITER_typedef_NSMutableDictionary typedef struct objc_object NSMutableDictionary; typedef struct {} _objc_exc_NSMutableDictionary; #endif #ifndef _REWRITER_typedef_NSMutableSet #define _REWRITER_typedef_NSMutableSet typedef struct objc_object NSMutableSet; typedef struct {} _objc_exc_NSMutableSet; #endif #ifndef _REWRITER_typedef_NSScriptClassDescription #define _REWRITER_typedef_NSScriptClassDescription typedef struct objc_object NSScriptClassDescription; typedef struct {} _objc_exc_NSScriptClassDescription; #endif #ifndef _REWRITER_typedef_NSScriptCommandDescription #define _REWRITER_typedef_NSScriptCommandDescription typedef struct objc_object NSScriptCommandDescription; typedef struct {} _objc_exc_NSScriptCommandDescription; #endif #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSScriptSuiteRegistry #define _REWRITER_typedef_NSScriptSuiteRegistry typedef struct objc_object NSScriptSuiteRegistry; typedef struct {} _objc_exc_NSScriptSuiteRegistry; #endif struct NSScriptSuiteRegistry_IMPL { struct NSObject_IMPL NSObject_IVARS; BOOL _isLoadingSDEFFiles; BOOL _isLoadingSecurityOverride; BOOL _hasLoadedIntrinsics; char _reserved1[1]; NSMutableSet *_seenBundles; NSMutableArray *_suiteDescriptionsBeingCollected; NSScriptClassDescription *_classDescriptionNeedingRegistration; NSMutableArray *_suiteDescriptions; NSScriptCommandDescription *_commandDescriptionNeedingRegistration; NSMutableDictionary *_cachedClassDescriptionsByAppleEventCode; NSMutableDictionary *_cachedCommandDescriptionsByAppleEventCodes; NSDictionary *_cachedSuiteDescriptionsByName; NSMutableDictionary *_complexTypeDescriptionsByName; NSMutableDictionary *_listTypeDescriptionsByName; unsigned int _nextComplexTypeAppleEventCode; void *_reserved2[4]; }; // + (NSScriptSuiteRegistry *)sharedScriptSuiteRegistry; // + (void)setSharedScriptSuiteRegistry:(NSScriptSuiteRegistry *)registry; // - (void)loadSuitesFromBundle:(NSBundle *)bundle; // - (void)loadSuiteWithDictionary:(NSDictionary *)suiteDeclaration fromBundle:(NSBundle *)bundle; // - (void)registerClassDescription:(NSScriptClassDescription *)classDescription; // - (void)registerCommandDescription:(NSScriptCommandDescription *)commandDescription; // @property (readonly, copy) NSArray<NSString *> *suiteNames; // - (FourCharCode)appleEventCodeForSuite:(NSString *)suiteName; // - (nullable NSBundle *)bundleForSuite:(NSString *)suiteName; // - (nullable NSDictionary<NSString *, NSScriptClassDescription *> *)classDescriptionsInSuite:(NSString *)suiteName; // - (nullable NSDictionary<NSString *, NSScriptCommandDescription *> *)commandDescriptionsInSuite:(NSString *)suiteName; // - (nullable NSString *)suiteForAppleEventCode:(FourCharCode)appleEventCode; // - (nullable NSScriptClassDescription *)classDescriptionWithAppleEventCode:(FourCharCode)appleEventCode; // - (nullable NSScriptCommandDescription *)commandDescriptionWithAppleEventClass:(FourCharCode)appleEventClassCode andAppleEventCode:(FourCharCode)appleEventIDCode; // - (nullable NSData *)aeteResource:(NSString *)languageName; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif // @class NSScriptObjectSpecifier; #ifndef _REWRITER_typedef_NSScriptObjectSpecifier #define _REWRITER_typedef_NSScriptObjectSpecifier typedef struct objc_object NSScriptObjectSpecifier; typedef struct {} _objc_exc_NSScriptObjectSpecifier; #endif // @class NSSpecifierTest; #ifndef _REWRITER_typedef_NSSpecifierTest #define _REWRITER_typedef_NSSpecifierTest typedef struct objc_object NSSpecifierTest; typedef struct {} _objc_exc_NSSpecifierTest; #endif // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #pragma clang assume_nonnull begin typedef NSUInteger NSTestComparisonOperation; enum { NSEqualToComparison = 0, NSLessThanOrEqualToComparison, NSLessThanComparison, NSGreaterThanOrEqualToComparison, NSGreaterThanComparison, NSBeginsWithComparison, NSEndsWithComparison, NSContainsComparison }; #ifndef _REWRITER_typedef_NSScriptWhoseTest #define _REWRITER_typedef_NSScriptWhoseTest typedef struct objc_object NSScriptWhoseTest; typedef struct {} _objc_exc_NSScriptWhoseTest; #endif struct NSScriptWhoseTest_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // - (BOOL)isTrue; // - (instancetype)init __attribute__((objc_designated_initializer)); // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); /* @end */ #ifndef _REWRITER_typedef_NSLogicalTest #define _REWRITER_typedef_NSLogicalTest typedef struct objc_object NSLogicalTest; typedef struct {} _objc_exc_NSLogicalTest; #endif struct NSLogicalTest_IMPL { struct NSScriptWhoseTest_IMPL NSScriptWhoseTest_IVARS; int _operator; id _subTests; }; // - (instancetype)initAndTestWithTests:(NSArray<NSSpecifierTest *> *)subTests __attribute__((objc_designated_initializer)); // - (instancetype)initOrTestWithTests:(NSArray<NSSpecifierTest *> *)subTests __attribute__((objc_designated_initializer)); // - (instancetype)initNotTestWithTest:(NSScriptWhoseTest *)subTest __attribute__((objc_designated_initializer)); /* @end */ #ifndef _REWRITER_typedef_NSSpecifierTest #define _REWRITER_typedef_NSSpecifierTest typedef struct objc_object NSSpecifierTest; typedef struct {} _objc_exc_NSSpecifierTest; #endif struct NSSpecifierTest_IMPL { struct NSScriptWhoseTest_IMPL NSScriptWhoseTest_IVARS; NSTestComparisonOperation _comparisonOperator; NSScriptObjectSpecifier *_object1; id _object2; }; // - (instancetype)init __attribute__((availability(macos,unavailable))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable instancetype)initWithCoder:(NSCoder *)inCoder __attribute__((objc_designated_initializer)); // - (instancetype)initWithObjectSpecifier:(nullable NSScriptObjectSpecifier *)obj1 comparisonOperator:(NSTestComparisonOperation)compOp testObject:(nullable id)obj2 __attribute__((objc_designated_initializer)); /* @end */ // @interface NSObject (NSComparisonMethods) // - (BOOL)isEqualTo:(nullable id)object; // - (BOOL)isLessThanOrEqualTo:(nullable id)object; // - (BOOL)isLessThan:(nullable id)object; // - (BOOL)isGreaterThanOrEqualTo:(nullable id)object; // - (BOOL)isGreaterThan:(nullable id)object; // - (BOOL)isNotEqualTo:(nullable id)object; // - (BOOL)doesContain:(id)object; // - (BOOL)isLike:(NSString *)object; // - (BOOL)isCaseInsensitiveLike:(NSString *)object; /* @end */ // @interface NSObject (NSScriptingComparisonMethods) // - (BOOL)scriptingIsEqualTo:(id)object; // - (BOOL)scriptingIsLessThanOrEqualTo:(id)object; // - (BOOL)scriptingIsLessThan:(id)object; // - (BOOL)scriptingIsGreaterThanOrEqualTo:(id)object; // - (BOOL)scriptingIsGreaterThan:(id)object; // - (BOOL)scriptingBeginsWith:(id)object; // - (BOOL)scriptingEndsWith:(id)object; // - (BOOL)scriptingContains:(id)object; /* @end */ #pragma clang assume_nonnull end // @class NSArray; #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSOrthography #define _REWRITER_typedef_NSOrthography typedef struct objc_object NSOrthography; typedef struct {} _objc_exc_NSOrthography; #endif // @protocol NSSpellServerDelegate; #pragma clang assume_nonnull begin #ifndef _REWRITER_typedef_NSSpellServer #define _REWRITER_typedef_NSSpellServer typedef struct objc_object NSSpellServer; typedef struct {} _objc_exc_NSSpellServer; #endif struct __ssFlags { unsigned int delegateLearnsWords : 1; unsigned int delegateForgetsWords : 1; unsigned int busy : 1; unsigned int _reserved : 29; } ; struct NSSpellServer_IMPL { struct NSObject_IMPL NSObject_IVARS; id _delegate; NSInteger _caseSensitive; id _spellServerConnection; id _dictionaries; NSArray *_learnedDictionaries; struct __ssFlags _ssFlags; id _checker; void *_reservedSpellServer; }; // @property (nullable, assign) id<NSSpellServerDelegate> delegate; // - (BOOL)registerLanguage:(nullable NSString *)language byVendor:(nullable NSString *)vendor; // - (BOOL)isWordInUserDictionaries:(NSString *)word caseSensitive:(BOOL)flag; // - (void)run; /* @end */ // @protocol NSSpellServerDelegate <NSObject> /* @optional */ // - (NSRange)spellServer:(NSSpellServer *)sender findMisspelledWordInString:(NSString *)stringToCheck language:(NSString *)language wordCount:(NSInteger *)wordCount countOnly:(BOOL)countOnly; // - (nullable NSArray<NSString *> *)spellServer:(NSSpellServer *)sender suggestGuessesForWord:(NSString *)word inLanguage:(NSString *)language; // - (void)spellServer:(NSSpellServer *)sender didLearnWord:(NSString *)word inLanguage:(NSString *)language; // - (void)spellServer:(NSSpellServer *)sender didForgetWord:(NSString *)word inLanguage:(NSString *)language; // - (nullable NSArray<NSString *> *)spellServer:(NSSpellServer *)sender suggestCompletionsForPartialWordRange:(NSRange)range inString:(NSString *)string language:(NSString *)language; // - (NSRange)spellServer:(NSSpellServer *)sender checkGrammarInString:(NSString *)stringToCheck language:(nullable NSString *)language details:(NSArray<NSDictionary<NSString *, id> *> * _Nullable * _Nullable)details __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSGrammarRange __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSGrammarUserDescription __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); extern "C" NSString *const NSGrammarCorrections __attribute__((availability(macos,introduced=10.5))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (nullable NSArray<NSTextCheckingResult *> *)spellServer:(NSSpellServer *)sender checkString:(NSString *)stringToCheck offset:(NSUInteger)offset types:(NSTextCheckingTypes)checkingTypes options:(nullable NSDictionary<NSString *, id> *)options orthography:(nullable NSOrthography *)orthography wordCount:(NSInteger *)wordCount __attribute__((availability(macos,introduced=10.6))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)spellServer:(NSSpellServer *)sender recordResponse:(NSUInteger)response toCorrection:(NSString *)correction forWord:(NSString *)word language:(NSString *)language __attribute__((availability(macos,introduced=10.7))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #pragma clang assume_nonnull end // @class NSString; #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDateComponents #define _REWRITER_typedef_NSDateComponents typedef struct objc_object NSDateComponents; typedef struct {} _objc_exc_NSDateComponents; #endif #ifndef _REWRITER_typedef_NSDate #define _REWRITER_typedef_NSDate typedef struct objc_object NSDate; typedef struct {} _objc_exc_NSDate; #endif #ifndef _REWRITER_typedef_NSTimeZone #define _REWRITER_typedef_NSTimeZone typedef struct objc_object NSTimeZone; typedef struct {} _objc_exc_NSTimeZone; #endif #ifndef _REWRITER_typedef_NSImage #define _REWRITER_typedef_NSImage typedef struct objc_object NSImage; typedef struct {} _objc_exc_NSImage; #endif #ifndef _REWRITER_typedef_NSAttributedString #define _REWRITER_typedef_NSAttributedString typedef struct objc_object NSAttributedString; typedef struct {} _objc_exc_NSAttributedString; #endif #ifndef _REWRITER_typedef_NSUserNotificationAction #define _REWRITER_typedef_NSUserNotificationAction typedef struct objc_object NSUserNotificationAction; typedef struct {} _objc_exc_NSUserNotificationAction; #endif // @protocol NSUserNotificationCenterDelegate; #pragma clang assume_nonnull begin typedef NSInteger NSUserNotificationActivationType; enum { NSUserNotificationActivationTypeNone = 0, NSUserNotificationActivationTypeContentsClicked = 1, NSUserNotificationActivationTypeActionButtonClicked = 2, NSUserNotificationActivationTypeReplied __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 3, NSUserNotificationActivationTypeAdditionalActionClicked __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) = 4, } __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserNotification #define _REWRITER_typedef_NSUserNotification typedef struct objc_object NSUserNotification; typedef struct {} _objc_exc_NSUserNotification; #endif struct NSUserNotification_IMPL { struct NSObject_IMPL NSObject_IVARS; id _internal; }; // - (instancetype)init __attribute__((objc_designated_initializer)); // @property (nullable, copy) NSString *title; // @property (nullable, copy) NSString *subtitle; // @property (nullable, copy) NSString *informativeText; // @property (copy) NSString *actionButtonTitle; // @property (nullable, copy) NSDictionary<NSString *, id> *userInfo; // @property (nullable, copy) NSDate *deliveryDate; // @property (nullable, copy) NSTimeZone *deliveryTimeZone; // @property (nullable, copy) NSDateComponents *deliveryRepeatInterval; // @property (nullable, readonly, copy) NSDate *actualDeliveryDate; // @property (readonly, getter=isPresented) BOOL presented; // @property (readonly, getter=isRemote) BOOL remote; // @property (nullable, copy) NSString *soundName; // @property BOOL hasActionButton; // @property (readonly) NSUserNotificationActivationType activationType; // @property (copy) NSString *otherButtonTitle; // @property (nullable, copy) NSString *identifier __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) NSImage *contentImage __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property BOOL hasReplyButton __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) NSString *responsePlaceholder __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, readonly, copy) NSAttributedString *response __attribute__((availability(macos,introduced=10.9))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, copy) NSArray<NSUserNotificationAction *> *additionalActions __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // @property (nullable, readonly, copy) NSUserNotificationAction *additionalActivationAction __attribute__((availability(macos,introduced=10.10))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ __attribute__((availability(macos,introduced=10.10,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserNotificationAction #define _REWRITER_typedef_NSUserNotificationAction typedef struct objc_object NSUserNotificationAction; typedef struct {} _objc_exc_NSUserNotificationAction; #endif struct NSUserNotificationAction_IMPL { struct NSObject_IMPL NSObject_IVARS; }; // + (instancetype)actionWithIdentifier:(nullable NSString *)identifier title:(nullable NSString *)title; // @property (nullable, readonly, copy) NSString *identifier; // @property (nullable, readonly, copy) NSString *title; /* @end */ extern "C" NSString * const NSUserNotificationDefaultSoundName __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserNotificationCenter #define _REWRITER_typedef_NSUserNotificationCenter typedef struct objc_object NSUserNotificationCenter; typedef struct {} _objc_exc_NSUserNotificationCenter; #endif struct NSUserNotificationCenter_IMPL { struct NSObject_IMPL NSObject_IVARS; id _internal; }; @property (class, readonly, strong) NSUserNotificationCenter *defaultUserNotificationCenter; // @property (nullable, assign) id <NSUserNotificationCenterDelegate> delegate; // @property (copy) NSArray<NSUserNotification *> *scheduledNotifications; // - (void)scheduleNotification:(NSUserNotification *)notification; // - (void)removeScheduledNotification:(NSUserNotification *)notification; // @property (readonly, copy) NSArray<NSUserNotification *> *deliveredNotifications; // - (void)deliverNotification:(NSUserNotification *)notification; // - (void)removeDeliveredNotification:(NSUserNotification *)notification; // - (void)removeAllDeliveredNotifications; /* @end */ // @protocol NSUserNotificationCenterDelegate <NSObject> /* @optional */ // - (void)userNotificationCenter:(NSUserNotificationCenter *)center didDeliverNotification:(NSUserNotification *)notification __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (void)userNotificationCenter:(NSUserNotificationCenter *)center didActivateNotification:(NSUserNotification *)notification __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); // - (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentNotification:(NSUserNotification *)notification __attribute__((availability(macos,introduced=10.8,deprecated=11.0,message="All NSUserNotifications API should be replaced with UserNotifications.frameworks API"))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))); /* @end */ #pragma clang assume_nonnull end // @class NSAppleEventDescriptor; #ifndef _REWRITER_typedef_NSAppleEventDescriptor #define _REWRITER_typedef_NSAppleEventDescriptor typedef struct objc_object NSAppleEventDescriptor; typedef struct {} _objc_exc_NSAppleEventDescriptor; #endif #ifndef _REWRITER_typedef_NSArray #define _REWRITER_typedef_NSArray typedef struct objc_object NSArray; typedef struct {} _objc_exc_NSArray; #endif #ifndef _REWRITER_typedef_NSDictionary #define _REWRITER_typedef_NSDictionary typedef struct objc_object NSDictionary; typedef struct {} _objc_exc_NSDictionary; #endif #ifndef _REWRITER_typedef_NSError #define _REWRITER_typedef_NSError typedef struct objc_object NSError; typedef struct {} _objc_exc_NSError; #endif #ifndef _REWRITER_typedef_NSFileHandle #define _REWRITER_typedef_NSFileHandle typedef struct objc_object NSFileHandle; typedef struct {} _objc_exc_NSFileHandle; #endif #ifndef _REWRITER_typedef_NSString #define _REWRITER_typedef_NSString typedef struct objc_object NSString; typedef struct {} _objc_exc_NSString; #endif #ifndef _REWRITER_typedef_NSURL #define _REWRITER_typedef_NSURL typedef struct objc_object NSURL; typedef struct {} _objc_exc_NSURL; #endif #ifndef _REWRITER_typedef_NSXPCConnection #define _REWRITER_typedef_NSXPCConnection typedef struct objc_object NSXPCConnection; typedef struct {} _objc_exc_NSXPCConnection; #endif #pragma clang assume_nonnull begin __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserScriptTask #define _REWRITER_typedef_NSUserScriptTask typedef struct objc_object NSUserScriptTask; typedef struct {} _objc_exc_NSUserScriptTask; #endif struct NSUserScriptTask_IMPL { struct NSObject_IMPL NSObject_IVARS; NSURL *_scriptURL; NSXPCConnection *_connection; BOOL _hasExeced; BOOL _hasTerminated; NSFileHandle *_stdin; NSFileHandle *_stdout; NSFileHandle *_stderr; }; // - (nullable instancetype)initWithURL:(NSURL *)url error:(NSError **)error __attribute__((objc_designated_initializer)); // @property (readonly, copy) NSURL *scriptURL; typedef void (*NSUserScriptTaskCompletionHandler)(NSError * _Nullable error); // - (void)executeWithCompletionHandler:(nullable NSUserScriptTaskCompletionHandler)handler; /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserUnixTask #define _REWRITER_typedef_NSUserUnixTask typedef struct objc_object NSUserUnixTask; typedef struct {} _objc_exc_NSUserUnixTask; #endif struct NSUserUnixTask_IMPL { struct NSUserScriptTask_IMPL NSUserScriptTask_IVARS; }; // @property (nullable, retain) NSFileHandle *standardInput; // @property (nullable, retain) NSFileHandle *standardOutput; // @property (nullable, retain) NSFileHandle *standardError; typedef void (*NSUserUnixTaskCompletionHandler)(NSError *_Nullable error); // - (void)executeWithArguments:(nullable NSArray<NSString *> *)arguments completionHandler:(nullable NSUserUnixTaskCompletionHandler)handler; /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserAppleScriptTask #define _REWRITER_typedef_NSUserAppleScriptTask typedef struct objc_object NSUserAppleScriptTask; typedef struct {} _objc_exc_NSUserAppleScriptTask; #endif struct NSUserAppleScriptTask_IMPL { struct NSUserScriptTask_IMPL NSUserScriptTask_IVARS; BOOL _isParentDefaultTarget; }; typedef void (*NSUserAppleScriptTaskCompletionHandler)(NSAppleEventDescriptor * _Nullable result, NSError * _Nullable error); // - (void)executeWithAppleEvent:(nullable NSAppleEventDescriptor *)event completionHandler:(nullable NSUserAppleScriptTaskCompletionHandler)handler; /* @end */ __attribute__((availability(macos,introduced=10.8))) __attribute__((availability(ios,unavailable))) __attribute__((availability(watchos,unavailable))) __attribute__((availability(tvos,unavailable))) #ifndef _REWRITER_typedef_NSUserAutomatorTask #define _REWRITER_typedef_NSUserAutomatorTask typedef struct objc_object NSUserAutomatorTask; typedef struct {} _objc_exc_NSUserAutomatorTask; #endif struct NSUserAutomatorTask_IMPL { struct NSUserScriptTask_IMPL NSUserScriptTask_IVARS; NSDictionary *_variables; }; // @property (nullable, copy) NSDictionary<NSString *, id> *variables; typedef void (*NSUserAutomatorTaskCompletionHandler)(id _Nullable result, NSError * _Nullable error); // - (void)executeWithInput:(nullable id <NSSecureCoding>)input completionHandler:(nullable NSUserAutomatorTaskCompletionHandler)handler; /* @end */ #pragma clang assume_nonnull end struct __main_block_impl_0 { struct __block_impl impl; struct __main_block_desc_0* Desc; NSMutableArray *array; __main_block_impl_0(void *fp, struct __main_block_desc_0 *desc, NSMutableArray *_array, int flags=0) : array(_array) { impl.isa = &_NSConcreteStackBlock; impl.Flags = flags; impl.FuncPtr = fp; Desc = desc; } }; static void __main_block_func_0(struct __main_block_impl_0 *__cself, id obj) { NSMutableArray *array = __cself->array; // bound by copy ((void (*)(id, SEL, ObjectType _Nonnull))(void *)objc_msgSend)((id)array, sel_registerName("addObject:"), (id)obj); NSLog((NSString *)&__NSConstantStringImpl__var_folders_6f_7kd4y9hd2hxdy7xwscqfq5_h0000gn_T_test2_982d4b_mi_0, ((NSUInteger (*)(id, SEL))(void *)objc_msgSend)((id)array, sel_registerName("count"))); } static void __main_block_copy_0(struct __main_block_impl_0*dst, struct __main_block_impl_0*src) {_Block_object_assign((void*)&dst->array, (void*)src->array, 3/*BLOCK_FIELD_IS_OBJECT*/);} static void __main_block_dispose_0(struct __main_block_impl_0*src) {_Block_object_dispose((void*)src->array, 3/*BLOCK_FIELD_IS_OBJECT*/);} static struct __main_block_desc_0 { size_t reserved; size_t Block_size; void (*copy)(struct __main_block_impl_0*, struct __main_block_impl_0*); void (*dispose)(struct __main_block_impl_0*); } __main_block_desc_0_DATA = { 0, sizeof(struct __main_block_impl_0), __main_block_copy_0, __main_block_dispose_0}; int main() { typedef void (*blk_t)(id obj); blk_t blk; { NSMutableArray *array = ((NSMutableArray *(*)(id, SEL))(void *)objc_msgSend)((id)((NSMutableArray *(*)(id, SEL))(void *)objc_msgSend)((id)objc_getClass("NSMutableArray"), sel_registerName("alloc")), sel_registerName("init")); blk = ((void (*)(id))&__main_block_impl_0((void *)__main_block_func_0, &__main_block_desc_0_DATA, array, 570425344)); } ((void (*)(__block_impl *, id))((__block_impl *)blk)->FuncPtr)((__block_impl *)blk, ((NSObject *(*)(id, SEL))(void *)objc_msgSend)((id)((NSObject *(*)(id, SEL))(void *)objc_msgSend)((id)objc_getClass("NSObject"), sel_registerName("alloc")), sel_registerName("init"))); } static struct IMAGE_INFO { unsigned version; unsigned flag; } _OBJC_IMAGE_INFO = { 0, 2 };
[ "xiaxuqiang@changingedu.com" ]
xiaxuqiang@changingedu.com
b47cececc11507d0f4a807f34d27876d62d0e4c4
162993e42c88ebe93dedd435199f8dfb43ae45ae
/src/collision/plane.cpp
263b40d1f42d07ef71467707ef0d9117643990b0
[]
no_license
tcglezen/SoupSim
4a8ffd305363c27cec3d8bdd397850b9c4bb88f5
e19f9687ff1800b379ad6f3b4104082c84b0f7b7
refs/heads/master
2023-04-19T09:51:34.325429
2021-05-11T04:29:46
2021-05-11T04:29:46
355,768,723
0
0
null
null
null
null
UTF-8
C++
false
false
2,218
cpp
#include "iostream" #include <nanogui/nanogui.h> #include "../fluidMesh.h" #include "../fluidSimulator.h" #include "plane.h" using namespace std; using namespace CGL; // Original off set is 0.0001 #define SURFACE_OFFSET 0.00001 void Plane::collide(Particle &p) { // TODO (Part 3): Handle collisions with planes. // If last pos is on one side of plane and pos is on other side, then we have a collision if ((dot(p.position - point, normal) >= 0) != (dot(p.last_position - point, normal) >= 0)) { //TODO: this iffy if condition is probably causing bouncing // First project position onto plane (source: https://www.youtube.com/watch?v=r5VCChxnLnQ) Vector3D v = p.position - point; Vector3D proj_n_v = dot(v, normal) * normal; Vector3D tangent_point = p.position - proj_n_v; // compute correction vector for last_position Vector3D correction_vector = (tangent_point + normal * SURFACE_OFFSET) - p.last_position; // set point mass's new position to be it's last position adjusted by above correction vector scaled down by friction p.position = p.last_position + correction_vector * (1.0 - friction); } } void Plane::render(GLShader &shader) { nanogui::Color color(0.7f, 0.7f, 0.7f, 1.0f); Vector3f sPoint(point.x, point.y, point.z); Vector3f sNormal(normal.x, normal.y, normal.z); Vector3f sParallel(normal.y - normal.z, normal.z - normal.x, normal.x - normal.y); sParallel.normalize(); Vector3f sCross = sNormal.cross(sParallel); MatrixXf positions(3, 4); MatrixXf normals(3, 4); positions.col(0) << sPoint + 2 * (sCross + sParallel); positions.col(1) << sPoint + 2 * (sCross - sParallel); positions.col(2) << sPoint + 2 * (-sCross + sParallel); positions.col(3) << sPoint + 2 * (-sCross - sParallel); normals.col(0) << sNormal; normals.col(1) << sNormal; normals.col(2) << sNormal; normals.col(3) << sNormal; if (shader.uniform("u_color", false) != -1) { shader.setUniform("u_color", color); } shader.uploadAttrib("in_position", positions); if (shader.attrib("in_normal", false) != -1) { shader.uploadAttrib("in_normal", normals); } shader.drawArray(GL_TRIANGLE_STRIP, 0, 4); }
[ "josh.ym3@gmail.com" ]
josh.ym3@gmail.com
53ec89e00d56b46366fb6b1e687be11c260e5c67
4487331719f5c9cf408bf79c99972ad53fad3dc5
/complex.hpp
a61b73a9c761ebee0995915df44889472a614113
[]
no_license
brandonjohns914/Practicing_Classes
6efc7855ebfa10ca870a8da93207f5a61a86afe9
cfd2d06ed4c85eee0c4954f8debec11d1ce25dbc
refs/heads/master
2020-09-16T16:17:25.478051
2019-12-09T22:02:15
2019-12-09T22:02:15
223,827,045
0
0
null
null
null
null
UTF-8
C++
false
false
1,344
hpp
// // complex.hpp // lab_exam_3_practice // // Created by Brandon Johns on 4/29/18. // Copyright © 2018 Brandon Johns. All rights reserved. // #ifndef complex_hpp #define complex_hpp #include <stdio.h> using namespace std; #include<iostream> #include <cmath> class complex { public: complex (double r = 0, double i = 0): re (r), im (i) { } double real () const { return re; } double imag () const { return im; } private: double re, im; friend double real (const complex&) ; friend double imag (const complex&) ; friend complex operator + (const complex&, const complex&); friend complex operator - (const complex&, const complex&); friend complex operator * (const complex&, const complex&); friend complex operator / (const complex&, const complex&); friend bool operator == (const complex&, const complex&); friend bool operator != (const complex&, const complex&); friend complex polar (double, double); friend istream& operator>> (istream&, complex&); friend ostream& operator<< (ostream&, const complex&); }; double norm (const complex& x); void complexoutput(); #endif /* complex_hpp */
[ "noreply@github.com" ]
noreply@github.com
a4f90908ff15b89b2251fb8336eece1347d7da0a
56e4a55377e46151ce625d42ce9aae30719bd5b1
/history_practice/剑指offer/替换空格/替换空格.cpp
5b025bc263da125e2be778a61f4467add51ca9d5
[]
no_license
wolfdan666/WolfEat3moreMeatEveryday
a308abdf971505fe45df3c17b083b103a92010fe
1d87dfad14820435e4bd136f6df6ad9c2715c9cd
refs/heads/master
2022-12-22T08:58:09.618648
2022-12-09T12:09:59
2022-12-09T12:09:59
180,492,720
4
0
null
null
null
null
UTF-8
C++
false
false
1,746
cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) for(int i = int(a); i <= int(b); ++i) #define per(i, b, a) for(int i = int(b); i >= int(a); --i) #define mem(x, y) memset(x, y, sizeof(x)) #define SZ(x) x.size() #define mk make_pair #define pb push_back #define fi first #define se second const ll mod=1000000007; const int inf = 0x3f3f3f3f; inline int rd(){char c=getchar();int x=0,f=1;while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}return x*f;} inline ll qpow(ll a,ll b){ll ans=1%mod;for(;b;b>>=1){if(b&1)ans=ans*a%mod;a=a*a%mod;}return ans;} const int strLen = 1024; class Solution { public: void replaceSpace(char *str,int length) { if(str == nullptr || length <= 0) return; int originLength = 0,numberOfBlank = 0; int i = 0; while(str[i] != '\0'){ originLength++; if(str[i] == ' ') numberOfBlank++; i++; } int newLength = originLength+numberOfBlank*2; if(newLength > length) return ; int indexOfOrigin = originLength; int indexOfNew = newLength; while(indexOfOrigin>=0 && indexOfNew >= indexOfOrigin){ if(str[indexOfOrigin] == ' '){ str[indexOfNew--] = '0'; str[indexOfNew--] = '2'; str[indexOfNew--] = '%'; } else { str[indexOfNew--] = str[indexOfOrigin]; } indexOfOrigin--; } } }; int main(){ char s[strLen]; // scanf("%s",s); cin.getline(s,strLen); // 设置变化后的最长长度 int len = 1000; Solution A; A.replaceSpace(s,len); cout<<s<<endl; return 0; }
[ "wolfdan666666@gmail.com" ]
wolfdan666666@gmail.com
6342fe6f60d3628074e0180c49fed1e73af0d936
51c8fabe609cc7de64dc1aa8a0c702d1ae4f61fe
/47.ParticleEx3/Classes/HelloWorldScene.cpp
0e34a734b6adbd0e0ec4f400eed5091bab870ba5
[]
no_license
Gasbebe/cocos2d_source
5f7720da904ff71a4951bee470b8744aab51c59d
2376f6bdb93a58ae92c0e9cbd06c0d97cd241d14
refs/heads/master
2021-01-18T22:35:30.357253
2016-05-20T08:10:55
2016-05-20T08:10:55
54,854,003
0
0
null
null
null
null
UTF-8
C++
false
false
2,042
cpp
#include "HelloWorldScene.h" USING_NS_CC; Scene* HelloWorld::createScene() { auto scene = Scene::create(); auto layer = HelloWorld::create(); scene->addChild(layer); // return the scene return scene; } // on "init" you need to initialize your instance bool HelloWorld::init() { if ( !LayerColor::initWithColor(Color4B(0,0,0,255)) ) { return false; } ///////////////////////////// return true; } void HelloWorld::onEnter() { Layer::onEnter(); auto listener = EventListenerTouchOneByOne::create(); listener->setSwallowTouches(true); listener->onTouchBegan = CC_CALLBACK_2(HelloWorld::onTouchBegan, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); } void HelloWorld::onExit() { _eventDispatcher->removeEventListenersForType(EventListener::Type::TOUCH_ONE_BY_ONE); Layer::onExit(); } bool HelloWorld::onTouchBegan(Touch *touch, Event *event){ auto touchPoint = touch->getLocation(); this->showParticle(touchPoint); return true; } void HelloWorld::showParticle(Vec2 point) { const char* filename1 = "Particles/BoilingFoam.plist"; const char* filename2 = "Particles/BurstPipe.plist"; const char* filename3 = "Particles/Comet.plist"; const char* filename4 = "Particles/ExplodingRing.plist"; const char* filename5 = "Particles/Flower.plist"; const char* filename6 = "Particles/Galaxy.plist"; const char* filename7 = "Particles/LavaFlow.plist"; const char* filename8 = "Particles/Phoenix.plist"; const char* filename9 = "Particles/SmallSun.plist"; const char* filename10 = "Particles/SpinningPeas.plist"; const char* filename11 = "Particles/Sprial.plist"; const char* filename12 = "Particles/SpookyPeas.plist"; const char* filename13 = "Particles/TestPremultipliedAlpha.plist"; const char* filename14 = "Particles/Upsidedown.plist"; ParticleSystem* emitter = ParticleSystemQuad::create(filename1); emitter->setPosition(point); emitter->setDuration(2.0f); emitter->setAutoRemoveOnFinish(true); this->addChild(emitter); }
[ "gasbebe@gmail.com" ]
gasbebe@gmail.com
99156ba519280ae236e878250ce536365e79dba7
417b6d84afb611697cefb84de81499d4bccbe389
/mysensors_v2/MotionLightSensor/MotionLightSensor.ino
b6cd30582e580697894cac0fc2529d095aaa3e83
[]
no_license
abmantis/arduino_sketches
db8d9f3bada9a0f6ff4f5547db9892c738ec9c9b
f18204ad1171686f8aba771c4fe15e1d2f4bb893
refs/heads/master
2020-06-27T11:34:01.486372
2017-07-29T21:07:50
2017-07-29T21:07:50
97,052,439
0
0
null
null
null
null
UTF-8
C++
false
false
3,724
ino
// Enable debug prints // #define MY_DEBUG // Enable and select radio type attached #define MY_RADIO_NRF24 #include <SPI.h> #include <MySensors.h> #include <readVcc.h> #define MIN_V 2000 // empty voltage (0%) #define MAX_V 3000 // full voltage (100%) #define MOTION_DPIN 2 // The digital input you attached your motion sensor. (Only 2 and 3 generates interrupt!) #define LIGHT_APIN 0 // The analog input you attached your light sensor. #define TEMP_DPIN 4 // The analog input you attached your OneWire Temp sensor. #define MOTION_CHILD_ID 1 #define LIGHT_CHILD_ID 2 #define TEMP_CHILD_ID 3 #define MY_SMART_SLEEP_WAIT_DURATION 100 // Initialize motion message MyMessage msg_motion(MOTION_CHILD_ID, V_TRIPPED); MyMessage msg_light(LIGHT_CHILD_ID, V_LIGHT_LEVEL); uint8_t gMotionState = 2; void before() { } void setup() { pinMode(MOTION_DPIN, INPUT); // sets the motion sensor digital pin as input } void presentation() { // Send the sketch version information to the gateway and Controller sendSketchInfo("Motion Light Sensor", "1.46"); // Register all sensors to gw (they will be created as child devices) present(MOTION_CHILD_ID, S_MOTION); present(LIGHT_CHILD_ID, S_LIGHT_LEVEL); } void loop() { uint8_t prevMotion = gMotionState; sendMotionLightState(); if(prevMotion != gMotionState) { // this should be one of the first messages, since the controller usually // sends messages to nodes right after receiving a message from the node // and we listen for messeges here pingGateway(); } sendBattery(); if (gMotionState == LOW) { // Sleep 3 secs since transmitting may trigger the motion sensor sleep(3100); // DO NOT SEND ANYTHING AFTER THIS, EXCEPT MOTION SENSOR CHANGES. // Since the motion sensor sometimes fires when the radio transmits, // all transmissions should be done before the "stabilization" sleep // above. } sendMotionLightState(); doSleep(); } void doSleep() { unsigned long sleepTime = 0; static int quickCheckCount = 0; if (gMotionState == HIGH) { // right after motion is detected wake periodically to check for light changes // quickly, since a light (from another room) could have just been turned off if (quickCheckCount < 5) { ++quickCheckCount; sleepTime = 1000; } else { sleepTime = 10000; } } else { quickCheckCount = 0; } // Sleep until interrupt comes in on motion sensor. sleep(digitalPinToInterrupt(MOTION_DPIN), CHANGE, sleepTime); } void sendMotionLightState() { sendMotionState(); if (gMotionState == HIGH) { sendLightState(); } } void sendMotionState() { // Read digital motion value uint8_t tripped = digitalRead(MOTION_DPIN); if (tripped != gMotionState) { send(msg_motion.set(tripped==HIGH ? 1 : 0)); gMotionState = tripped; } } void sendLightState() { static int oldLightLevel = -10; int lightLevel = (1023-analogRead(LIGHT_APIN))/10.23; int oldToNew = oldLightLevel - lightLevel; if (abs(oldToNew) > 3) { send(msg_light.set(lightLevel)); oldLightLevel = lightLevel; } } void sendBattery() // Send battery percentage to GW { static int oldBatteryPcnt = -10; int batteryPcnt = min(map(readVcc(), MIN_V, MAX_V, 0, 100), 100); // Get VCC and convert to percentage int oldToNew = oldBatteryPcnt - batteryPcnt; if (abs(oldToNew) > 3 ) { // If battery percentage has changed sendBatteryLevel(batteryPcnt); // Send battery percentage to gateway oldBatteryPcnt = batteryPcnt; } } void pingGateway() { sendHeartbeat(); wait(MY_SMART_SLEEP_WAIT_DURATION); }
[ "amfcalt@gmail.com" ]
amfcalt@gmail.com
86480f7717e6025dd1902a67bb0aec8ef70de7c9
6e01d477561c36ff7542d6395d8593e7424a7a51
/scene.cpp
7d2e01c674892184979b34d8998e5e319261c957
[]
no_license
oasiskharkov/Playrix
a891df19b236019444d6bb8c08a74f4450aabe85
e219b124bc733d47d1eb8af9d1acd44a139f19a9
refs/heads/master
2020-04-03T10:05:24.535465
2016-08-10T22:26:34
2016-08-10T22:26:34
65,151,484
0
0
null
null
null
null
UTF-8
C++
false
false
6,217
cpp
#include "scene.h" #include "input.h" #include "objects.h" #include "monster.h" Scene* Scene::instance( 0 ); Scene* Scene::getInstance( int fieldNumber ) { if( instance == 0 ) { instance = new Scene( fieldNumber ); } return instance; } Scene::Scene( int fieldNumber ) : m_nFieldNumber( fieldNumber ), cellCenters( 0 ) { m_hFloorTileTex = hge->Texture_Load( "Resources\\square.png" ); m_hBlockTex = hge->Texture_Load( "Resources\\block.png" ); m_hCursorTex = hge->Texture_Load( "Resources\\cursor.png" ); m_hCellSelectionTex = hge->Texture_Load( "Resources\\green_cross.png" ); m_hCircleTex = hge->Texture_Load( "Resources\\circle.png" ); fillCellCenters( ); prepareSources( ); // If one of the source files is not found, free all scene sources and throw an error message. if( !m_upFloorTile || !m_upBlock || !m_upCursor || !m_upCellSelectionAni || !m_upCircle || !m_upFont ) { release( ); throw game_errors::LOAD_SCENE_SOURCES; } } Scene::~Scene(void) { release( ); } void Scene::release( ) { hge->Texture_Free( m_hFloorTileTex ); hge->Texture_Free( m_hBlockTex ); hge->Texture_Free( m_hCursorTex ); hge->Texture_Free( m_hCellSelectionTex ); hge->Texture_Free( m_hCircleTex ); delete [] cellCenters; instance = 0; } bool Scene::prepareSources( ) { try { m_upFloorTile.reset( new hgeSprite( m_hFloorTileTex, 0.0f, 0.0f, 128.0f, 128.0f ) ); m_upBlock.reset( new hgeSprite( m_hBlockTex, 0.0f, 0.0f, 128.0f, 128.0f ) ); m_upCursor.reset( new hgeSprite( m_hCursorTex, 0.0f, 0.0f, 16.0f, 16.0f ) ); m_upCellSelectionAni.reset( new hgeAnimation( m_hCellSelectionTex, 4, 5.0f, 0.0f, 0.0f, 32.0f, 32.0f ) ); m_upCircle.reset( new hgeSprite( m_hCircleTex, 0.0f, 0.0f, 88.0f, 88.0f ) ); m_upFont.reset( new hgeFont( "Resources\\font1.fnt" ) ); } catch(...) { return false; } return true; } void Scene::readCellsFromFile( char* centers, const char* filename ) { char directory[ 0x400 ]; char mainDirectory[ 0x400 ]; HANDLE hFile; DWORD dwBytes; GetCurrentDirectory( 0x400, mainDirectory ); strcpy( directory, mainDirectory ); strcat( directory, "\\Resources" ); SetCurrentDirectory( directory ); if( INVALID_HANDLE_VALUE != ( hFile = CreateFile( filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL ) ) ) { ReadFile( hFile, centers, MRC * MRC + 2 * MRC, &dwBytes, NULL ); } else { throw game_errors::OPEN_FILE; } char* begin = centers; char* start = begin; while( *centers != '\0' ) { if( *centers == '0' || *centers == 'X' ) { *start = *centers; start++; } centers++; } *start = '\0'; centers = begin; CloseHandle( hFile ); SetCurrentDirectory( mainDirectory ); } void Scene::fillCellCenters( ) { cellCenters = new char[ MRC * MRC + 2 * MRC ]; if( canSetupObstacle( ) ) { memset( cellCenters, '0', MRC * MRC ); cellCenters[ MRC * MRC + 1 ] = '\0'; } else { switch( m_nFieldNumber ) { case 1: readCellsFromFile( cellCenters, "field1.txt" ); break; case 2: readCellsFromFile( cellCenters, "field2.txt" ); break; case 3: readCellsFromFile( cellCenters, "field3.txt" ); break; } } } void Scene::renderFloorTiles( ) { float tile_x = 0, tile_y = 0; for( size_t i = 0; i < MRC; i++ ) { for( size_t j = 0; j < MRC; j++ ) { if( cellCenters[ i * MRC + j ] == '0' ) { m_upFloorTile->RenderStretch( tile_x, tile_y, tile_x + TILE_STEP, tile_y + TILE_STEP ); } else { m_upBlock->RenderStretch( tile_x, tile_y, tile_x + TILE_STEP, tile_y + TILE_STEP ); } tile_x += TILE_STEP; } tile_y += TILE_STEP; tile_x = 0.0f; } } void Scene::renderPath( ) { if( objects->getMonster( ) != nullptr && objects->getMonster( )->isMoving( ) ) { auto path = objects->getMonster( )->getPath( ); for( size_t i = path.size( ) - 1; i > 0; i-- ) { m_upCircle->SetHotSpot( 44.0f, 44.0f ); auto current = getCenterByIndices( path[ i ] ); auto dest = getCenterByIndices( path[ i - 1 ] ); auto middle = hgeVector( ( current.x + dest.x ) / 2.0f, ( current.y + dest.y ) / 2.0f ); m_upCircle->RenderEx( current.x, current.y, 0.0f, 0.1f ); m_upCircle->RenderEx( middle.x, middle.y, 0.0f, 0.1f ); } } } void Scene::renderCellSelection( ) { if( objects->getMonster( ) != nullptr && objects->getMonster( )->isMoving( ) ) { auto dest = objects->getMonster( )->getPath( ).front( ); auto destination = getCenterByIndices( dest ); if( !m_upCellSelectionAni->IsPlaying( ) ) { m_upCellSelectionAni->Play( ); } else { m_upCellSelectionAni->Update( dt ); } m_upCellSelectionAni->SetHotSpot( 16.0f, 16.0f ); m_upCellSelectionAni->RenderEx( destination.x, destination.y, 0.0f, 0.8f ); } } void Scene::renderScene( ) { renderFloorTiles( ); renderPath( ); renderCellSelection( ); } void Scene::renderCursor( ) { auto cursor = Input::getMousePosition( ); m_upCursor->Render( cursor.x , cursor.y ); } void Scene::makeObstacle( ) { auto pos = Input::getMousePosition( ); auto indices = getCellIndices( pos ); int i = indices.first; int j = indices.second; char* center = scene->getCellCenters( ); if( !scene->canSetupObstacle( ) || ( objects->getMonster( ) != nullptr && (indices == getCellIndices( objects->getMonster( )->getPosition( ) ) || objects->getMonster( )->isMoving( ) ) ) ) { return; } if( center[ i * MRC + j ] == 'X' ) { center[ i * MRC + j ] = '0'; } else if( center[ i * MRC + j ] == '0' ) { center[ i * MRC + j ] = 'X'; } } hgeVector Scene::getSelectedCellCenter( ) { hgeVector center = Input::getMousePosition( ); auto indices = getCellIndices( center ); center.x = TILE_STEP * indices.second + TILE_STEP / 2.0f; center.y = TILE_STEP * indices.first + TILE_STEP / 2.0f; return center; } std::pair<int,int> Scene::getCellIndices( hgeVector pos ) { int i = static_cast<int>( pos.y / TILE_STEP ); int j = static_cast<int>( pos.x / TILE_STEP ); return std::pair<int,int>( i, j ); } hgeVector Scene::getCenterByIndices( std::pair<int, int> indices ) { float x = indices.second * TILE_STEP + TILE_STEP / 2.0f; float y = indices.first * TILE_STEP + TILE_STEP / 2.0f; return hgeVector( x, y ); }
[ "kasystems@yandex.ru" ]
kasystems@yandex.ru
d2bca74021194e0bfaa3195fc26e09d667dad53e
a64214446459e06a66487a9b8225e4add03abb5c
/src/qt/askpassphrasedialog.cpp
292b104d2c8dc8eb1886fef1f259fa0ceee7971b
[ "MIT" ]
permissive
clonecoin/clonecoin
a9a5faf27a309c07ffb17f6f8f0ef9357f498d93
b1f526728f5fe5eae0c5e461a3eab835f5a93b42
refs/heads/master
2020-04-25T11:28:42.927896
2014-01-10T02:31:08
2014-01-10T02:31:08
15,621,235
0
1
null
null
null
null
UTF-8
C++
false
false
9,723
cpp
#include "askpassphrasedialog.h" #include "ui_askpassphrasedialog.h" #include "guiconstants.h" #include "walletmodel.h" #include <QMessageBox> #include <QPushButton> #include <QKeyEvent> AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : QDialog(parent), ui(new Ui::AskPassphraseDialog), mode(mode), model(0), fCapsLock(false) { ui->setupUi(this); ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE); ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE); ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE); // Setup Caps Lock detection. ui->passEdit1->installEventFilter(this); ui->passEdit2->installEventFilter(this); ui->passEdit3->installEventFilter(this); switch(mode) { case Encrypt: // Ask passphrase x2 ui->passLabel1->hide(); ui->passEdit1->hide(); ui->warningLabel->setText(tr("Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.")); setWindowTitle(tr("Encrypt wallet")); break; case Unlock: // Ask passphrase ui->warningLabel->setText(tr("This operation needs your wallet passphrase to unlock the wallet.")); ui->passLabel2->hide(); ui->passEdit2->hide(); ui->passLabel3->hide(); ui->passEdit3->hide(); setWindowTitle(tr("Unlock wallet")); break; case Decrypt: // Ask passphrase ui->warningLabel->setText(tr("This operation needs your wallet passphrase to decrypt the wallet.")); ui->passLabel2->hide(); ui->passEdit2->hide(); ui->passLabel3->hide(); ui->passEdit3->hide(); setWindowTitle(tr("Decrypt wallet")); break; case ChangePass: // Ask old passphrase + new passphrase x2 setWindowTitle(tr("Change passphrase")); ui->warningLabel->setText(tr("Enter the old and new passphrase to the wallet.")); break; } textChanged(); connect(ui->passEdit1, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); connect(ui->passEdit2, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); connect(ui->passEdit3, SIGNAL(textChanged(QString)), this, SLOT(textChanged())); } AskPassphraseDialog::~AskPassphraseDialog() { // Attempt to overwrite text so that they do not linger around in memory ui->passEdit1->setText(QString(" ").repeated(ui->passEdit1->text().size())); ui->passEdit2->setText(QString(" ").repeated(ui->passEdit2->text().size())); ui->passEdit3->setText(QString(" ").repeated(ui->passEdit3->text().size())); delete ui; } void AskPassphraseDialog::setModel(WalletModel *model) { this->model = model; } void AskPassphraseDialog::accept() { SecureString oldpass, newpass1, newpass2; if(!model) return; oldpass.reserve(MAX_PASSPHRASE_SIZE); newpass1.reserve(MAX_PASSPHRASE_SIZE); newpass2.reserve(MAX_PASSPHRASE_SIZE); // TODO: get rid of this .c_str() by implementing SecureString::operator=(std::string) // Alternately, find a way to make this input mlock()'d to begin with. oldpass.assign(ui->passEdit1->text().toStdString().c_str()); newpass1.assign(ui->passEdit2->text().toStdString().c_str()); newpass2.assign(ui->passEdit3->text().toStdString().c_str()); switch(mode) { case Encrypt: { if(newpass1.empty() || newpass2.empty()) { // Cannot encrypt with empty passphrase break; } QMessageBox::StandardButton retval = QMessageBox::question(this, tr("Confirm wallet encryption"), tr("Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR CLONECOINS</b>!") + "<br><br>" + tr("Are you sure you wish to encrypt your wallet?"), QMessageBox::Yes|QMessageBox::Cancel, QMessageBox::Cancel); if(retval == QMessageBox::Yes) { if(newpass1 == newpass2) { if(model->setWalletEncrypted(true, newpass1)) { QMessageBox::warning(this, tr("Wallet encrypted"), "<qt>" + tr("Clonecoin will close now to finish the encryption process. " "Remember that encrypting your wallet cannot fully protect " "your clonecoins from being stolen by malware infecting your computer.") + "<br><br><b>" + tr("IMPORTANT: Any previous backups you have made of your wallet file " "should be replaced with the newly generated, encrypted wallet file. " "For security reasons, previous backups of the unencrypted wallet file " "will become useless as soon as you start using the new, encrypted wallet.") + "</b></qt>"); QApplication::quit(); } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("Wallet encryption failed due to an internal error. Your wallet was not encrypted.")); } QDialog::accept(); // Success } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("The supplied passphrases do not match.")); } } else { QDialog::reject(); // Cancelled } } break; case Unlock: if(!model->setWalletLocked(false, oldpass)) { QMessageBox::critical(this, tr("Wallet unlock failed"), tr("The passphrase entered for the wallet decryption was incorrect.")); } else { QDialog::accept(); // Success } break; case Decrypt: if(!model->setWalletEncrypted(false, oldpass)) { QMessageBox::critical(this, tr("Wallet decryption failed"), tr("The passphrase entered for the wallet decryption was incorrect.")); } else { QDialog::accept(); // Success } break; case ChangePass: if(newpass1 == newpass2) { if(model->changePassphrase(oldpass, newpass1)) { QMessageBox::information(this, tr("Wallet encrypted"), tr("Wallet passphrase was successfully changed.")); QDialog::accept(); // Success } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("The passphrase entered for the wallet decryption was incorrect.")); } } else { QMessageBox::critical(this, tr("Wallet encryption failed"), tr("The supplied passphrases do not match.")); } break; } } void AskPassphraseDialog::textChanged() { // Validate input, set Ok button to enabled when acceptable bool acceptable = false; switch(mode) { case Encrypt: // New passphrase x2 acceptable = !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); break; case Unlock: // Old passphrase x1 case Decrypt: acceptable = !ui->passEdit1->text().isEmpty(); break; case ChangePass: // Old passphrase x1, new passphrase x2 acceptable = !ui->passEdit1->text().isEmpty() && !ui->passEdit2->text().isEmpty() && !ui->passEdit3->text().isEmpty(); break; } ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(acceptable); } bool AskPassphraseDialog::event(QEvent *event) { // Detect Caps Lock key press. if (event->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(event); if (ke->key() == Qt::Key_CapsLock) { fCapsLock = !fCapsLock; } if (fCapsLock) { ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else { ui->capsLabel->clear(); } } return QWidget::event(event); } bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event) { /* Detect Caps Lock. * There is no good OS-independent way to check a key state in Qt, but we * can detect Caps Lock by checking for the following condition: * Shift key is down and the result is a lower case character, or * Shift key is not down and the result is an upper case character. */ if (event->type() == QEvent::KeyPress) { QKeyEvent *ke = static_cast<QKeyEvent *>(event); QString str = ke->text(); if (str.length() != 0) { const QChar *psz = str.unicode(); bool fShift = (ke->modifiers() & Qt::ShiftModifier) != 0; if ((fShift && *psz >= 'a' && *psz <= 'z') || (!fShift && *psz >= 'A' && *psz <= 'Z')) { fCapsLock = true; ui->capsLabel->setText(tr("Warning: The Caps Lock key is on!")); } else if (psz->isLetter()) { fCapsLock = false; ui->capsLabel->clear(); } } } return QDialog::eventFilter(object, event); }
[ "clonecoin@gmail.com" ]
clonecoin@gmail.com
11ea09423efc94c53cd7b422cf8fc91af97dc002
f91678daff65c630378f2d7e4f599d5c877407ab
/comm/src/CommManager.cpp
f0e382da62ac2faf6ae5fd1684894631dad9b916
[]
no_license
vachiwome/google_file_system
370e685c95371ed12cdf4e9e922193730313c570
a52a07a8103819084e40e661064cfa5b5340990b
refs/heads/master
2021-01-20T06:59:31.334165
2014-07-23T18:16:13
2014-07-23T18:16:13
22,117,619
3
0
null
null
null
null
UTF-8
C++
false
false
1,260
cpp
#include <iostream> #include "../include/CommManager.h" void CommManager::serializeMessage(Message* message, string filename) { std::ofstream ofs(filename); boost::archive::text_oarchive oa(ofs); oa << (*message); return filename; } void CommManager::sendMessage(Message* message) { string filename = "CommManager#sendMessage#" + sockManager.getFd(); serializeMessage(message, filename); struct stat filestatus; stat(filename.c_str(), &filestatus); char* object = FileManager::readFile(filename, 0, filestatus.st_size); sockManager.sendData(object, filestatus.st_size); } Message* CommManager::receiveMessage() { char* buffer = new char[MAX_MSG_SIZE]; int size = sockManager.receiveData(buffer); string filename = "CommManager#receiveMessage#" + sockManager.getFd(); FileManager::writeFile(filename, buffer, 0, size); std::ifstream ifs(filename); boost::archive::text_iarchive ia(ifs); Message msg; ia >> msg; Message* msgPtr = (Message*) malloc(sizeof(Message)); msgPtr->type = msg.type; msgPtr->size = msg.size; msgPtr->source = msg.source; msgPtr->target = msg.target; msgPtr->data = msg.data; msgPtr->filename = msg.filename; msgPtr->chunkInfo = msg.chunkInfo; return msgPtr; } #endif
[ "v.chiwome@jacobs-university.de" ]
v.chiwome@jacobs-university.de
2f4ca61bea67d01482c877fd3646959635606680
6965de8e658be45a156b0b45f2f7d06121bc3f0c
/introductory/8quuen.cpp
4ed641781940a2131df861a3744bc1c1063168ae
[]
no_license
ayushsharma-crypto/CSES
766dc9c0c3c9c321602d40406a4a3bbd61729493
5a79ff092bdfdd8f244286cd9ec72f16c042d31c
refs/heads/main
2023-05-30T17:44:58.305579
2021-06-26T11:33:40
2021-06-26T11:33:40
375,901,388
0
0
null
null
null
null
UTF-8
C++
false
false
1,109
cpp
#include <iostream> #include <cmath> #include <vector> using namespace std; int arr[8][8]={0},fs[8][8]={0},bs[8][8]={0}; int row_lookup[8]={0},fs_lookup[15]={0},bs_lookup[15]={0}; int count_ways(int column) { if(column>7) return 1; int way=0; for(int i=0;i<8;i++) { if (arr[i][column]==-1) continue; int r=row_lookup[i]; int b=bs_lookup[bs[i][column]]; int f=fs_lookup[fs[i][column]]; if(r || b || f) continue; row_lookup[i] = 1; bs_lookup[bs[i][column]] = 1; fs_lookup[fs[i][column]] = 1; way+=count_ways(column+1); row_lookup[i] = 0; bs_lookup[bs[i][column]] = 0; fs_lookup[fs[i][column]] = 0; } return way; } int main() { for(int i=0;i<8;i++) { for(int j=0;j<8;j++) { // filling `arr` char x; cin >> x; if(x=='*') arr[i][j]=-1; // filling `bs` bs[i][j]=i+j; // filling `fs` fs[i][j]=i-j+7; } } cout << count_ways(0) << endl; return 0; }
[ "5460563-ayushsharma-crypto@users.noreply.gitlab.com" ]
5460563-ayushsharma-crypto@users.noreply.gitlab.com
cc941bed1d7fd1e8d9d7eae6898a1922ebdad0ef
b68356e92c7971ccfefb2cb3a6a0de61b2b7b5fe
/src/Chapter_4_Trees_and_Graphs/CheckSubtree.cpp
e17b270cfc778a8b1baa39e819a0b9b66aef0cf6
[ "MIT" ]
permissive
Daria2002/ctci
78e62c1c01a4fcfc634f9a73435b29f2515b5876
bc606f57546509ad6685e7e476c9fd643c5fc700
refs/heads/master
2021-05-20T21:14:04.997576
2021-03-25T15:35:05
2021-03-25T15:35:05
252,418,827
2
0
null
null
null
null
UTF-8
C++
false
false
3,656
cpp
#include <iostream> #include <memory> class Node { public: Node() {} Node(int val) : value(val) {} Node(int val, int l, int r) : value(val), left(std::make_shared<Node>(l)), right(std::make_shared<Node>(r)) {} std::shared_ptr<Node> left; std::shared_ptr<Node> right; int value; }; using NodePtr = std::shared_ptr<Node>; void create_bigger_tree(NodePtr& root) { root = std::make_shared<Node>(20, 25, 14); root -> left -> left = std::make_shared<Node>(17, 30, 70); root -> left -> right = std::make_shared<Node>(12, 40, 90); root -> right -> left = std::make_shared<Node>(11, 50, 80); root -> right -> right = std::make_shared<Node>(2, 60, 55); } void create_smaller_nonsubtree(NodePtr& root) { root = std::make_shared<Node>(11, 43, 3); root -> left -> left = std::make_shared<Node>(1); root -> left -> right = std::make_shared<Node>(2); root -> right -> left = std::make_shared<Node>(4); root -> right -> right = std::make_shared<Node>(5); } void create_smaller_subtree(NodePtr& root) { root = std::make_shared<Node>(17, 30, 70); root = std::make_shared<Node>(12, 40, 90); } bool is_subtree(const NodePtr& root1, const NodePtr& root2) { // return true if both trees empty or if subtree empty because empty tree is subtree of any tree if(root1 == nullptr && root2 == nullptr || root1 != nullptr && root2 == nullptr) { return true; } // if subtree is not empty and tree is empty return false if(root1 == nullptr) { return false; } // check left and right of the tree if current node in the tree is not same as the subtree root if(root1 -> value != root2 -> value) { return is_subtree(root1 -> left, root2) || is_subtree(root1 -> right, root2); } // root1 = root2 return is_subtree(root1 -> left, root2 -> left) && is_subtree(root1 -> right, root2 -> right); } void create_preorder_traversal(const NodePtr& node, std::string& str) { if(node == nullptr) { str.push_back('X'); return; } str.push_back(node -> value); str.push_back(' '); create_preorder_traversal(node -> left, str); create_preorder_traversal(node -> right, str); } bool is_subtree_preorder_traversal(const NodePtr& root1, const NodePtr& root2) { std::string preorder_traversal1, preorder_traversal2; create_preorder_traversal(root1, preorder_traversal1); create_preorder_traversal(root2, preorder_traversal2); return preorder_traversal1.find(preorder_traversal2) != std::string::npos; } /** * T1 and T2 are two very large binary trees, with T1 much bigger than T2. Create an * algorithm to determine if T2 is a subtree of T1. A tree T2 is a subtree if T1 if * there exists a node n in T1 such that the subtree of n is identical to T2. That is, * if you cut off the tree at node n, the two trees would be identical. */ int main() { NodePtr t1; NodePtr t2; create_bigger_tree(t1); // create_smaller_nonsubtree(t2); create_smaller_subtree(t2); std::cout << "Enter 1 to check if T2 is a subtree of T1 using recursive function or 2 to check " "if T2 is a subtree of T1 using a preorder traversal.\n"; int method; bool result; std::cin >> method; switch (method) { case 1: result = is_subtree(t1, t2); break; case 2: result = is_subtree_preorder_traversal(t1, t2); break; default: std::cout << "None of the proposed methods have not been choosen.\n"; return 0; } std::cout << "T2 is " << (result ? "" : "not ") << "a subtree of T1.\n"; }
[ "noreply@github.com" ]
noreply@github.com
eac6ba23d49bbf9a534432dd65e7f75e64bae3ef
127c53f4e7e220f44dc82d910a5eed9ae8974997
/Client/Game/Camera/Camera_CharSel.cpp
b37849e58501be6f102faf032f15d5c66842eab8
[]
no_license
zhangf911/wxsj2
253e16265224b85cc6800176a435deaa219ffc48
c8e5f538c7beeaa945ed2a9b5a9b04edeb12c3bd
refs/heads/master
2020-06-11T16:44:14.179685
2013-03-03T08:47:18
2013-03-03T08:47:18
null
0
0
null
null
null
null
WINDOWS-1252
C++
false
false
672
cpp
#include "StdAfx.h" #include "../Engine/EngineInterface.h" #include "Camera_CharSel.h" #include "GIMath.h" #include <OgreCamera.h> #include <OgreRoot.h> #include "GIUtil.h" #include "GIException.h" CCamera_CharSel::CCamera_CharSel(Ogre::Camera* pOgreCamera) : CCamera(pOgreCamera) { m_fvLookatPos = fVector3(0.0f, 80.0f, 0.0f); m_fvGameLookatPos = fVector3(0.0f, 80.0f, 0.0f); m_fPitch = 0.0f; m_fDistance = 250.0f; m_fDirection = KLU_PI; Update(); } CCamera_CharSel::~CCamera_CharSel() { } VOID CCamera_CharSel::Update(VOID) { CCamera::Update(); //ÉèÖÃOGREÏñ»ú m_pOgreCamera->setFarClipDistance(100000.0f); }
[ "amwfhv@163.com" ]
amwfhv@163.com
b1c36e8497b4194bf8965a714c92a91dbb3eeef3
b25e95c16da0ff39b3dea6774a777e1fc4ac334a
/src/qt/qvalidatedlineedit.cpp
f883efa9225f2ce10031cf6749393b3cd81fdff5
[ "MIT" ]
permissive
bitcoinphantom/bitcoinphantom
36b6a926b765d3b14dd7a1c79b8abad6600b62a4
9cebfa9ed4d72aa1fa89f4d21631a9043f19369f
refs/heads/master
2022-06-25T20:16:36.688562
2019-12-01T15:23:37
2019-12-01T15:23:37
225,180,101
0
0
MIT
2022-06-06T19:21:51
2019-12-01T15:04:08
C
UTF-8
C++
false
false
2,603
cpp
// Copyright (c) 2009-2017 The Bitcoin Core developers // Copyright (c) 2018-2018 The bitcoinphantom Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <qt/qvalidatedlineedit.h> #include <qt/bitcoinphantomaddressvalidator.h> #include <qt/guiconstants.h> QValidatedLineEdit::QValidatedLineEdit(QWidget *parent) : QLineEdit(parent), valid(true), checkValidator(0) { connect(this, SIGNAL(textChanged(QString)), this, SLOT(markValid())); } void QValidatedLineEdit::setValid(bool _valid) { if(_valid == this->valid) { return; } if(_valid) { setStyleSheet(""); } else { setStyleSheet(STYLE_INVALID); } this->valid = _valid; } void QValidatedLineEdit::focusInEvent(QFocusEvent *evt) { // Clear invalid flag on focus setValid(true); QLineEdit::focusInEvent(evt); } void QValidatedLineEdit::focusOutEvent(QFocusEvent *evt) { checkValidity(); QLineEdit::focusOutEvent(evt); } void QValidatedLineEdit::markValid() { // As long as a user is typing ensure we display state as valid setValid(true); } void QValidatedLineEdit::clear() { setValid(true); QLineEdit::clear(); } void QValidatedLineEdit::setEnabled(bool enabled) { if (!enabled) { // A disabled QValidatedLineEdit should be marked valid setValid(true); } else { // Recheck validity when QValidatedLineEdit gets enabled checkValidity(); } QLineEdit::setEnabled(enabled); } void QValidatedLineEdit::checkValidity() { if (text().isEmpty()) { setValid(true); } else if (hasAcceptableInput()) { setValid(true); // Check contents on focus out if (checkValidator) { QString address = text(); int pos = 0; if (checkValidator->validate(address, pos) == QValidator::Acceptable) setValid(true); else setValid(false); } } else setValid(false); Q_EMIT validationDidChange(this); } void QValidatedLineEdit::setCheckValidator(const QValidator *v) { checkValidator = v; } bool QValidatedLineEdit::isValid() { // use checkValidator in case the QValidatedLineEdit is disabled if (checkValidator) { QString address = text(); int pos = 0; if (checkValidator->validate(address, pos) == QValidator::Acceptable) return true; } return valid; }
[ "edbtcx@protonmail.com" ]
edbtcx@protonmail.com
4d52faa60ed5665a3eb33c29e6c0940b770b7ce6
6436387c034ab6f5c558c13ec3ca2efbbe5769cd
/Lectures/Lecture_08/sln/ProfilerExample/ILRewriter.cpp
71b354e29844f7402d61f27337d4fda14c21ce8c
[ "MIT" ]
permissive
Dacko98/5
c759c507e7cbc1c1db30c1cf088d8046df11c237
f46e4155231a8059c91abd10b87df44556030184
refs/heads/main
2023-07-06T09:53:05.285914
2021-07-10T16:39:21
2021-07-10T16:39:21
null
0
0
null
null
null
null
UTF-8
C++
false
false
26,581
cpp
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. #include "cor.h" #include "corprof.h" #include "ILRewriter.h" #include <corhlpr.cpp> #include <cassert> #include <stdexcept> #undef IfFailRet #define IfFailRet(EXPR) do { HRESULT hr = (EXPR); if(FAILED(hr)) { return (hr); } } while (0) #undef IfNullRet #define IfNullRet(EXPR) do { if ((EXPR) == NULL) return E_OUTOFMEMORY; } while (0) struct ILInstr { ILInstr * m_pNext; ILInstr * m_pPrev; unsigned m_opcode; unsigned m_offset; union { ILInstr * m_pTarget; INT8 m_Arg8; INT16 m_Arg16; INT32 m_Arg32; INT64 m_Arg64; }; }; struct EHClause { CorExceptionFlag m_Flags; ILInstr * m_pTryBegin; ILInstr * m_pTryEnd; ILInstr * m_pHandlerBegin; // First instruction inside the handler ILInstr * m_pHandlerEnd; // Last instruction inside the handler union { DWORD m_ClassToken; // use for type-based exception handlers ILInstr * m_pFilter; // use for filter-based exception handlers (COR_ILEXCEPTION_CLAUSE_FILTER is set) }; }; typedef enum { #define OPDEF(c,s,pop,push,args,type,l,s1,s2,ctrl) c, #include "opcode.def" #undef OPDEF CEE_COUNT, CEE_SWITCH_ARG, // special internal instructions } OPCODE; #define OPCODEFLAGS_SizeMask 0x0F #define OPCODEFLAGS_BranchTarget 0x10 #define OPCODEFLAGS_Switch 0x20 static const BYTE s_OpCodeFlags[] = { #define InlineNone 0 #define ShortInlineVar 1 #define InlineVar 2 #define ShortInlineI 1 #define InlineI 4 #define InlineI8 8 #define ShortInlineR 4 #define InlineR 8 #define ShortInlineBrTarget 1 | OPCODEFLAGS_BranchTarget #define InlineBrTarget 4 | OPCODEFLAGS_BranchTarget #define InlineMethod 4 #define InlineField 4 #define InlineType 4 #define InlineString 4 #define InlineSig 4 #define InlineRVA 4 #define InlineTok 4 #define InlineSwitch 0 | OPCODEFLAGS_Switch #define OPDEF(c,s,pop,push,args,type,l,s1,s2,flow) args, #include "opcode.def" #undef OPDEF #undef InlineNone #undef ShortInlineVar #undef InlineVar #undef ShortInlineI #undef InlineI #undef InlineI8 #undef ShortInlineR #undef InlineR #undef ShortInlineBrTarget #undef InlineBrTarget #undef InlineMethod #undef InlineField #undef InlineType #undef InlineString #undef InlineSig #undef InlineRVA #undef InlineTok #undef InlineSwitch 0, // CEE_COUNT 4 | OPCODEFLAGS_BranchTarget, // CEE_SWITCH_ARG }; static int k_rgnStackPushes[] = { #define OPDEF(c,s,pop,push,args,type,l,s1,s2,ctrl) \ push , #define Push0 0 #define Push1 1 #define PushI 1 #define PushI4 1 #define PushR4 1 #define PushI8 1 #define PushR8 1 #define PushRef 1 #define VarPush 1 // Test code doesn't call vararg fcns, so this should not be used #include "opcode.def" #undef Push0 #undef Push1 #undef PushI #undef PushI4 #undef PushR4 #undef PushI8 #undef PushR8 #undef PushRef #undef VarPush #undef OPDEF }; class ILRewriter { private: ICorProfilerInfo * m_pICorProfilerInfo; ICorProfilerFunctionControl * m_pICorProfilerFunctionControl; ModuleID m_moduleId; mdToken m_tkMethod; mdToken m_tkLocalVarSig; unsigned m_maxStack; unsigned m_flags; bool m_fGenerateTinyHeader; ILInstr m_IL; // Double linked list of all il instructions unsigned m_nEH; EHClause * m_pEH; // Helper table for importing. Sparse array that maps BYTE offset of beginning of an // instruction to that instruction's ILInstr*. BYTE offsets that don't correspond // to the beginning of an instruction are mapped to NULL. ILInstr ** m_pOffsetToInstr; unsigned m_CodeSize; unsigned m_nInstrs; BYTE * m_pOutputBuffer; IMethodMalloc * m_pIMethodMalloc; public: ILRewriter(ICorProfilerInfo * pICorProfilerInfo, ICorProfilerFunctionControl * pICorProfilerFunctionControl, ModuleID moduleID, mdToken tkMethod) : m_pICorProfilerInfo(pICorProfilerInfo), m_pICorProfilerFunctionControl(pICorProfilerFunctionControl), m_moduleId(moduleID), m_tkMethod(tkMethod), m_fGenerateTinyHeader(false), m_pEH(nullptr), m_pOffsetToInstr(nullptr), m_pOutputBuffer(nullptr), m_pIMethodMalloc(nullptr) { m_IL.m_pNext = &m_IL; m_IL.m_pPrev = &m_IL; m_nInstrs = 0; } ~ILRewriter() { ILInstr * p = m_IL.m_pNext; while (p != &m_IL) { ILInstr * t = p->m_pNext; delete p; p = t; } delete[] m_pEH; delete[] m_pOffsetToInstr; delete[] m_pOutputBuffer; if (m_pIMethodMalloc) m_pIMethodMalloc->Release(); } ///////////////////////////////////////////////////////////////////////////////////////////////// // // I M P O R T // //////////////////////////////////////////////////////////////////////////////////////////////// HRESULT Import() { LPCBYTE pMethodBytes; IfFailRet(m_pICorProfilerInfo->GetILFunctionBody( m_moduleId, m_tkMethod, &pMethodBytes, NULL)); COR_ILMETHOD_DECODER decoder((COR_ILMETHOD*)pMethodBytes); // Import the header flags m_tkLocalVarSig = decoder.GetLocalVarSigTok(); m_maxStack = decoder.GetMaxStack(); m_flags = (decoder.GetFlags() & CorILMethod_InitLocals); m_CodeSize = decoder.GetCodeSize(); IfFailRet(ImportIL(decoder.Code)); IfFailRet(ImportEH(decoder.EH, decoder.EHCount())); return S_OK; } HRESULT ImportIL(LPCBYTE pIL) { m_pOffsetToInstr = new ILInstr*[m_CodeSize + 1]; IfNullRet(m_pOffsetToInstr); ZeroMemory(m_pOffsetToInstr, m_CodeSize * sizeof(ILInstr*)); // Set the sentinel instruction m_pOffsetToInstr[m_CodeSize] = &m_IL; m_IL.m_opcode = -1; bool fBranch = false; unsigned offset = 0; while (offset < m_CodeSize) { unsigned startOffset = offset; unsigned opcode = pIL[offset++]; if (opcode == CEE_PREFIX1) { if (offset >= m_CodeSize) { assert(false); return COR_E_INVALIDPROGRAM; } opcode = 0x100 + pIL[offset++]; } if ((CEE_PREFIX7 <= opcode) && (opcode <= CEE_PREFIX2)) { // NOTE: CEE_PREFIX2-7 are currently not supported assert(false); return COR_E_INVALIDPROGRAM; } if (opcode >= CEE_COUNT) { assert(false); return COR_E_INVALIDPROGRAM; } BYTE flags = s_OpCodeFlags[opcode]; int size = (flags & OPCODEFLAGS_SizeMask); if (offset + size > m_CodeSize) { assert(false); return COR_E_INVALIDPROGRAM; } ILInstr * pInstr = NewILInstr(); IfNullRet(pInstr); pInstr->m_opcode = opcode; InsertBefore(&m_IL, pInstr); m_pOffsetToInstr[startOffset] = pInstr; switch (flags) { case 0: break; case 1: pInstr->m_Arg8 = *(UNALIGNED INT8 *)&(pIL[offset]); break; case 2: pInstr->m_Arg16 = *(UNALIGNED INT16 *)&(pIL[offset]); break; case 4: pInstr->m_Arg32 = *(UNALIGNED INT32 *)&(pIL[offset]); break; case 8: pInstr->m_Arg64 = *(UNALIGNED INT64 *)&(pIL[offset]); break; case 1 | OPCODEFLAGS_BranchTarget: pInstr->m_Arg32 = offset + 1 + *(UNALIGNED INT8 *)&(pIL[offset]); fBranch = true; break; case 4 | OPCODEFLAGS_BranchTarget: pInstr->m_Arg32 = offset + 4 + *(UNALIGNED INT32 *)&(pIL[offset]); fBranch = true; break; case 0 | OPCODEFLAGS_Switch: { if (offset + sizeof(INT32) > m_CodeSize) { assert(false); return COR_E_INVALIDPROGRAM; } unsigned nTargets = *(UNALIGNED INT32 *)&(pIL[offset]); pInstr->m_Arg32 = nTargets; offset += sizeof(INT32); unsigned base = offset + nTargets * sizeof(INT32); for (unsigned iTarget = 0; iTarget < nTargets; iTarget++) { if (offset + sizeof(INT32) > m_CodeSize) { assert(false); return COR_E_INVALIDPROGRAM; } pInstr = NewILInstr(); IfNullRet(pInstr); pInstr->m_opcode = CEE_SWITCH_ARG; pInstr->m_Arg32 = base + *(UNALIGNED INT32 *)&(pIL[offset]); offset += sizeof(INT32); InsertBefore(&m_IL, pInstr); } fBranch = true; break; } default: assert(false); break; } offset += size; } assert(offset == m_CodeSize); if (fBranch) { // Go over all control flow instructions and resolve the targets for (ILInstr * pInstr = m_IL.m_pNext; pInstr != &m_IL; pInstr = pInstr->m_pNext) { if (s_OpCodeFlags[pInstr->m_opcode] & OPCODEFLAGS_BranchTarget) pInstr->m_pTarget = GetInstrFromOffset(pInstr->m_Arg32); } } return S_OK; } HRESULT ImportEH(const COR_ILMETHOD_SECT_EH* pILEH, unsigned nEH) { assert(m_pEH == NULL); m_nEH = nEH; if (nEH == 0) return S_OK; IfNullRet(m_pEH = new EHClause[m_nEH]); for (unsigned iEH = 0; iEH < m_nEH; iEH++) { // If the EH clause is in tiny form, the call to pILEH->EHClause() below will // use this as a scratch buffer to expand the EH clause into its fat form. COR_ILMETHOD_SECT_EH_CLAUSE_FAT scratch; const COR_ILMETHOD_SECT_EH_CLAUSE_FAT* ehInfo; ehInfo = (COR_ILMETHOD_SECT_EH_CLAUSE_FAT*)pILEH->EHClause(iEH, &scratch); EHClause* clause = &(m_pEH[iEH]); clause->m_Flags = ehInfo->GetFlags(); clause->m_pTryBegin = GetInstrFromOffset(ehInfo->GetTryOffset()); clause->m_pTryEnd = GetInstrFromOffset(ehInfo->GetTryOffset() + ehInfo->GetTryLength()); clause->m_pHandlerBegin = GetInstrFromOffset(ehInfo->GetHandlerOffset()); clause->m_pHandlerEnd = GetInstrFromOffset(ehInfo->GetHandlerOffset() + ehInfo->GetHandlerLength())->m_pPrev; if ((clause->m_Flags & COR_ILEXCEPTION_CLAUSE_FILTER) == 0) clause->m_ClassToken = ehInfo->GetClassToken(); else clause->m_pFilter = GetInstrFromOffset(ehInfo->GetFilterOffset()); } return S_OK; } ILInstr* NewILInstr() { m_nInstrs++; return new ILInstr(); } ILInstr* GetInstrFromOffset(unsigned offset) { ILInstr * pInstr = NULL; if (offset <= m_CodeSize) pInstr = m_pOffsetToInstr[offset]; assert(pInstr != NULL); return pInstr; } void InsertBefore(ILInstr * pWhere, ILInstr * pWhat) { pWhat->m_pNext = pWhere; pWhat->m_pPrev = pWhere->m_pPrev; pWhat->m_pNext->m_pPrev = pWhat; pWhat->m_pPrev->m_pNext = pWhat; AdjustState(pWhat); } void InsertAfter(ILInstr * pWhere, ILInstr * pWhat) { pWhat->m_pNext = pWhere->m_pNext; pWhat->m_pPrev = pWhere; pWhat->m_pNext->m_pPrev = pWhat; pWhat->m_pPrev->m_pNext = pWhat; AdjustState(pWhat); } void AdjustState(ILInstr * pNewInstr) { m_maxStack += k_rgnStackPushes[pNewInstr->m_opcode]; } ILInstr * GetILList() { return &m_IL; } ///////////////////////////////////////////////////////////////////////////////////////////////// // // E X P O R T // //////////////////////////////////////////////////////////////////////////////////////////////// HRESULT Export() { // One instruction produces 2 + sizeof(native int) bytes in the worst case which can be 10 bytes for 64-bit. // For simplification we just use 10 here. unsigned maxSize = m_nInstrs * 10; m_pOutputBuffer = new BYTE[maxSize]; IfNullRet(m_pOutputBuffer); again: BYTE * pIL = m_pOutputBuffer; bool fBranch = false; unsigned offset = 0; // Go over all instructions and produce code for them for (ILInstr * pInstr = m_IL.m_pNext; pInstr != &m_IL; pInstr = pInstr->m_pNext) { assert(offset < maxSize); pInstr->m_offset = offset; unsigned opcode = pInstr->m_opcode; if (opcode < CEE_COUNT) { // CEE_PREFIX1 refers not to instruction prefixes (like tail.), but to // the lead byte of multi-byte opcodes. For now, the only lead byte // supported is CEE_PREFIX1 = 0xFE. if (opcode >= 0x100) m_pOutputBuffer[offset++] = CEE_PREFIX1; // This appears to depend on an implicit conversion from // unsigned opcode down to BYTE, to deliberately lose data and have // opcode >= 0x100 wrap around to 0. m_pOutputBuffer[offset++] = (opcode & 0xFF); } assert(pInstr->m_opcode < _countof(s_OpCodeFlags)); BYTE flags = s_OpCodeFlags[pInstr->m_opcode]; switch (flags) { case 0: break; case 1: *(UNALIGNED INT8 *)&(pIL[offset]) = pInstr->m_Arg8; break; case 2: *(UNALIGNED INT16 *)&(pIL[offset]) = pInstr->m_Arg16; break; case 4: *(UNALIGNED INT32 *)&(pIL[offset]) = pInstr->m_Arg32; break; case 8: *(UNALIGNED INT64 *)&(pIL[offset]) = pInstr->m_Arg64; break; case 1 | OPCODEFLAGS_BranchTarget: fBranch = true; break; case 4 | OPCODEFLAGS_BranchTarget: fBranch = true; break; case 0 | OPCODEFLAGS_Switch: *(UNALIGNED INT32 *)&(pIL[offset]) = pInstr->m_Arg32; offset += sizeof(INT32); break; default: assert(false); break; } offset += (flags & OPCODEFLAGS_SizeMask); } m_IL.m_offset = offset; if (fBranch) { bool fTryAgain = false; unsigned switchBase = 0; // Go over all control flow instructions and resolve the targets for (ILInstr * pInstr = m_IL.m_pNext; pInstr != &m_IL; pInstr = pInstr->m_pNext) { unsigned opcode = pInstr->m_opcode; if (pInstr->m_opcode == CEE_SWITCH) { switchBase = pInstr->m_offset + 1 + sizeof(INT32) * (pInstr->m_Arg32 + 1); continue; } if (opcode == CEE_SWITCH_ARG) { // Switch args are special *(UNALIGNED INT32 *)&(pIL[pInstr->m_offset]) = pInstr->m_pTarget->m_offset - switchBase; continue; } BYTE flags = s_OpCodeFlags[pInstr->m_opcode]; if (flags & OPCODEFLAGS_BranchTarget) { int delta = pInstr->m_pTarget->m_offset - pInstr->m_pNext->m_offset; switch (flags) { case 1 | OPCODEFLAGS_BranchTarget: // Check if delta is too big to fit into an INT8. // // (see #pragma at top of file) if ((INT8)delta != delta) { if (opcode == CEE_LEAVE_S) { pInstr->m_opcode = CEE_LEAVE; } else { assert(opcode >= CEE_BR_S && opcode <= CEE_BLT_UN_S); pInstr->m_opcode = opcode - CEE_BR_S + CEE_BR; assert(pInstr->m_opcode >= CEE_BR && pInstr->m_opcode <= CEE_BLT_UN); } fTryAgain = true; continue; } *(UNALIGNED INT8 *)&(pIL[pInstr->m_pNext->m_offset - sizeof(INT8)]) = delta; break; case 4 | OPCODEFLAGS_BranchTarget: *(UNALIGNED INT32 *)&(pIL[pInstr->m_pNext->m_offset - sizeof(INT32)]) = delta; break; default: assert(false); break; } } } // Do the whole thing again if we changed the size of some branch targets if (fTryAgain) goto again; } unsigned codeSize = offset; unsigned totalSize; LPBYTE pBody = NULL; if (m_fGenerateTinyHeader) { // Make sure we can fit in a tiny header if (codeSize >= 64) return E_FAIL; totalSize = sizeof(IMAGE_COR_ILMETHOD_TINY) + codeSize; pBody = AllocateILMemory(totalSize); IfNullRet(pBody); BYTE * pCurrent = pBody; // Here's the tiny header *pCurrent = (BYTE)(CorILMethod_TinyFormat | (codeSize << 2)); pCurrent += sizeof(IMAGE_COR_ILMETHOD_TINY); // And the body CopyMemory(pCurrent, m_pOutputBuffer, codeSize); } else { // Use FAT header unsigned alignedCodeSize = (offset + 3) & ~3; totalSize = sizeof(IMAGE_COR_ILMETHOD_FAT) + alignedCodeSize + (m_nEH ? (sizeof(IMAGE_COR_ILMETHOD_SECT_FAT) + sizeof(IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT) * m_nEH) : 0); pBody = AllocateILMemory(totalSize); IfNullRet(pBody); BYTE * pCurrent = pBody; IMAGE_COR_ILMETHOD_FAT *pHeader = (IMAGE_COR_ILMETHOD_FAT *)pCurrent; pHeader->Flags = m_flags | (m_nEH ? CorILMethod_MoreSects : 0) | CorILMethod_FatFormat; pHeader->Size = sizeof(IMAGE_COR_ILMETHOD_FAT) / sizeof(DWORD); pHeader->MaxStack = m_maxStack; pHeader->CodeSize = offset; pHeader->LocalVarSigTok = m_tkLocalVarSig; pCurrent = (BYTE*)(pHeader + 1); CopyMemory(pCurrent, m_pOutputBuffer, codeSize); pCurrent += alignedCodeSize; if (m_nEH != 0) { IMAGE_COR_ILMETHOD_SECT_FAT *pEH = (IMAGE_COR_ILMETHOD_SECT_FAT *)pCurrent; pEH->Kind = CorILMethod_Sect_EHTable | CorILMethod_Sect_FatFormat; pEH->DataSize = (unsigned)(sizeof(IMAGE_COR_ILMETHOD_SECT_FAT) + sizeof(IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT) * m_nEH); pCurrent = (BYTE*)(pEH + 1); for (unsigned iEH = 0; iEH < m_nEH; iEH++) { EHClause *pSrc = &(m_pEH[iEH]); IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT * pDst = (IMAGE_COR_ILMETHOD_SECT_EH_CLAUSE_FAT *)pCurrent; pDst->Flags = pSrc->m_Flags; pDst->TryOffset = pSrc->m_pTryBegin->m_offset; pDst->TryLength = pSrc->m_pTryEnd->m_offset - pSrc->m_pTryBegin->m_offset; pDst->HandlerOffset = pSrc->m_pHandlerBegin->m_offset; pDst->HandlerLength = pSrc->m_pHandlerEnd->m_pNext->m_offset - pSrc->m_pHandlerBegin->m_offset; if ((pSrc->m_Flags & COR_ILEXCEPTION_CLAUSE_FILTER) == 0) pDst->ClassToken = pSrc->m_ClassToken; else pDst->FilterOffset = pSrc->m_pFilter->m_offset; pCurrent = (BYTE*)(pDst + 1); } } } IfFailRet(SetILFunctionBody(totalSize, pBody)); DeallocateILMemory(pBody); return S_OK; } HRESULT SetILFunctionBody(unsigned size, LPBYTE pBody) { if (m_pICorProfilerFunctionControl != NULL) { // We're supplying IL for a rejit, so use the rejit mechanism IfFailRet(m_pICorProfilerFunctionControl->SetILFunctionBody(size, pBody)); } else { // "classic-style" instrumentation on first JIT, so use old mechanism IfFailRet(m_pICorProfilerInfo->SetILFunctionBody(m_moduleId, m_tkMethod, pBody)); } return S_OK; } LPBYTE AllocateILMemory(unsigned size) { if (m_pICorProfilerFunctionControl != NULL) { // We're supplying IL for a rejit, so we can just allocate from // the heap return new BYTE[size]; } // Else, this is "classic-style" instrumentation on first JIT, and // need to use the CLR's IL allocator if (FAILED(m_pICorProfilerInfo->GetILFunctionBodyAllocator(m_moduleId, &m_pIMethodMalloc))) return NULL; return (LPBYTE)m_pIMethodMalloc->Alloc(size); } void DeallocateILMemory(LPBYTE pBody) { if (m_pICorProfilerFunctionControl == NULL) { // Old-style instrumentation does not provide a way to free up bytes return; } delete[] pBody; } }; HRESULT AddProbe( ILRewriter * pilr, FunctionID functionId, UINT_PTR methodAddress, ULONG32 methodSignature, ILInstr * pInsertProbeBeforeThisInstr) { ILInstr * pNewInstr = nullptr; constexpr auto CEE_LDC_I = sizeof(size_t) == 8 ? CEE_LDC_I8 : sizeof(size_t) == 4 ? CEE_LDC_I4 : throw std::logic_error("size_t must be defined as 8 or 4"); pNewInstr = pilr->NewILInstr(); pNewInstr->m_opcode = CEE_LDC_I; pNewInstr->m_Arg64 = functionId; pilr->InsertBefore(pInsertProbeBeforeThisInstr, pNewInstr); pNewInstr = pilr->NewILInstr(); pNewInstr->m_opcode = CEE_LDC_I; pNewInstr->m_Arg64 = methodAddress; pilr->InsertBefore(pInsertProbeBeforeThisInstr, pNewInstr); pNewInstr = pilr->NewILInstr(); pNewInstr->m_opcode = CEE_CALLI; pNewInstr->m_Arg32 = methodSignature; pilr->InsertBefore(pInsertProbeBeforeThisInstr, pNewInstr); return S_OK; } HRESULT AddEnterProbe( ILRewriter * pilr, FunctionID functionId, UINT_PTR methodAddress, ULONG32 methodSignature) { ILInstr * pFirstOriginalInstr = pilr->GetILList()->m_pNext; return AddProbe(pilr, functionId, methodAddress, methodSignature, pFirstOriginalInstr); } HRESULT AddExitProbe( ILRewriter * pilr, FunctionID functionId, UINT_PTR methodAddress, ULONG32 methodSignature) { HRESULT hr; BOOL fAtLeastOneProbeAdded = FALSE; // Find all RETs, and insert a call to the exit probe before each one. for (ILInstr * pInstr = pilr->GetILList()->m_pNext; pInstr != pilr->GetILList(); pInstr = pInstr->m_pNext) { switch (pInstr->m_opcode) { case CEE_RET: { // We want any branches or leaves that targeted the RET instruction to // actually target the epilog instructions we're adding. So turn the "RET" // into ["NOP", "RET"], and THEN add the epilog between the NOP & RET. That // ensures that any branches that went to the RET will now go to the NOP and // then execute our epilog. // NOTE: The NOP is not strictly required, but is a simplification of the implementation. // RET->NOP pInstr->m_opcode = CEE_NOP; // Add the new RET after ILInstr * pNewRet = pilr->NewILInstr(); pNewRet->m_opcode = CEE_RET; pilr->InsertAfter(pInstr, pNewRet); // Add now insert the epilog before the new RET hr = AddProbe(pilr, functionId, methodAddress, methodSignature, pNewRet); if (FAILED(hr)) return hr; fAtLeastOneProbeAdded = TRUE; // Advance pInstr after all this gunk so the for loop continues properly pInstr = pNewRet; break; } default: break; } } if (!fAtLeastOneProbeAdded) return E_FAIL; return S_OK; } // Uses the general-purpose ILRewriter class to import original // IL, rewrite it, and send the result to the CLR HRESULT RewriteIL( ICorProfilerInfo * pICorProfilerInfo, ICorProfilerFunctionControl * pICorProfilerFunctionControl, ModuleID moduleID, mdMethodDef methodDef, FunctionID functionId, UINT_PTR enterMethodAddress, UINT_PTR exitMethodAddress, ULONG32 methodSignature) { ILRewriter rewriter(pICorProfilerInfo, pICorProfilerFunctionControl, moduleID, methodDef); IfFailRet(rewriter.Import()); { // Adds enter/exit probes IfFailRet(AddEnterProbe(&rewriter, functionId, enterMethodAddress, methodSignature)); IfFailRet(AddExitProbe(&rewriter, functionId, exitMethodAddress, methodSignature)); } IfFailRet(rewriter.Export()); return S_OK; }
[ "andrej.cizmarik@riganti.cz" ]
andrej.cizmarik@riganti.cz
0a50dc31cded209a30f7854dad96fb4afb436993
9e50d5aadf591e8726d26e52ab3321c0fe90ff10
/RyanBarbera_lab4/lab4/src/NodeTB.hpp
7aaa88d1e2115ddce62c45f6fc9c8bf1b835bd09
[]
no_license
BarberaRyan/data-structures
65dde06fe2d87154616b90203bb50023964a2194
8aa2dca04f0a9235c7714b2b3c1bb01b581e8bca
refs/heads/master
2020-04-11T13:41:19.571750
2018-12-14T18:29:02
2018-12-14T18:29:02
161,673,044
0
0
null
null
null
null
UTF-8
C++
false
false
653
hpp
/* * NodeTB.hpp * * Created on: Oct 26, 2016 * Author: Lenovo */ #include <iostream> #include <stdlib.h> #include <stdio.h> #include <iostream> #include <fstream> using namespace std; #ifndef NODETB_HPP_ #define NODETB_HPP_ class NodeTB { friend class MyGame; friend class BSTB; string data;//Node stores a string in memory int balanceFactor;//Determines how balanced the given node is int height; NodeTB *next; NodeTB *prev; NodeTB *up;//Points to parent node NodeTB *left; NodeTB*right; public: NodeTB(string x); ~NodeTB(); string getData(); NodeTB * getLeft(); NodeTB * getRight(); }; #endif /* NODETB_HPP_ */
[ "rbarbera@udel.edu" ]
rbarbera@udel.edu
0da0c4c50c0b7d7ab374ceffb7346c3cd2646521
7749ea76f93f93934720d4fe0685fa803f12e495
/chrome/browser/ui/web_applications/web_app_controller_browsertest.cc
9a1021d2489ef5487eeb58e91c652cf2c84a0289
[ "BSD-3-Clause" ]
permissive
ofzo/chromium
1dd7a8250455d8a5a6bf8862102df1574a7e5f7f
3d96eb58fa564e3f21dbaccca476989b65876971
refs/heads/master
2023-04-26T07:15:17.707499
2020-09-17T09:11:54
2020-09-17T09:11:54
null
0
0
null
null
null
null
UTF-8
C++
false
false
6,585
cc
// Copyright 2019 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" #include "chrome/browser/apps/app_service/app_launch_params.h" #include "chrome/browser/apps/app_service/app_service_proxy.h" #include "chrome/browser/apps/app_service/app_service_proxy_factory.h" #include "chrome/browser/apps/app_service/browser_app_launcher.h" #include "chrome/browser/banners/test_app_banner_manager_desktop.h" #include "chrome/browser/predictors/loading_predictor_config.h" #include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h" #include "chrome/browser/web_applications/components/os_integration_manager.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/common/chrome_features.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/web_application_info.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/notification_service.h" #include "net/dns/mock_host_resolver.h" namespace web_app { WebAppControllerBrowserTestBase::WebAppControllerBrowserTestBase() { if (GetParam() == ProviderType::kWebApps) { scoped_feature_list_.InitWithFeatures( {features::kDesktopPWAsWithoutExtensions}, {}); } else { scoped_feature_list_.InitWithFeatures( {}, {features::kDesktopPWAsWithoutExtensions}); } } WebAppControllerBrowserTestBase::~WebAppControllerBrowserTestBase() = default; WebAppProviderBase& WebAppControllerBrowserTestBase::provider() { auto* provider = WebAppProviderBase::GetProviderBase(profile()); DCHECK(provider); return *provider; } AppId WebAppControllerBrowserTestBase::InstallPWA(const GURL& app_url) { auto web_app_info = std::make_unique<WebApplicationInfo>(); web_app_info->app_url = app_url; web_app_info->scope = app_url.GetWithoutFilename(); web_app_info->open_as_window = true; web_app_info->title = base::ASCIIToUTF16("A Web App"); return web_app::InstallWebApp(profile(), std::move(web_app_info)); } AppId WebAppControllerBrowserTestBase::InstallWebApp( std::unique_ptr<WebApplicationInfo> web_app_info) { return web_app::InstallWebApp(profile(), std::move(web_app_info)); } Browser* WebAppControllerBrowserTestBase::LaunchWebAppBrowser( const AppId& app_id) { return web_app::LaunchWebAppBrowser(profile(), app_id); } Browser* WebAppControllerBrowserTestBase::LaunchWebAppBrowserAndWait( const AppId& app_id) { return web_app::LaunchWebAppBrowserAndWait(profile(), app_id); } Browser* WebAppControllerBrowserTestBase::LaunchWebAppBrowserAndAwaitInstallabilityCheck( const AppId& app_id) { Browser* browser = web_app::LaunchWebAppBrowserAndWait(profile(), app_id); banners::TestAppBannerManagerDesktop::FromWebContents( browser->tab_strip_model()->GetActiveWebContents()) ->WaitForInstallableCheck(); return browser; } Browser* WebAppControllerBrowserTestBase::LaunchBrowserForWebAppInTab( const AppId& app_id) { return web_app::LaunchBrowserForWebAppInTab(profile(), app_id); } // static bool WebAppControllerBrowserTestBase::NavigateAndAwaitInstallabilityCheck( Browser* browser, const GURL& url) { auto* manager = banners::TestAppBannerManagerDesktop::FromWebContents( browser->tab_strip_model()->GetActiveWebContents()); NavigateToURLAndWait(browser, url); return manager->WaitForInstallableCheck(); } Browser* WebAppControllerBrowserTestBase::NavigateInNewWindowAndAwaitInstallabilityCheck( const GURL& url) { Browser* new_browser = new Browser(Browser::CreateParams(Browser::TYPE_NORMAL, profile(), true)); AddBlankTabAndShow(new_browser); NavigateAndAwaitInstallabilityCheck(new_browser, url); return new_browser; } base::Optional<AppId> WebAppControllerBrowserTestBase::FindAppWithUrlInScope( const GURL& url) { return provider().registrar().FindAppWithUrlInScope(url); } WebAppControllerBrowserTest::WebAppControllerBrowserTest() : https_server_(net::EmbeddedTestServer::TYPE_HTTPS) { scoped_feature_list_.InitWithFeatures( {}, {predictors::kSpeculativePreconnectFeature}); } WebAppControllerBrowserTest::~WebAppControllerBrowserTest() = default; void WebAppControllerBrowserTest::SetUp() { https_server_.AddDefaultHandlers(GetChromeTestDataDir()); banners::TestAppBannerManagerDesktop::SetUp(); extensions::ExtensionBrowserTest::SetUp(); } content::WebContents* WebAppControllerBrowserTest::OpenApplication( const AppId& app_id) { ui_test_utils::UrlLoadObserver url_observer( provider().registrar().GetAppLaunchURL(app_id), content::NotificationService::AllSources()); apps::AppLaunchParams params( app_id, apps::mojom::LaunchContainer::kLaunchContainerWindow, WindowOpenDisposition::NEW_WINDOW, apps::mojom::AppLaunchSource::kSourceTest); content::WebContents* contents = apps::AppServiceProxyFactory::GetForProfile(profile()) ->BrowserAppLauncher() ->LaunchAppWithParams(params); url_observer.Wait(); return contents; } GURL WebAppControllerBrowserTest::GetInstallableAppURL() { return https_server()->GetURL("/banners/manifest_test_page.html"); } // static const char* WebAppControllerBrowserTest::GetInstallableAppName() { return "Manifest test app"; } void WebAppControllerBrowserTest::SetUpInProcessBrowserTestFixture() { extensions::ExtensionBrowserTest::SetUpInProcessBrowserTestFixture(); cert_verifier_.SetUpInProcessBrowserTestFixture(); } void WebAppControllerBrowserTest::TearDownInProcessBrowserTestFixture() { extensions::ExtensionBrowserTest::TearDownInProcessBrowserTestFixture(); cert_verifier_.TearDownInProcessBrowserTestFixture(); } void WebAppControllerBrowserTest::SetUpCommandLine( base::CommandLine* command_line) { extensions::ExtensionBrowserTest::SetUpCommandLine(command_line); // Browser will both run and display insecure content. command_line->AppendSwitch(switches::kAllowRunningInsecureContent); cert_verifier_.SetUpCommandLine(command_line); } void WebAppControllerBrowserTest::SetUpOnMainThread() { extensions::ExtensionBrowserTest::SetUpOnMainThread(); host_resolver()->AddRule("*", "127.0.0.1"); ASSERT_TRUE(https_server()->Start()); // By default, all SSL cert checks are valid. Can be overridden in tests. cert_verifier_.mock_cert_verifier()->set_default_result(net::OK); provider().os_integration_manager().SuppressOsHooksForTesting(); } } // namespace web_app
[ "commit-bot@chromium.org" ]
commit-bot@chromium.org
0b7eb7dde7714423a76f23b1b4e18502aac77ed2
c432a0f1329d06404e8e8e4198293c48cbc1299a
/Chromium Files/resource_request(net).cc
738a7d07a97941abd832194ea7f0b4b750a5fc36
[]
no_license
INP-attacks/INP
6781c2c6bf7caf97974743846243022edc9e612f
b58452a4da448c663b1a9eceda40bd606a25e151
refs/heads/master
2020-07-09T19:08:35.001777
2019-08-23T21:57:17
2019-08-23T21:57:17
204,057,936
0
0
null
null
null
null
UTF-8
C++
false
false
4,087
cc
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/network/public/cpp/resource_request.h" #include "net/base/load_flags.h" namespace network { ResourceRequest::ResourceRequest() {} ResourceRequest::ResourceRequest(const ResourceRequest& request) = default; ResourceRequest::~ResourceRequest() {} bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { return method == request.method && url == request.url && site_for_cookies == request.site_for_cookies && top_frame_origin == request.top_frame_origin && attach_same_site_cookies == request.attach_same_site_cookies && update_first_party_url_on_redirect == request.update_first_party_url_on_redirect && request_initiator == request.request_initiator && referrer == request.referrer && referrer_policy == request.referrer_policy && is_prerendering == request.is_prerendering && headers.ToString() == request.headers.ToString() && cors_exempt_headers.ToString() == request.cors_exempt_headers.ToString() && load_flags == request.load_flags && allow_credentials == request.allow_credentials && plugin_child_id == request.plugin_child_id && resource_type == request.resource_type && priority == request.priority && appcache_host_id == request.appcache_host_id && should_reset_appcache == request.should_reset_appcache && is_external_request == request.is_external_request && cors_preflight_policy == request.cors_preflight_policy && originated_from_service_worker == request.originated_from_service_worker && skip_service_worker == request.skip_service_worker && corb_detachable == request.corb_detachable && corb_excluded == request.corb_excluded && mode == request.mode && credentials_mode == request.credentials_mode && redirect_mode == request.redirect_mode && fetch_integrity == request.fetch_integrity && fetch_request_context_type == request.fetch_request_context_type && request_body == request.request_body && keepalive == request.keepalive && has_user_gesture == request.has_user_gesture && enable_load_timing == request.enable_load_timing && enable_upload_progress == request.enable_upload_progress && do_not_prompt_for_login == request.do_not_prompt_for_login && render_frame_id == request.render_frame_id && is_main_frame == request.is_main_frame && transition_type == request.transition_type && allow_download == request.allow_download && report_raw_headers == request.report_raw_headers && previews_state == request.previews_state && initiated_in_secure_context == request.initiated_in_secure_context && upgrade_if_insecure == request.upgrade_if_insecure && is_revalidating == request.is_revalidating && should_also_use_factory_bound_origin_for_cors == request.should_also_use_factory_bound_origin_for_cors && throttling_profile_id == request.throttling_profile_id && custom_proxy_pre_cache_headers.ToString() == request.custom_proxy_pre_cache_headers.ToString() && custom_proxy_post_cache_headers.ToString() == request.custom_proxy_post_cache_headers.ToString() && custom_proxy_use_alternate_proxy_list == request.custom_proxy_use_alternate_proxy_list && fetch_window_id == request.fetch_window_id && devtools_request_id == request.devtools_request_id; } bool ResourceRequest::SendsCookies() const { return allow_credentials && !(load_flags & net::LOAD_DO_NOT_SEND_COOKIES); } bool ResourceRequest::SavesCookies() const { return allow_credentials && !(load_flags & net::LOAD_DO_NOT_SAVE_COOKIES); } } // namespace network
[ "noreply@github.com" ]
noreply@github.com
4f79864747276878ab7edc29c9b243d73c6aa021
786a89a4bd31e0a5953094c7880021cc98f78f98
/ABC/ABC172/a.cpp
1898cc36a2c1f80d792358f8241065ce3c209c4a
[]
no_license
enjoy82/atcodersyozin
c12eb9cc04e61cedcdc13643b84e8c87c13ff4b1
c8a73577d1d75db2d5c22eab028f942f75f2fba7
refs/heads/master
2022-10-04T04:47:16.835712
2022-09-30T07:15:47
2022-09-30T07:15:47
243,669,940
0
0
null
null
null
null
UTF-8
C++
false
false
897
cpp
#include<bits/stdc++.h> typedef long long ll; typedef long double ld; using namespace std; using Pii = pair<int, int>; using Pll = pair<ll, ll>; #define REP(i, l, n) for(int i=(l), i##_len=(n); i<i##_len; ++i) #define ALL(x) (x).begin(),(x).end() #define pb push_back ll gcd(ll a,ll b){return b ? gcd(b,a%b) : a;} ll lcm(ll a,ll b){return a/gcd(a,b)*b;} template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T &a, T b) { if(a > b) { a = b; return true; } return false; } char alpha[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; int dx[4] = {-1, 1, 0, 0}; int dy[4] = {0, 0, 1, -1}; int main(){ int a; cin >> a; cout << a + a * a + a * a * a << endl; }
[ "naoya990506@gmail.com" ]
naoya990506@gmail.com
3a7518639b441edd5f97a7a3eeb969dd2282c371
4626ec55aa5df9a4c6bd760f5cd4cf99f4ccffa9
/MindMap/Command.h
e6ea31b98b3e44342a5d5d0f8deb0c50daf7dbb8
[]
no_license
hoootony/POSD
1bb1dcd6395931de24e12ba019131b9c13307633
5018abcf43bb2dd6a8b0255263ec12f7a2a2f639
refs/heads/master
2016-09-10T04:29:13.721380
2015-01-12T15:36:55
2015-01-12T15:36:55
27,594,527
0
0
null
null
null
null
UTF-8
C++
false
false
134
h
#pragma once class Command { public: Command(); virtual ~Command(); virtual void execute() = 0; virtual void unexecute() = 0; };
[ "hoootony@hotmail.com" ]
hoootony@hotmail.com
d7d834fd26ec1c0843e053d030bcfc12db15a130
2ac1753652a65cb0beb4d1f83ae860060741d4f0
/MartaVegaBayo_MasterThesis/PubmedParser/PubDateParser.h
83d7d94d3c855e417ac4214b339ffa9a538d4ec5
[]
no_license
marta123456/ReferenceRecommendationForScientificArticles
b732acaf6b018876a60fda9c3e7f5a7edb30c3c5
762fa608427efb983f73daa23f0d61187dc8ae8f
refs/heads/master
2021-01-10T07:18:59.057105
2016-01-24T09:41:56
2016-01-24T09:41:56
50,256,680
0
0
null
null
null
null
UTF-8
C++
false
false
721
h
//Declaration of the class PubDateParser #if !defined (_PUBDATEPARSER_H_) #define _PUBDATEPARSER_H_ #include "../DataModel/CArticleParsed.h" #include "ParserBase.h" #include "../Pugixml/pugixml.hpp" /** PubDateParser class. This class has methods and attributes to parse from the DOM of an XML article with the JATS schema the publication date of the article and set with it the corresponding attribute of the CArticleParsed object inherited form ParserBase. */ class PubDateParser: public virtual ParserBase { private: pugi::xml_node aArticleMetaNode; //node of the DOM of the xml document where the publication date will be looked for public: void loadXMLnodes(pugi::xml_node &rootNode); void parse(); }; #endif
[ "martavegabayo@gmail.com" ]
martavegabayo@gmail.com
869f49da160be9867a93e6f53d3029541ad6fb37
74086e6724716bb4f0e8529f74c0cb6f8203bd8a
/CNN_seriell/src/InputLayer.hpp
56caf128684b310f4086421d27b8bfc179221acc
[]
no_license
DHBW-Studienarbeit/Serial_Implementation
5ced455df87aa518939b6420afa519c1a068b8a1
d4e2db330710f17dfd4dad81046bca29a397f3b5
refs/heads/master
2021-09-09T08:22:17.213361
2018-03-14T11:05:31
2018-03-14T11:05:31
114,098,243
1
0
null
null
null
null
UTF-8
C++
false
false
638
hpp
/* * InputLayer.hpp * * Created on: 29.11.2017 * Author: Benjamin Riedle */ #ifndef INPUTLAYER_HPP_ #define INPUTLAYER_HPP_ #include "Layer.hpp" class Input_Layer: public Layer { private: int rows; int cols; public: Input_Layer(int rows, int cols); virtual ~Input_Layer(); int getRows(); int getCols(); virtual void backpropagate( Matrix* inputs, Matrix* activations, Matrix* input_derivations, Matrix* activation_derivations, Matrix* weights, Matrix* biases, Matrix* weight_derivations, Matrix* bias_derivations ) override; }; #endif /* INPUTLAYER_HPP_ */
[ "it.schmflo@gmail.com" ]
it.schmflo@gmail.com
6988276b019b276f81118ea5ef31cf1c5481ce69
404aaaecf0ef9beb9df712e9796e285b72b233a6
/FabricDFGView.h
b6d17339d91029566466c4ebc94657c7daf8f5a4
[ "BSD-3-Clause" ]
permissive
robeastham/SpliceHoudini
78a98b7d6485b12e937df4ffadb7721e8063bc8c
bd4295273c39ec7c097749c22adc88b00fa70ac1
refs/heads/master
2020-12-28T21:50:38.532820
2015-04-11T20:29:31
2015-04-11T20:29:31
null
0
0
null
null
null
null
UTF-8
C++
false
false
5,655
h
#ifndef __FabricDFGView_H__ #define __FabricDFGView_H__ #include "FabricDFGView.fwd.h" #define FEC_SHARED #define FECS_SHARED #include <DFGWrapper/DFGWrapper.h> #include <ASTWrapper/KLASTManager.h> #include <Commands/CommandStack.h> #include <vector> #include <map> #include <ImathVec.h> class OP_Node; namespace OpenSpliceHoudini { /// Implementation of the DFGWrapper::View class FabricDFGView : public FabricServices::DFGWrapper::View { public: typedef std::vector<std::string> ParameterPortsNames; typedef std::vector<std::string> OutputPortsNames; typedef std::vector<FabricServices::DFGWrapper::Port> OutputPorts; FabricDFGView(OP_Node* op); ~FabricDFGView(); // instance management // right now there are no locks in place, // assuming that the DCC will only access // these things from the main thread. unsigned int getId(); static FabricDFGView* getFromId(unsigned int id); // accessors static FabricCore::Client* getClient(); static FabricServices::DFGWrapper::Host* getHost(); FabricServices::DFGWrapper::Binding* getBinding(); static FabricServices::ASTWrapper::KLASTManager* getManager(); static FabricServices::Commands::CommandStack* getStack(); // persistence std::string getJSON(); void setFromJSON(const std::string& json); // logging. static void setLogFunc(void (*in_logFunc)(void*, const char*, unsigned int)); static void logErrorFunc(void* userData, const char* message, unsigned int length); static void (*s_logFunc)(void*, const char*, unsigned int); static void (*s_logErrorFunc)(void*, const char*, unsigned int); // notifications // for now we only implement onPortInserted and onPortRemoved virtual void onNotification(char const* json); virtual void onNodeInserted(FabricServices::DFGWrapper::Node node) { } virtual void onNodeRemoved(FabricServices::DFGWrapper::Node node) { } virtual void onPinInserted(FabricServices::DFGWrapper::Pin pin) { } virtual void onPinRemoved(FabricServices::DFGWrapper::Pin pin) { } virtual void onPortInserted(FabricServices::DFGWrapper::Port port); virtual void onPortRemoved(FabricServices::DFGWrapper::Port port); virtual void onEndPointsConnected(FabricServices::DFGWrapper::Port src, FabricServices::DFGWrapper::Port dst) { } virtual void onEndPointsDisconnected(FabricServices::DFGWrapper::Port src, FabricServices::DFGWrapper::Port dst) { } virtual void onNodeMetadataChanged(FabricServices::DFGWrapper::Node node, const char* key, const char* metadata) { } virtual void onNodeTitleChanged(FabricServices::DFGWrapper::Node node, const char* title) { } virtual void onPortRenamed(FabricServices::DFGWrapper::Port port, const char* oldName); virtual void onPinRenamed(FabricServices::DFGWrapper::Pin pin, const char* oldName) { } virtual void onExecMetadataChanged(FabricServices::DFGWrapper::Executable exec, const char* key, const char* metadata) { } virtual void onExtDepAdded(const char* extension, const char* version) { } virtual void onNodeCacheRuleChanged(const char* path, const char* rule) { } virtual void onExecCacheRuleChanged(const char* path, const char* rule) { } void setWidget(FabricDFGWidgetPtr widget) { m_widget = widget; } private: static void logFunc(void* userData, const char* message, unsigned int length); static FabricCore::Client s_client; static FabricServices::DFGWrapper::Host* s_host; FabricServices::DFGWrapper::Binding m_binding; static FabricServices::ASTWrapper::KLASTManager* s_manager; static FabricServices::Commands::CommandStack s_stack; unsigned int m_id; static unsigned int s_maxId; static std::map<unsigned int, FabricDFGView*> s_instances; // This part should be moved public: void setSInt32PortValue(const char* name, int val); const ParameterPortsNames& getInputPortsSInt32Names() const { return m_inSInt32Names; } void setFloat32PortValue(const char* name, float val); const ParameterPortsNames& getInputPortsFloat32Names() const { return m_inFloat32Names; } void setStringPortValue(const char* name, const char* val); const ParameterPortsNames& getInputPortsStringNames() const { return m_inStringNames; } void setFilePathPortValue(const char* name, const char* val); const ParameterPortsNames& getInputPortsFilePathNames() const { return m_inFilePathNames; } void setVec3PortValue(const char* name, const Imath::Vec3<float>& val); const ParameterPortsNames& getInputPortsVec3Names() const { return m_inVec3Names; } FabricCore::RTVal getMat44RTVal(const char* name); const OutputPortsNames& getOutputPortsMat44Names() const { return m_outMat44Names; } OutputPorts getPolygonMeshPorts() const { return m_outPolyMeshPorts; } private: void storeParameterPortsNames(); void storeOutputPolymeshPorts(); ParameterPortsNames m_inSInt32Names; ParameterPortsNames m_inFloat32Names; ParameterPortsNames m_inStringNames; ParameterPortsNames m_inFilePathNames; ParameterPortsNames m_inVec3Names; std::map<std::string, ParameterPortsNames*> m_parameterPortsMap; OutputPortsNames m_outPolygonMeshNames; OutputPortsNames m_outMat44Names; OutputPorts m_outPolyMeshPorts; FabricDFGWidgetPtr m_widget; OP_Node* m_op; }; } // End namespace OpenSpliceHoudini #endif
[ "guillaume.laforge@gmail.co" ]
guillaume.laforge@gmail.co
35f065e0e668c16c593193fbbb2b798328866cb4
bb4b967732337945dc96a899a1a0463f10db42d1
/vendor/abseil-cpp/absl/strings/ascii.h
98418fd23026521369422da20d9c9f7be587a6fa
[ "Zlib", "CC0-1.0", "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
killvxk/loki-network
b5d5dc9ff6ac8488b39528edcb71e622f546dea2
3715c28616fac132f622a80d5d0e8e794166315a
refs/heads/master
2020-05-04T19:41:57.347351
2019-04-03T19:18:13
2019-04-03T19:18:13
179,403,950
1
1
NOASSERTION
2019-04-04T02:08:54
2019-04-04T02:08:54
null
UTF-8
C++
false
false
8,506
h
// // Copyright 2017 The Abseil Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // // ----------------------------------------------------------------------------- // File: ascii.h // ----------------------------------------------------------------------------- // // This package contains functions operating on characters and strings // restricted to standard ASCII. These include character classification // functions analogous to those found in the ANSI C Standard Library <ctype.h> // header file. // // C++ implementations provide <ctype.h> functionality based on their // C environment locale. In general, reliance on such a locale is not ideal, as // the locale standard is problematic (and may not return invariant information // for the same character set, for example). These `ascii_*()` functions are // hard-wired for standard ASCII, much faster, and guaranteed to behave // consistently. They will never be overloaded, nor will their function // signature change. // // `ascii_isalnum()`, `ascii_isalpha()`, `ascii_isascii()`, `ascii_isblank()`, // `ascii_iscntrl()`, `ascii_isdigit()`, `ascii_isgraph()`, `ascii_islower()`, // `ascii_isprint()`, `ascii_ispunct()`, `ascii_isspace()`, `ascii_isupper()`, // `ascii_isxdigit()` // Analogous to the <ctype.h> functions with similar names, these // functions take an unsigned char and return a bool, based on whether the // character matches the condition specified. // // If the input character has a numerical value greater than 127, these // functions return `false`. // // `ascii_tolower()`, `ascii_toupper()` // Analogous to the <ctype.h> functions with similar names, these functions // take an unsigned char and return a char. // // If the input character is not an ASCII {lower,upper}-case letter (including // numerical values greater than 127) then the functions return the same value // as the input character. #ifndef ABSL_STRINGS_ASCII_H_ #define ABSL_STRINGS_ASCII_H_ #include <algorithm> #include <string> #include "absl/base/attributes.h" #include "absl/strings/string_view.h" namespace absl { inline namespace lts_2018_12_18 { namespace ascii_internal { // Declaration for an array of bitfields holding character information. extern const unsigned char kPropertyBits[256]; // Declaration for the array of characters to upper-case characters. extern const char kToUpper[256]; // Declaration for the array of characters to lower-case characters. extern const char kToLower[256]; } // namespace ascii_internal // ascii_isalpha() // // Determines whether the given character is an alphabetic character. inline bool ascii_isalpha(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x01) != 0; } // ascii_isalnum() // // Determines whether the given character is an alphanumeric character. inline bool ascii_isalnum(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x04) != 0; } // ascii_isspace() // // Determines whether the given character is a whitespace character (space, // tab, vertical tab, formfeed, linefeed, or carriage return). inline bool ascii_isspace(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x08) != 0; } // ascii_ispunct() // // Determines whether the given character is a punctuation character. inline bool ascii_ispunct(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x10) != 0; } // ascii_isblank() // // Determines whether the given character is a blank character (tab or space). inline bool ascii_isblank(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x20) != 0; } // ascii_iscntrl() // // Determines whether the given character is a control character. inline bool ascii_iscntrl(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x40) != 0; } // ascii_isxdigit() // // Determines whether the given character can be represented as a hexadecimal // digit character (i.e. {0-9} or {A-F}). inline bool ascii_isxdigit(unsigned char c) { return (ascii_internal::kPropertyBits[c] & 0x80) != 0; } // ascii_isdigit() // // Determines whether the given character can be represented as a decimal // digit character (i.e. {0-9}). inline bool ascii_isdigit(unsigned char c) { return c >= '0' && c <= '9'; } // ascii_isprint() // // Determines whether the given character is printable, including whitespace. inline bool ascii_isprint(unsigned char c) { return c >= 32 && c < 127; } // ascii_isgraph() // // Determines whether the given character has a graphical representation. inline bool ascii_isgraph(unsigned char c) { return c > 32 && c < 127; } // ascii_isupper() // // Determines whether the given character is uppercase. inline bool ascii_isupper(unsigned char c) { return c >= 'A' && c <= 'Z'; } // ascii_islower() // // Determines whether the given character is lowercase. inline bool ascii_islower(unsigned char c) { return c >= 'a' && c <= 'z'; } // ascii_isascii() // // Determines whether the given character is ASCII. inline bool ascii_isascii(unsigned char c) { return c < 128; } // ascii_tolower() // // Returns an ASCII character, converting to lowercase if uppercase is // passed. Note that character values > 127 are simply returned. inline char ascii_tolower(unsigned char c) { return ascii_internal::kToLower[c]; } // Converts the characters in `s` to lowercase, changing the contents of `s`. void AsciiStrToLower(std::string* s); // Creates a lowercase string from a given absl::string_view. ABSL_MUST_USE_RESULT inline std::string AsciiStrToLower(absl::string_view s) { std::string result(s); absl::AsciiStrToLower(&result); return result; } // ascii_toupper() // // Returns the ASCII character, converting to upper-case if lower-case is // passed. Note that characters values > 127 are simply returned. inline char ascii_toupper(unsigned char c) { return ascii_internal::kToUpper[c]; } // Converts the characters in `s` to uppercase, changing the contents of `s`. void AsciiStrToUpper(std::string* s); // Creates an uppercase string from a given absl::string_view. ABSL_MUST_USE_RESULT inline std::string AsciiStrToUpper(absl::string_view s) { std::string result(s); absl::AsciiStrToUpper(&result); return result; } // Returns absl::string_view with whitespace stripped from the beginning of the // given string_view. ABSL_MUST_USE_RESULT inline absl::string_view StripLeadingAsciiWhitespace( absl::string_view str) { auto it = std::find_if_not(str.begin(), str.end(), absl::ascii_isspace); return str.substr(it - str.begin()); } // Strips in place whitespace from the beginning of the given string. inline void StripLeadingAsciiWhitespace(std::string* str) { auto it = std::find_if_not(str->begin(), str->end(), absl::ascii_isspace); str->erase(str->begin(), it); } // Returns absl::string_view with whitespace stripped from the end of the given // string_view. ABSL_MUST_USE_RESULT inline absl::string_view StripTrailingAsciiWhitespace( absl::string_view str) { auto it = std::find_if_not(str.rbegin(), str.rend(), absl::ascii_isspace); return str.substr(0, str.rend() - it); } // Strips in place whitespace from the end of the given string inline void StripTrailingAsciiWhitespace(std::string* str) { auto it = std::find_if_not(str->rbegin(), str->rend(), absl::ascii_isspace); str->erase(str->rend() - it); } // Returns absl::string_view with whitespace stripped from both ends of the // given string_view. ABSL_MUST_USE_RESULT inline absl::string_view StripAsciiWhitespace( absl::string_view str) { return StripTrailingAsciiWhitespace(StripLeadingAsciiWhitespace(str)); } // Strips in place whitespace from both ends of the given string inline void StripAsciiWhitespace(std::string* str) { StripTrailingAsciiWhitespace(str); StripLeadingAsciiWhitespace(str); } // Removes leading, trailing, and consecutive internal whitespace. void RemoveExtraAsciiWhitespace(std::string*); } // inline namespace lts_2018_12_18 } // namespace absl #endif // ABSL_STRINGS_ASCII_H_
[ "michael@loki.network" ]
michael@loki.network
292310dbd6d2f45079e77d56a2ea670248d7a3a0
415f008d3053bfdc2f2945fb84c0d23712c1b03e
/Tocha.ino
d846261a1e5554ad16bc1413f94743d5e9a58e45
[]
no_license
adriano2004/Lampada-animada
bf663f54f79d6fffd4e7f03cb507900af1ce2284
3e45d899f57e69bef3c2c46593e76125d3a2969b
refs/heads/master
2023-08-06T11:56:35.459611
2021-10-10T19:17:56
2021-10-10T19:17:56
null
0
0
null
null
null
null
UTF-8
C++
false
false
282
ino
int led1=7; int led2=6; int led3=5; void setup() { pinMode(led1, OUTPUT); pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); } void loop() { analogWrite(led1,random(120)+136); analogWrite(led2,random(120)+136); analogWrite(led3,random(120)+136); delay(random(100)); }
[ "robertopereira23447@gmail.com" ]
robertopereira23447@gmail.com
fff771176ff6a3e66464503c53589b48cb1975b0
c29fffe865fd15ddf3232b4e54ff7a71a886b7c7
/31.cpp
25cecdb8e7fa1afdf61b59ed2b84c98f8df754f4
[]
no_license
CSprograms/C-Plus-Plus-Code-for-Beginers
830a65385810e16c1f591c605b7e16f36ac7a2a3
eecb978f6ed35d1395bae352118f8e6796bfc72c
refs/heads/main
2023-08-04T02:55:18.411038
2021-09-16T14:28:27
2021-09-16T14:28:27
374,513,169
0
0
null
null
null
null
UTF-8
C++
false
false
415
cpp
#include <iostream> #include <iomanip> using namespace std; int value() { int val = 0; return ++val; } int staticValue() { static int val; return ++val; } int main() { int loop; cout<<setw(5)<<"Loop"<<setw(15)<<"Value"<<setw(15)<<"Static Value"<<endl; for(loop = 0; loop < 5; loop++) cout<<setw(5)<<loop<<setw(15)<<value()<<setw(15)<<staticValue()<<endl; return 0; }
[ "aravindhanmohan.tvm@gmail.com" ]
aravindhanmohan.tvm@gmail.com
876dce697438ce2af4b5cf53d73709ead830f0a6
3fc19c271eca0fbbb423aae28cb0ef53c0c3a291
/atcoder/abc202/A.cpp
1c36f48fee8c9b7f40c42f9ac18635bed6364d3e
[]
no_license
tstanvir/mySolutionRepo
09373dccc86ac8a6d1992a6761a81b98035a8977
0b635d689424bc8f55f0efd54ed028638d81a0e2
refs/heads/master
2023-08-11T01:53:53.320511
2021-05-22T18:06:00
2021-09-14T15:18:55
353,521,176
1
0
null
null
null
null
UTF-8
C++
false
false
4,567
cpp
// Problem: A - Three Dice // Contest: AtCoder - AISing Programming Contest 2021(AtCoder Beginner Contest 202) // URL: https://atcoder.jp/contests/abc202/tasks/abc202_a // Memory Limit: 1024 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) #include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //using namespace __gnu_pbds; using namespace std; //#pragma comment(linker, "/stack:200000000") //#pragma GCC optimize("Ofast") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define IOS ios::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL); #define SET(x) memset(x, 0, sizeof(x)) #define CLR(x) memset(x, -1, sizeof(x)) #define mp make_pair #define ALL(x) x.begin(),x.end() #define pb push_back #define ppb pop_back #define highest(x) numeric_limits<x>::max() #define lowest(x) numeric_limits<x>::min() #define minv(v) *min_element(v.begin(),v.end()) #define maxv(v) *max_element(v.begin(),v.end()) #define PI acos(-1) #define border(i, j , row, column) ((i >= 0 && i < row) && (j >= 0 && j < column)) #define uniq(vec) vec.resize(distance(vec.begin(),unique(vec.begin(),vec.end()))) #define sz(a) int(a.size()) #define ff first #define ss second #define endl "\n" #define forch(it,s) for(auto it:s) #define rep(i,a) for(int i=0; i<a;i++) #define rep1(i,a,b) for(int i=(a);i<=(b);++i) #define irep(i,b,a) for(int i=(b);i>=(a);--i) #define no1(n) __builtin_popcount(n) #define maxpq priority_queue<int> #define minpq priority_queue<int, vector<int>, greater<int> > #define di deque<int> #define dll deque<ll> #define pf push_front #define ppf pop_front #define preci cout<<fixed<<setprecision(9); vector<string> vec_splitter(string s) { s += ','; vector<string> res; while(!s.empty()) { res.push_back(s.substr(0, s.find(','))); s = s.substr(s.find(',') + 1); } return res; } void debug_out( vector<string> __attribute__ ((unused)) args, __attribute__ ((unused)) int idx, __attribute__ ((unused)) int LINE_NUM) { cerr << endl; } template <typename Head, typename... Tail> void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) { if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") "; stringstream ss; ss << H; cerr << args[idx] << " = " << ss.str(); debug_out(args, idx + 1, LINE_NUM, T...); } #define XOX #ifdef XOX #define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__) #else #define debug(...) 42 #endif typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pair<int,int>> vpii; typedef vector<pair<ll,ll>> vpll; //typedef tree<pair<int, int>,null_type,less<pair<int, int>>,rb_tree_tag,tree_order_statistics_node_update> omst; //typedef tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> ost; int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1}; int dy8[] = {1,-1, 1, -1, 0, 0, -1, 1}; int dx4[] = {0, 0, 1, -1}; int dy4[] = {1, -1, 0, 0}; const int maxx=100005; const long long MOD = 1000000007; const double rad=(acos(-1)/180.00); const int INF = 0x3f3f3f3f; const ll LL_INF = 0x3f3f3f3f3f3f3f3f; #define EPS 0.000000001 inline void normal(ll &a) { a %= MOD; (a < 0) && (a += MOD); } inline ll modMul(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a*b)%MOD; } inline ll modAdd(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); return (a+b)%MOD; } inline ll modSub(ll a, ll b) { a %= MOD, b %= MOD; normal(a), normal(b); a -= b; normal(a); return a; } inline ll modPow(ll b, ll p) { ll r = 1; while(p) { if(p&1) r = modMul(r, b); b = modMul(b, b); p >>= 1; } return r; } inline ll modInverse(ll a) { return modPow(a, MOD-2); } /// When MOD is prime. inline ll modDiv(ll a, ll b) { return modMul(a, modInverse(b)); } ll gcd(ll a, ll b) { if (a == 0) return b; return gcd(b % a, a);} ll lcm(ll a, ll b) {return (a*b)/gcd(a,b);} double sq(double x) {return x*x;} ll po(ll b,ll p){ ll res=1; while(p){ res*=b; p--;} return res;} ll lg2(ll x){ ll res=0; while(x>1){ res++; x/=2ll;} return res;} bool get_bit(int mask,int pos) {return mask&(1<<pos);} bool sortinrev(const pair<int,int> &a,const pair<int,int> &b) { return a.first>b.first; } int cs=0; void solve(){ //cout<<"Case "<<++cs<<": "; int a,b,c; cin>>a>>b>>c; cout<<(3*7-(a+b+c))<<endl; } signed main() { IOS; int t; t=1; //cin>>t; while(t--){ solve(); } return 0; }
[ "tanvirshossain0@gmail.com" ]
tanvirshossain0@gmail.com
236c39223cd616be35a1ba1fb33a37922912051a
3cd0d9a1bfff1b977eb7bd2c15881e103141cbc3
/src/Quicktime/QTUtils.cpp
fb2eb6296a98e6e8f6f40506c243e02e84f6673d
[]
no_license
cefix/cefix
30c8a67120b1c0c94bbe5ad878373f7378392808
197f89a8cf603c14fe708f8e70252c3f725c2b08
refs/heads/master
2020-12-24T16:49:18.153881
2015-05-24T11:47:46
2015-05-24T11:47:46
36,169,777
0
0
null
null
null
null
UTF-8
C++
false
false
4,325
cpp
/* * QTUtils.cpp * NativeContext * * Created by Stephan Huber on Fri Sep 06 2002. * Copyright (c) 2002 digital mind. All rights reserved. * */ #include <cefix/Export.h> #if defined CEFIX_QUICKTIME_AVAILABLE #include <osg/ref_ptr> #include <osg/Referenced> #include <cefix/Log.h> #include <cefix/QTUtils.h> #include <osgDB/Registry> #include <iostream> #include <osg/Timer> using namespace std; namespace cefix { class QuicktimeInitializer : public osg::Referenced { public: QuicktimeInitializer() :osg::Referenced() { static bool s_fQuicktimeInited = 0; if (!s_fQuicktimeInited) { #ifndef __APPLE__ InitializeQTML(0); #endif OSErr err = EnterMovies(); if (err!=0) osg::notify(osg::FATAL) << "Error while initializing quicktime: " << err << endl; else osg::notify(osg::DEBUG_INFO) << "Quicktime initialized successfully" << endl; long version; OSErr result; result = Gestalt(gestaltQuickTime,&version); if ((result == noErr) && (version >= 0x07100000)) { // alles ok } else { std::cout << "Quicktime version not supported! " << std::endl; osg::Timer t; osg::Timer_t tick = t.tick(); while (t.delta_s(tick, t.tick()) < 1) ; exit(1); } registerQTReader(); s_fQuicktimeInited = true; } } ~QuicktimeInitializer() { #ifndef __APPLE__ ExitMovies(); #endif //osg::notify(osg::DEBUG_INFO) << "Quicktime deinitialized successfully" << endl; } protected: void registerQTReader() { osgDB::Registry* r = osgDB::Registry::instance(); r->addFileExtensionAlias("jpg", "qt"); r->addFileExtensionAlias("jpe", "qt"); r->addFileExtensionAlias("jpeg", "qt"); r->addFileExtensionAlias("tif", "qt"); r->addFileExtensionAlias("tiff", "qt"); r->addFileExtensionAlias("gif", "qt"); r->addFileExtensionAlias("png", "qt"); r->addFileExtensionAlias("psd", "qt"); r->addFileExtensionAlias("tga", "qt"); r->addFileExtensionAlias("mov", "qt"); r->addFileExtensionAlias("avi", "qt"); r->addFileExtensionAlias("mpg", "qt"); r->addFileExtensionAlias("mpv", "qt"); r->addFileExtensionAlias("dv", "qt"); r->addFileExtensionAlias("mp4", "qt"); r->addFileExtensionAlias("m4v", "qt"); } }; void initQuicktime(bool erase) { static osg::ref_ptr<QuicktimeInitializer> s_qt_init = new QuicktimeInitializer(); if (erase) s_qt_init = NULL; } void exitQuicktime() { initQuicktime(true); } // --------------------------------------------------------------------------- // MakeFSSPecFromPath // wandelt einen Posix-Pfad in ein FSSpec um. // --------------------------------------------------------------------------- OSStatus MakeFSSpecFromPath(const char* path, FSSpec& spec) { OSStatus result; #if defined( __APPLE__ ) FSRef ref; result = FSPathMakeRef( (UInt8*)path, &ref, false); // fname is not a directory if (result!=0) return result; result = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL, &spec, NULL); return result; #else // windows implementation to get a fsspec result = NativePathNameToFSSpec(const_cast<char*>(path), &spec, 0 /* flags */); return result; #endif } // --------------------------------------------------------------------------- // MakeMovieFromPath // erzeugt movie-objekt aus Pfad // --------------------------------------------------------------------------- OSStatus MakeMovieFromPath(const char* path, Movie* movie) { OSStatus err; FSSpec spec; short resref; #ifdef __APPLE__ MakeFSSpecFromPath(path, spec); #else err = NativePathNameToFSSpec((char*)path, &spec, 0 /* flags */); #endif err = OpenMovieFile(&spec, &resref, fsRdPerm); if (err!=0) return err; err = NewMovieFromFile(movie, resref, NULL, NULL, 0, NULL); if (err==0) err=GetMoviesError(); return err; } OSType getNativePixelFormatForQuicktime() { #if defined(__APPLE__) && defined(__BIG_ENDIAN__) return k32ARGBPixelFormat; #else return k32BGRAPixelFormat; #endif } GLenum getBestInternalFormatForQuicktime() { return (GLenum)GL_UNSIGNED_INT_8_8_8_8_REV; } } // namespace #endif
[ "stephan@factorial.io" ]
stephan@factorial.io
4d682dfcf0bcd367d92a5e722c5818bcc689695a
96ad6e17a71d84a5da9c71d98e45863b9027af7a
/AbstractFactory/ConcreteFactory1.h
abbb4c1eaca9ce71ad4c1ff01ff4a764dd79cea3
[ "MIT" ]
permissive
Alabuta/Patterns-cxx
fb1fe0f1ab4eea2bb8559c2d433255adb185c27a
1ae731867a9ae1d79a62d751395e15a38e212b6c
refs/heads/master
2021-01-13T12:58:47.784794
2020-08-18T18:07:18
2020-08-18T18:07:18
71,822,166
0
0
null
null
null
null
UTF-8
C++
false
false
270
h
#pragma once #include "IAbstractFactory.h" class ConcreteFactory1 final : public IAbstractFactory { public: virtual std::unique_ptr<AbstractProductA> CreateProductA() const override; virtual std::unique_ptr<AbstractProductB> CreateProductB() const override; };
[ "auqolaq@gmail.com" ]
auqolaq@gmail.com
85bf6f891b6320877526846d93534d8536da89c6
4f2f59203f377eade4bdd4b5808be9d148f25e62
/infinity-table/infinity-table.ino
97232e864ea91be97c1ce4ccfa28687db99fd475
[]
no_license
cjsatuforc/whirling-electrons
4fbe427dffcc0892b6fd366a16e7e39c8d75eba3
62026b731ea38f74bdfe04db9a942ec30d751050
refs/heads/master
2020-04-15T16:47:17.039684
2019-01-08T12:45:43
2019-01-08T12:45:43
null
0
0
null
null
null
null
UTF-8
C++
false
false
4,414
ino
#include <FastLED.h> #define NUM_LEDS 260 #define DATA_PIN 9 #define MAX_BRIGHT 30 static CRGB leds[NUM_LEDS]; class SquaredVal { public: SquaredVal() { for (uint32_t i=0; i<sizeof(values)/sizeof(values[0]); ++i) { float f = (float) i / 255.0f; values[i] = (uint8_t) (f * f * 255.0f); } } uint8_t operator [] (unsigned int const idx) const { if (idx > sizeof(values)/sizeof(values[0])) { Serial.print("SquaredVal["); Serial.print(idx); Serial.println("] called\n"); while (1); } return values[idx]; } private: uint8_t values[256]; }; static CRGB CrbgInit(uint8_t const r, uint8_t const g, uint8_t const b) { return {.red = (uint8_t) ((float) r / 255.0f * (float) MAX_BRIGHT), .green = (uint8_t) ((float) g / 255.0f * (float) MAX_BRIGHT), .blue = (uint8_t) ((float) b / 255.0f * (float) MAX_BRIGHT)}; } class ColorRange { public: ColorRange(CRGB const &high, CRGB const &low) : high_(high), low_(low), redInc_((float) (high.red - low.red) / 100.0f), greenInc_((float) (high.green - low.green) / 100.0f), blueInc_((float) (high.blue - low.blue) / 100.0f) {} CRGB percent(float const pc) const { return {(uint8_t) (low_.red + (uint8_t) (redInc_ * pc)), (uint8_t) (low_.green + (uint8_t) (greenInc_ * pc)), (uint8_t) (low_.blue + (uint8_t) (blueInc_ * pc))}; } private: CRGB const high_; CRGB const low_; float const redInc_; float const greenInc_; float const blueInc_; }; class Hilight { public: Hilight() : diff_({10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10}), size_(sizeof(diff_)/sizeof(diff_[0])) { // diff_[0] = 15; diff_[1] = 30; diff_[2] = 45; diff_[3] = 60; diff_[4] = 45; diff_[5] = 30; diff_[6] = 15; } public: int8_t const diff_[19]; int const size_; }; static SquaredVal const squaredVal; static CRGB const black = {.red = 0, .green = 0, .blue = 0}; static ColorRange const pink = {CrbgInit(255, 110, 199), CrbgInit(26, 11, 20)}; // static ColorRange const forest = {CrbgInit(57, 255, 20), CrbgInit(6, 26, 2)}; static ColorRange const forest = {CrbgInit(0x49, 0xE2, 0x0E), CrbgInit(0x55, 0x10, 0x33)}; static ColorRange const ocean = {CrbgInit(0, 180, 255), CrbgInit(0, 18, 26)}; static ColorRange const autumn = {CrbgInit(255, 0, 0), CrbgInit(255, 255, 0)}; static int8_t const colorInc = 2; static bool stop = false; class LedState { public: LedState() : percent_(0), direction_(0) {} LedState(int8_t const percent, int8_t const direction) : percent_(percent), direction_(direction) {} void copy(CRGB &rgb, ColorRange const &range) const { rgb = range.percent(percent_); } void advance(void) { int8_t const res = percent_ + colorInc * direction_; if (res < 0) { direction_ = 1; } else if (res > 100) { direction_ = -1; } else { percent_ = res; return; } advance(); } private: int8_t percent_; int8_t direction_; }; // static LedState ledState[NUM_LEDS]; static unsigned long const changeWindow = 5000; static unsigned long nextChange; static Hilight hilight; void setup() { Serial.begin(115200); FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds, NUM_LEDS); // for (int i=0; i<NUM_LEDS; ++i) { // ledState[i] = {0, 1}; // } // for (int i=0; i<min(NUM_LEDS, 8); ++i) { // ledState[i] = {(int8_t) (i * 10), 1}; // } nextChange = millis() + changeWindow; } void loop() { static int hilightPos = -hilight.size_; static uint8_t c = 0; static ColorRange const *colors[] = {&forest, &autumn, &ocean, &pink}; for (int i=0; i<NUM_LEDS; ++i) { // ledState[i].advance(); // ledState[i].copy(leds[i], *colors[c]); leds[i] = colors[c]->percent(0); } for (int i=0; i<hilight.size_; ++i) { int const pos = hilightPos + i; if (pos >= 0 && pos < NUM_LEDS) { leds[pos] = colors[c]->percent(hilight.diff_[i]); } } if (++hilightPos == 40) { hilightPos = -hilight.size_; if (++c >= (uint8_t) (sizeof(colors) / sizeof(colors[0]))) { c = 0; } } FastLED.show(); delay(30); #if 0 if ((int) (nextChange - millis()) <= 0) { Serial.println("Change"); nextChange += changeWindow; if (++c >= (uint8_t) (sizeof(colors) / sizeof(colors[0]))) { c = 0; } } if (0) { for (int i=0; i<NUM_LEDS; ++i) { Serial.print(i); Serial.print(": "); Serial.print(leds[i].red); Serial.print(", "); Serial.print(leds[i].green); Serial.print(", "); Serial.println(leds[i].blue); } while (1); } #endif }
[ "sami.sorell@iki.fi" ]
sami.sorell@iki.fi
96df70848c3a686a8aa12bbe043376d777464ff6
f5d9dda0732bc9bcd4196e9ae6552da1ce7e8c84
/HOMOGE~1.CPP
828971187062f8676dd3e2ee7e6438a5052b6b84
[]
no_license
dibakardhar/C-CPP-Notes
170f306fdcfd7eab8100548d9b3d9161bf482f63
cabef9e885664460c2b810ec5ee786d88457f949
refs/heads/main
2023-08-10T21:19:35.970627
2021-09-17T11:43:55
2021-09-17T11:43:55
null
0
0
null
null
null
null
UTF-8
C++
false
false
12,843
cpp
#include<graphics.h> #include<iostream.h> #include<Math.h> #include<conio.h> #define MAXSIZE 3 class D_2 { private: double Points[MAXSIZE][MAXSIZE]; void Mult(double [MAXSIZE][MAXSIZE]); void MultTwoMat(double [MAXSIZE][MAXSIZE],double [MAXSIZE][MAXSIZE]); void Print(); int x,y; public: D_2(); void initialize(); void GetPoints(); void Draw(int); void DrawCord(); void Translate(); void Rotate(); void Reflect(); void Display(double[MAXSIZE][MAXSIZE]); void Shear(); void Scale_Fixed(); void Scale_Dir(); }; D_2::D_2() { for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i == (MAXSIZE-1)) Points[i][j] = 1; else Points[i][j] = 0; } } initialize(); x = getmaxx(); y = getmaxy(); } void D_2::initialize() { int gdrive = DETECT,gmode; initgraph(&gdrive,&gmode,"c:\\tc\\bgi"); } void D_2::GetPoints() { closegraph(); cout<<"Enter The Points Of The Triangle."; for(int j=0;j<MAXSIZE;j++) { cout<<"Enter Point "<<j+1<<":-"; for(int i=0;i<MAXSIZE-1;i++) { cout<<"Enter "<<char(i+'X')<<": "; cin>>Points[i][j]; } } initialize(); } void D_2::Mult(double temp[MAXSIZE][MAXSIZE]) { int i,j,k; double z[MAXSIZE][MAXSIZE]; for(i=0;i<MAXSIZE;i++) { for(j=0;j<MAXSIZE;j++) z[i][j]=0; } for(i=0;i<MAXSIZE;i++) { for(j=0;j<MAXSIZE;j++) { for(k=0;k<MAXSIZE;k++) z[i][j]=z[i][j]+(temp[i][k] * Points[k][j]); } } for(i=0;i<MAXSIZE;i++) { for(j=0;j<MAXSIZE;j++) { Points[i][j] = z[i][j]; } } } void D_2::Draw(int color) { int Poly[2*MAXSIZE+2]; int k = 0; if(color == GREEN) DrawCord(); for(int j=0;j<MAXSIZE;j++) { for(int i=0;i<MAXSIZE-1;i++) { if(i==0) Poly[k++] = x/2+Points[i][j]; else Poly[k++] = y/2-Points[i][j]; } } Poly[k++] = Poly[0]; Poly[k] = Poly[1]; setcolor(color); drawpoly(4,Poly); } void D_2::Display(double Mat[MAXSIZE][MAXSIZE]) { for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { cout<<Mat[i][j]<<" "; } cout<<" "; } } void D_2::Print() { setcolor(GREEN); setfillstyle(SOLID_FILL,GREEN); fillellipse(19,36,2,2); outtextxy(23,34," Original Triangle"); setcolor(MAGENTA); setfillstyle(SOLID_FILL,MAGENTA); fillellipse(x-178,y-32,2,2); outtextxy(x-175,y-34," Tranformed Triangle"); } void D_2::DrawCord() { setcolor(12); line(x/2,0,x/2,y); line(0,y/2,x,y/2); setcolor(10); setfillstyle(SOLID_FILL,10); fillellipse(x/2,y/2,2,2); for(int i=(x/2+50),j=(x/2-50);i<=x,j>=0;i=i+50,j=j-50) { fillellipse(i,y/2,2,2); fillellipse(j,y/2,2,2); } for(i=(y/2+50),j=(y/2-50);i<=x,j>=0;i=i+50,j=j-50) { fillellipse(x/2,i,2,2); fillellipse(x/2,j,2,2); } outtextxy(x/2+3,y/2+4,"0"); outtextxy(x/2+45,y/2+5,"50"); outtextxy(x/2+95,y/2+5,"100"); outtextxy(x/2+145,y/2+5,"150"); outtextxy(x/2+195,y/2+5,"200"); outtextxy(x/2+245,y/2+5,"250"); outtextxy(x/2+295,y/2+5,"300"); outtextxy(x/2-65,y/2+5,"-50"); outtextxy(x/2-115,y/2+5,"-100"); outtextxy(x/2-165,y/2+5,"-150"); outtextxy(x/2-215,y/2+5,"-200"); outtextxy(x/2-265,y/2+5,"-250"); outtextxy(x/2-315,y/2+5,"-300"); outtextxy(x/2+5,y/2+45,"-50"); outtextxy(x/2+5,y/2+95,"-100"); outtextxy(x/2+5,y/2+145,"-150"); outtextxy(x/2+5,y/2+195,"-200"); outtextxy(x/2+5,y/2-50,"50"); outtextxy(x/2+5,y/2-100,"100"); outtextxy(x/2+5,y/2-150,"150"); outtextxy(x/2+5,y/2-200,"200"); } void D_2::MultTwoMat(double temp[MAXSIZE][MAXSIZE],double temp1[MAXSIZE][MAXSIZE]) { int i,j,k; double z[MAXSIZE][MAXSIZE]; for(i=0;i<MAXSIZE;i++) { for(j=0;j<MAXSIZE;j++) z[i][j]=0; } for(i=0;i<MAXSIZE;i++) { for(j=0;j<MAXSIZE;j++) { for(k=0;k<MAXSIZE;k++) z[i][j]=z[i][j]+(temp[i][k] * temp1[k][j]); } } for(i=0;i<MAXSIZE;i++) { for(j=0;j<MAXSIZE;j++) { temp1[i][j] = z[i][j]; } } } void D_2::Translate() { int Tx,Ty; double Trans[MAXSIZE][MAXSIZE]; closegraph(); cout<<"Enter Translation Factor Along X-Axis: "; cin>>Tx; cout<<"Enter Translation Factor Along Y-Axis: "; cin>>Ty; initialize(); for(int j=0;j<MAXSIZE;j++) { for(int i=0;i<MAXSIZE;i++) { if(i==j) Trans[i][j] = 1; else Trans[i][j] = 0; } } Trans[0][MAXSIZE-1] = Tx; Trans[1][MAXSIZE-1] = Ty; Draw(GREEN); Mult(Trans); Draw(MAGENTA); Print(); } void D_2::Rotate() { double ang; const double PI = 22.0/7; double xr,yr; double TransMat[MAXSIZE][MAXSIZE]; double RotMat[MAXSIZE][MAXSIZE]; double InvTransMat[MAXSIZE][MAXSIZE]; closegraph(); cout<<"Enter Angle Of Rotation: "; cin>>ang; cout<<"Enter Point Of Rotation:X: "; cin>>xr; cout<<"Y: "; cin>>yr; initialize(); ang = (PI * ang)/180.0; setcolor(YELLOW); setfillstyle(SOLID_FILL,YELLOW); fillellipse(x/2+xr,y/2-yr,2,2); outtextxy(x/2+xr,y/2-yr-2," Point Of Rotation"); //Transformation Matrix //Translate arbitrary point to origin then rotate then translate back. for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i == j) { TransMat[i][j] = 1; InvTransMat[i][j] = 1; RotMat[i][j] = 1; } else { TransMat[i][j] = 0; InvTransMat[i][j] = 0; RotMat[i][j] = 0; } } } TransMat[0][2] = -xr; TransMat[1][2] = -yr; InvTransMat[0][2] = xr; InvTransMat[1][2] = yr; RotMat[0][0] = cos(ang); RotMat[0][1] = -sin(ang); RotMat[1][0] = sin(ang); RotMat[1][1] = cos(ang); Draw(GREEN); Print(); MultTwoMat(InvTransMat,RotMat); MultTwoMat(RotMat,TransMat); Mult(TransMat); Draw(MAGENTA); } void D_2::Reflect() { double ang; double a,b,c; double xr,yr; double TransMat[MAXSIZE][MAXSIZE]; double RotMat[MAXSIZE][MAXSIZE]; double InvTransMat[MAXSIZE][MAXSIZE]; double InvRotMat[MAXSIZE][MAXSIZE]; double RefMat[MAXSIZE][MAXSIZE]; closegraph(); cout<<"Enter The Line (ax+by+c=0): "; cout<<"a: "; cin>>a; cout<<"b: "; cin>>b; cout<<"c: "; cin>>c; if(b!=0) { yr = (-c/b); xr = 0; double m = -a/b; ang = atan(m); } else { yr = 0; xr = (-c/a); ang = 22.0/14.0; // Angle = PI/2 } initialize(); //Transformation Matrix //Translate arbitrary point to origin then rotate then translate back. for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i == j) { TransMat[i][j] = 1; InvTransMat[i][j] = 1; RotMat[i][j] = 1; InvRotMat[i][j] = 1; RefMat[i][j] = 1; } else { TransMat[i][j] = 0; InvTransMat[i][j] = 0; RotMat[i][j] = 0; InvRotMat[i][j] = 0; RefMat[i][j] = 0; } } } TransMat[0][2] = -xr; TransMat[1][2] = -yr; InvTransMat[0][2] = xr; InvTransMat[1][2] = yr; RotMat[0][0] = cos(ang); RotMat[0][1] = sin(ang); RotMat[1][0] = -sin(ang); RotMat[1][1] = cos(ang); InvRotMat[0][0] = cos(ang); InvRotMat[0][1] = -sin(ang); InvRotMat[1][0] = sin(ang); InvRotMat[1][1] = cos(ang); for(i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i==j) RefMat[i][j] = pow(-1,i)*1; else RefMat[i][j] = 0; } } Print(); Draw(GREEN); MultTwoMat(InvTransMat,InvRotMat); MultTwoMat(InvRotMat,RefMat); MultTwoMat(RefMat,RotMat); MultTwoMat(RotMat,TransMat); Mult(TransMat); Draw(MAGENTA); } void D_2::Shear() { double ang; double a,b,c; double xr,yr,shx; double TransMat[MAXSIZE][MAXSIZE]; double RotMat[MAXSIZE][MAXSIZE]; double InvTransMat[MAXSIZE][MAXSIZE]; double InvRotMat[MAXSIZE][MAXSIZE]; double ShearMat[MAXSIZE][MAXSIZE]; closegraph(); cout<<"Enter The Line (ax+by+c=0): "; cout<<"a: "; cin>>a; cout<<"b: "; cin>>b; cout<<"c: "; cin>>c; cout<<"Enter Shearing Factor Along X-Axis: "; cin>>shx; if(b!=0) { yr = (-c/b); xr = 0; double m = -a/b; ang = atan(m); } else { yr = 0; xr = (-c/a); ang = 22.0/14.0; // Angle = PI/2 } initialize(); //Transformation Matrix for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i == j) { TransMat[i][j] = 1; InvTransMat[i][j] = 1; RotMat[i][j] = 1; InvRotMat[i][j] = 1; ShearMat[i][j] = 1; } else { TransMat[i][j] = 0; InvTransMat[i][j] = 0; RotMat[i][j] = 0; InvRotMat[i][j] = 0; ShearMat[i][j] = 0; } } } TransMat[0][2] = -xr; TransMat[1][2] = -yr; InvTransMat[0][2] = xr; InvTransMat[1][2] = yr; RotMat[0][0] = cos(ang); RotMat[0][1] = sin(ang); RotMat[1][0] = -sin(ang); RotMat[1][1] = cos(ang); InvRotMat[0][0] = cos(ang); InvRotMat[0][1] = -sin(ang); InvRotMat[1][0] = sin(ang); InvRotMat[1][1] = cos(ang); ShearMat[0][1] = shx; Print(); Draw(GREEN); MultTwoMat(InvTransMat,InvRotMat); MultTwoMat(InvRotMat,ShearMat); MultTwoMat(ShearMat,RotMat); MultTwoMat(RotMat,TransMat); Mult(TransMat); Draw(MAGENTA); } void D_2::Scale_Fixed() { double sx,sy; double xr,yr; double TransMat[MAXSIZE][MAXSIZE]; double ScaleMat[MAXSIZE][MAXSIZE]; double InvTransMat[MAXSIZE][MAXSIZE]; closegraph(); cout<<"Enter The Scaling Factor Along X-Axis: "; cin>>sx; cout<<"Enter The Scaling Factor Along Y-Axis: "; cin>>sy; cout<<"Enter Point Of Scaling:X: "; cin>>xr; cout<<"Y: "; cin>>yr; initialize(); //Transformation Matrix for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i == j) { TransMat[i][j] = 1; InvTransMat[i][j] = 1; ScaleMat[i][j] = 1; } else { TransMat[i][j] = 0; InvTransMat[i][j] = 0; ScaleMat[i][j] = 0; } } } TransMat[0][2] = -xr; TransMat[1][2] = -yr; InvTransMat[0][2] = xr; InvTransMat[1][2] = yr; ScaleMat[0][0] = sx; ScaleMat[1][1] = sy; Draw(GREEN); Print(); MultTwoMat(InvTransMat,ScaleMat); MultTwoMat(ScaleMat,TransMat); Mult(TransMat); Draw(MAGENTA); } void D_2::Scale_Dir() { double sx,sy; double ang; const double PI = 22.0/7; double RotMat[MAXSIZE][MAXSIZE]; double ScaleMat[MAXSIZE][MAXSIZE]; double InvRotMat[MAXSIZE][MAXSIZE]; closegraph(); cout<<"\n Enter The Scaling Factor Along X-Axis: "; cin>>sx; cout<<"\n Enter The Scaling Factor Along Y-Axis: "; cin>>sy; cout<<"\n Enter The Direction Of Scaling: "; cin>>ang; ang = (PI * ang)/180.0; initialize(); //Transformation Matrix for(int i=0;i<MAXSIZE;i++) { for(int j=0;j<MAXSIZE;j++) { if(i == j) { RotMat[i][j] = 1; InvRotMat[i][j] = 1; ScaleMat[i][j] = 1; } else { RotMat[i][j] = 0; InvRotMat[i][j] = 0; ScaleMat[i][j] = 0; } } } RotMat[0][0] = cos(ang); RotMat[0][1] = sin(ang); RotMat[1][0] = -sin(ang); RotMat[1][1] = cos(ang); InvRotMat[0][0] = cos(ang); InvRotMat[0][1] = -sin(ang); InvRotMat[1][0] = sin(ang); InvRotMat[1][1] = cos(ang); ScaleMat[0][0] = sx; ScaleMat[1][1] = sy; Draw(GREEN); Print(); MultTwoMat(RotMat,ScaleMat); MultTwoMat(ScaleMat,InvRotMat); Mult(InvRotMat); Draw(MAGENTA); } void main() { D_2 D1; D1.DrawCord(); getch(); int ch; D1.GetPoints(); D1.Draw(GREEN); getch(); do { closegraph(); clrscr(); cout<<"\n 1.To ReDraw The Triangle."; cout<<"\n 2.Translate The Triangle."; cout<<"\n 3.Scaling The Triangle About Fixed Point."; cout<<"\n 4.Scaling The Triangle In A Direction."; cout<<"\n 5.Rotating The Triangle About Arbitrary Point."; cout<<"\n 6.Reflecting The Triangle About Arbitrary Line."; cout<<"\n 7.Shearing Of The Triangle."; cout<<"\n 8.Exit."; cout<<"\n Enter The Choice: "; cin>>ch; D1.initialize(); switch(ch) { case 1: D1.GetPoints(); D1.Draw(GREEN); getch(); break; case 2: cleardevice(); D1.Translate(); getch(); closegraph(); break; case 3: cleardevice(); D1.Scale_Fixed(); getch(); closegraph(); break; case 4: cleardevice(); D1.Scale_Dir(); getch(); closegraph(); break; case 5: cleardevice(); D1.Rotate(); getch(); closegraph(); break; case 6: cleardevice(); D1.Reflect(); getch(); closegraph(); break; case 7: cleardevice(); D1.Shear(); getch(); closegraph(); break; case 8: return; default: cout<<"WRONG CHOICE."; getch(); break; } }while(1); }
[ "noreply@github.com" ]
noreply@github.com
4762d48d75445b21096b761038302c8f55589060
7e2e2b6c563162025083d803464f0c5cbd9ba429
/Include/NinjaParty/Particles/EmitModifiers/RotationSpeedEmitModifier.hpp
cfdf77c995c5144109a1bdbb5849568e6a02b945
[ "MIT" ]
permissive
superowner/NinjaParty
61fe0c765b42fe3e74be92dff5d6bf6337d62b06
320665104158d7ad0c7b0d3841870e23f37213a7
refs/heads/master
2020-03-24T08:19:17.629263
2014-06-05T01:47:18
2014-06-05T01:47:18
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,164
hpp
#ifndef NINJAPARTY_ROTATIONSPEEDEMITMODIFIER_HPP #define NINJAPARTY_ROTATIONSPEEDEMITMODIFIER_HPP #include <iterator> #include <vector> #include <NinjaParty/Color.hpp> #include <NinjaParty/Random.hpp> #include <NinjaParty/Particles/Particle.hpp> #include <NinjaParty/Particles/EmitModifiers/EmitModifier.hpp> namespace NinjaParty { namespace Particles { class RotationSpeedEmitModifier : public EmitModifier { public: RotationSpeedEmitModifier(Random &random, float min, float max) : random(random), min(min), max(max) { } virtual ~RotationSpeedEmitModifier() { } void Process(Particle *particles, int count) { for(int i=0; i<count; i++) { Particle &p = particles[i]; p.rotationSpeed = random.NextFloat(min, max); } } private: Random &random; float min, max; }; } } #endif//NINJAPARTY_ROTATIONSPEEDEMITMODIFIER_HPP
[ "jesse@thirdpartyninjas.com" ]
jesse@thirdpartyninjas.com
748c0d4ecef9ab831bc4a6411d31ce4a15e723c2
b716c7d90049ae871e3ff33d6f9ef4e9b26419fe
/src/ZZMatrixElement/MEKD/src/MEKD_MG.cpp
6e6f79d957d5a00489e52206ab9cf3020c30742a
[]
no_license
scooperstein/UWHiggsZHBackup
14c2fa7f700c54233bbb97fec6fa27ce6dcc169d
4bc57d71a9a11811f1ddc854afe1fbb8a21ac409
refs/heads/master
2016-09-11T03:22:56.784768
2014-05-27T17:38:26
2014-05-27T17:38:26
null
0
0
null
null
null
null
UTF-8
C++
false
false
138,847
cpp
#ifndef MEKD_MG_cpp #define MEKD_MG_cpp /// C++ libraries #include <iostream> // #include <fstream> #include <sstream> #include <string> #include <vector> #include <algorithm> // for sorting #include <cmath> /// CMSSW includes #ifndef MEKD_STANDALONE #include "FWCore/ParameterSet/interface/FileInPath.h" #endif /// MEs, ZZ #include "MadGraphSrc/BKG_DN_OF.h" #include "MadGraphSrc/BKG_DN_SF.h" #include "MadGraphSrc/BKG_UP_OF.h" #include "MadGraphSrc/BKG_UP_SF.h" #include "MadGraphSrc/BKG_DN_OFpA.h" #include "MadGraphSrc/BKG_DN_SFpA.h" #include "MadGraphSrc/BKG_UP_OFpA.h" #include "MadGraphSrc/BKG_UP_SFpA.h" #include "MadGraphSrc/Spin0_gg_OF.h" #include "MadGraphSrc/Spin0_gg_SF.h" #include "MadGraphSrc/Spin0_gg_OFpA.h" #include "MadGraphSrc/Spin0_gg_SFpA.h" #include "MadGraphSrc/Spin0_qq_DN_OF.h" #include "MadGraphSrc/Spin0_qq_DN_SF.h" #include "MadGraphSrc/Spin0_qq_UP_OF.h" #include "MadGraphSrc/Spin0_qq_UP_SF.h" #include "MadGraphSrc/Spin0_qq_DN_OFpA.h" #include "MadGraphSrc/Spin0_qq_DN_SFpA.h" #include "MadGraphSrc/Spin0_qq_UP_OFpA.h" #include "MadGraphSrc/Spin0_qq_UP_SFpA.h" #include "MadGraphSrc/Spin1_DN_OF.h" #include "MadGraphSrc/Spin1_DN_SF.h" #include "MadGraphSrc/Spin1_UP_OF.h" #include "MadGraphSrc/Spin1_UP_SF.h" #include "MadGraphSrc/Spin1_DN_OFpA.h" #include "MadGraphSrc/Spin1_DN_SFpA.h" #include "MadGraphSrc/Spin1_UP_OFpA.h" #include "MadGraphSrc/Spin1_UP_SFpA.h" #include "MadGraphSrc/Spin2_gg_OF.h" #include "MadGraphSrc/Spin2_gg_SF.h" #include "MadGraphSrc/Spin2_gg_OFpA.h" #include "MadGraphSrc/Spin2_gg_SFpA.h" #include "MadGraphSrc/Spin2_qq_DN_OF.h" #include "MadGraphSrc/Spin2_qq_DN_SF.h" #include "MadGraphSrc/Spin2_qq_UP_OF.h" #include "MadGraphSrc/Spin2_qq_UP_SF.h" #include "MadGraphSrc/Spin2_qq_DN_OFpA.h" #include "MadGraphSrc/Spin2_qq_DN_SFpA.h" #include "MadGraphSrc/Spin2_qq_UP_OFpA.h" #include "MadGraphSrc/Spin2_qq_UP_SFpA.h" #include "MadGraphSrc/Spin0_OF.h" #include "MadGraphSrc/Spin0_SF.h" #include "MadGraphSrc/Spin0_OFpA.h" #include "MadGraphSrc/Spin0_SFpA.h" #include "MadGraphSrc/Spin1_OF.h" #include "MadGraphSrc/Spin1_SF.h" #include "MadGraphSrc/Spin1_OFpA.h" #include "MadGraphSrc/Spin1_SFpA.h" #include "MadGraphSrc/Spin2_OF.h" #include "MadGraphSrc/Spin2_SF.h" #include "MadGraphSrc/Spin2_OFpA.h" #include "MadGraphSrc/Spin2_SFpA.h" /// MEs, 2mu #include "MadGraphSrc/BKG_DY_qq_DN_2l.h" #include "MadGraphSrc/BKG_DY_qq_UP_2l.h" #include "MadGraphSrc/BKG_DY_qq_DN_2lpA.h" #include "MadGraphSrc/BKG_DY_qq_UP_2lpA.h" #include "MadGraphSrc/Spin0_gg_2l.h" #include "MadGraphSrc/Spin0_gg_2lpA.h" #include "MadGraphSrc/Spin0_qq_DN_2l.h" #include "MadGraphSrc/Spin0_qq_UP_2l.h" #include "MadGraphSrc/Spin0_qq_DN_2lpA.h" #include "MadGraphSrc/Spin0_qq_UP_2lpA.h" #include "MadGraphSrc/Spin1_qq_DN_2l.h" #include "MadGraphSrc/Spin1_qq_UP_2l.h" #include "MadGraphSrc/Spin1_qq_DN_2lpA.h" #include "MadGraphSrc/Spin1_qq_UP_2lpA.h" #include "MadGraphSrc/Spin2_gg_2l.h" #include "MadGraphSrc/Spin2_gg_2lpA.h" #include "MadGraphSrc/Spin2_qq_DN_2l.h" #include "MadGraphSrc/Spin2_qq_UP_2l.h" #include "MadGraphSrc/Spin2_qq_DN_2lpA.h" #include "MadGraphSrc/Spin2_qq_UP_2lpA.h" extern "C" { #include "Extra_code/MEKD_CalcHEP_PDF.h" #include "PDFTables/pdt.h" } #include "Extra_code/MEKD_CalcHEP_Extra_functions.h" #include "Extra_code/MEKD_MG_Boosts.h" #include "higgs_properties/hggeffective.h" #include "MadGraphSrc/read_slha.h" #include "../interface/MEKD_MG.h" using namespace std; /// Part of pdfreader extern "C" pdtStr pdtSg, pdtSd, pdtSu, pdtSs, pdtSc, pdtSad, pdtSau, pdtSas, pdtSac; // #define PDTFILE "PDFTables/cteq6l.pdt" // CalCHEP reads a table for CTEQ6L. You can change PDF set as you want. /// ZZ decay mode BKG_DN_OF ME_Background_ZZ_qq_DownType_OF; BKG_DN_SF ME_Background_ZZ_qq_DownType_SF; BKG_UP_OF ME_Background_ZZ_qq_UpType_OF; BKG_UP_SF ME_Background_ZZ_qq_UpType_SF; BKG_DN_OFpA ME_Background_ZZ_qq_DownType_OFpA; BKG_DN_SFpA ME_Background_ZZ_qq_DownType_SFpA; BKG_UP_OFpA ME_Background_ZZ_qq_UpType_OFpA; BKG_UP_SFpA ME_Background_ZZ_qq_UpType_SFpA; Spin0_gg_OF ME_Signal_Spin0_gg_OF; Spin0_gg_SF ME_Signal_Spin0_gg_SF; Spin0_gg_OFpA ME_Signal_Spin0_gg_OFpA; Spin0_gg_SFpA ME_Signal_Spin0_gg_SFpA; Spin0_qq_DN_OF ME_Signal_Spin0_qq_DownType_OF; Spin0_qq_DN_SF ME_Signal_Spin0_qq_DownType_SF; Spin0_qq_UP_OF ME_Signal_Spin0_qq_UpType_OF; Spin0_qq_UP_SF ME_Signal_Spin0_qq_UpType_SF; Spin0_qq_DN_OFpA ME_Signal_Spin0_qq_DownType_OFpA; Spin0_qq_DN_SFpA ME_Signal_Spin0_qq_DownType_SFpA; Spin0_qq_UP_OFpA ME_Signal_Spin0_qq_UpType_OFpA; Spin0_qq_UP_SFpA ME_Signal_Spin0_qq_UpType_SFpA; Spin1_DN_OF ME_Signal_Spin1_qq_DownType_OF; Spin1_DN_SF ME_Signal_Spin1_qq_DownType_SF; Spin1_UP_OF ME_Signal_Spin1_qq_UpType_OF; Spin1_UP_SF ME_Signal_Spin1_qq_UpType_SF; Spin1_DN_OFpA ME_Signal_Spin1_qq_DownType_OFpA; Spin1_DN_SFpA ME_Signal_Spin1_qq_DownType_SFpA; Spin1_UP_OFpA ME_Signal_Spin1_qq_UpType_OFpA; Spin1_UP_SFpA ME_Signal_Spin1_qq_UpType_SFpA; Spin2_gg_OF ME_Signal_Spin2_gg_OF; Spin2_gg_SF ME_Signal_Spin2_gg_SF; Spin2_gg_OFpA ME_Signal_Spin2_gg_OFpA; Spin2_gg_SFpA ME_Signal_Spin2_gg_SFpA; Spin2_qq_DN_OF ME_Signal_Spin2_qq_DownType_OF; Spin2_qq_DN_SF ME_Signal_Spin2_qq_DownType_SF; Spin2_qq_UP_OF ME_Signal_Spin2_qq_UpType_OF; Spin2_qq_UP_SF ME_Signal_Spin2_qq_UpType_SF; Spin2_qq_DN_OFpA ME_Signal_Spin2_qq_DownType_OFpA; Spin2_qq_DN_SFpA ME_Signal_Spin2_qq_DownType_SFpA; Spin2_qq_UP_OFpA ME_Signal_Spin2_qq_UpType_OFpA; Spin2_qq_UP_SFpA ME_Signal_Spin2_qq_UpType_SFpA; /// ZZ decay mode. 4l-decays without initial states Spin0_OF ME_Signal_Spin0_OF; Spin0_SF ME_Signal_Spin0_SF; Spin0_OFpA ME_Signal_Spin0_OFpA; Spin0_SFpA ME_Signal_Spin0_SFpA; Spin1_OF ME_Signal_Spin1_OF; Spin1_SF ME_Signal_Spin1_SF; Spin1_OFpA ME_Signal_Spin1_OFpA; Spin1_SFpA ME_Signal_Spin1_SFpA; Spin2_OF ME_Signal_Spin2_OF; Spin2_SF ME_Signal_Spin2_SF; Spin2_OFpA ME_Signal_Spin2_OFpA; Spin2_SFpA ME_Signal_Spin2_SFpA; /// 2mu decay mode BKG_DY_qq_DN_2l ME_Background_DY_qq_DownType_2l; BKG_DY_qq_UP_2l ME_Background_DY_qq_UpType_2l; BKG_DY_qq_DN_2lpA ME_Background_DY_qq_DownType_2lpA; BKG_DY_qq_UP_2lpA ME_Background_DY_qq_UpType_2lpA; Spin0_gg_2l ME_Signal_Spin0_gg_2l; Spin0_gg_2lpA ME_Signal_Spin0_gg_2lpA; Spin0_qq_DN_2l ME_Signal_Spin0_qq_DownType_2l; Spin0_qq_UP_2l ME_Signal_Spin0_qq_UpType_2l; Spin0_qq_DN_2lpA ME_Signal_Spin0_qq_DownType_2lpA; Spin0_qq_UP_2lpA ME_Signal_Spin0_qq_UpType_2lpA; Spin1_qq_DN_2l ME_Signal_Spin1_qq_DownType_2l; Spin1_qq_UP_2l ME_Signal_Spin1_qq_UpType_2l; Spin1_qq_DN_2lpA ME_Signal_Spin1_qq_DownType_2lpA; Spin1_qq_UP_2lpA ME_Signal_Spin1_qq_UpType_2lpA; Spin2_gg_2l ME_Signal_Spin2_gg_2l; Spin2_gg_2lpA ME_Signal_Spin2_gg_2lpA; Spin2_qq_DN_2l ME_Signal_Spin2_qq_DownType_2l; Spin2_qq_UP_2l ME_Signal_Spin2_qq_UpType_2l; Spin2_qq_DN_2lpA ME_Signal_Spin2_qq_DownType_2lpA; Spin2_qq_UP_2lpA ME_Signal_Spin2_qq_UpType_2lpA; MEKD_MG::MEKD_MG() { Set_Default_MEKD_MG_Parameters(); /// Cross-cheking MEs for consistency. ZZ if( ME_Background_ZZ_qq_DownType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_DownType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_UpType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_UpType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_DownType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_DownType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_UpType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_ZZ_qq_UpType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_gg_OF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_gg_SF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_gg_OFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_gg_SFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_DownType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_DownType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_UpType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_UpType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_DownType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_DownType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_UpType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_UpType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_DownType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_DownType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_UpType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_UpType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_DownType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_DownType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_UpType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_UpType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_gg_OF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_gg_SF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_gg_OFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_gg_SFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_DownType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_DownType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_UpType_OF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_UpType_SF.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_DownType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_DownType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_UpType_OFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_UpType_SFpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } /// Cross-cheking MEs for consistency. ZZ, no initial state if( ME_Signal_Spin0_OF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_SF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_OFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_SFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_OF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_SF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_OFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_SFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_OF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_SF.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_OFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_SFpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } /// Cross-cheking MEs for consistency. 2mu if( ME_Background_DY_qq_DownType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_DY_qq_UpType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_DY_qq_DownType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Background_DY_qq_UpType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_gg_2l.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_gg_2lpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_DownType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_UpType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_DownType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin0_qq_UpType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_DownType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_UpType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_DownType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin1_qq_UpType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_gg_2l.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_gg_2lpA.nprocesses!=1 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_DownType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_UpType_2l.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_DownType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } if( ME_Signal_Spin2_qq_UpType_2lpA.nprocesses!=2 ) { cerr << "Problem in ME class detected. Exiting.\n"; exit(1); } p_set.push_back( new double[4] ); p_set.push_back( new double[4] ); p_set.push_back( new double[4] ); p_set.push_back( new double[4] ); p_set.push_back( new double[4] ); p_set.push_back( new double[4] ); p_set.push_back( new double[4] ); // a photon comes here, otherwise, unused p1 = new double[4]; p2 = new double[4]; p3 = new double[4]; p4 = new double[4]; p5 = new double[4]; id1 = 10000; id2 = 10000; id3 = 10000; id4 = 10000; id5 = 10000; id_set.push_back( id1 ); id_set.push_back( id2 ); id_set.push_back( id3 ); id_set.push_back( id4 ); id_set.push_back( id5 ); pl1_internal = NULL; pl2_internal = NULL; pl3_internal = NULL; pl4_internal = NULL; pA1_internal = NULL; Parameters_Are_Loaded = false; } MEKD_MG::~MEKD_MG() { if( Parameters_Are_Loaded ) Unload_pdfreader(); p_set.clear(); id_set.clear(); } int MEKD_MG::Load_Parameters() { Set_Of_Model_Parameters.read_slha_file( Parameter_file ); /// Initializing parameters // ZZ ME_Background_ZZ_qq_UpType_SF.initProc( Parameter_file ); ME_Background_ZZ_qq_UpType_OF.initProc( Parameter_file ); ME_Background_ZZ_qq_DownType_SF.initProc( Parameter_file ); ME_Background_ZZ_qq_DownType_OF.initProc( Parameter_file ); ME_Background_ZZ_qq_UpType_SFpA.initProc( Parameter_file ); ME_Background_ZZ_qq_UpType_OFpA.initProc( Parameter_file ); ME_Background_ZZ_qq_DownType_SFpA.initProc( Parameter_file ); ME_Background_ZZ_qq_DownType_OFpA.initProc( Parameter_file ); ME_Signal_Spin0_gg_SF.initProc( Parameter_file ); ME_Signal_Spin0_gg_OF.initProc( Parameter_file ); ME_Signal_Spin0_gg_SFpA.initProc( Parameter_file ); ME_Signal_Spin0_gg_OFpA.initProc( Parameter_file ); ME_Signal_Spin0_qq_DownType_SF.initProc( Parameter_file ); ME_Signal_Spin0_qq_DownType_OF.initProc( Parameter_file ); ME_Signal_Spin0_qq_UpType_SF.initProc( Parameter_file ); ME_Signal_Spin0_qq_UpType_OF.initProc( Parameter_file ); ME_Signal_Spin0_qq_DownType_SFpA.initProc( Parameter_file ); ME_Signal_Spin0_qq_DownType_OFpA.initProc( Parameter_file ); ME_Signal_Spin0_qq_UpType_SFpA.initProc( Parameter_file ); ME_Signal_Spin0_qq_UpType_OFpA.initProc( Parameter_file ); ME_Signal_Spin1_qq_DownType_SF.initProc( Parameter_file ); ME_Signal_Spin1_qq_DownType_OF.initProc( Parameter_file ); ME_Signal_Spin1_qq_UpType_SF.initProc( Parameter_file ); ME_Signal_Spin1_qq_UpType_OF.initProc( Parameter_file ); ME_Signal_Spin1_qq_DownType_SFpA.initProc( Parameter_file ); ME_Signal_Spin1_qq_DownType_OFpA.initProc( Parameter_file ); ME_Signal_Spin1_qq_UpType_SFpA.initProc( Parameter_file ); ME_Signal_Spin1_qq_UpType_OFpA.initProc( Parameter_file ); ME_Signal_Spin2_gg_SF.initProc( Parameter_file ); ME_Signal_Spin2_gg_OF.initProc( Parameter_file ); ME_Signal_Spin2_gg_SFpA.initProc( Parameter_file ); ME_Signal_Spin2_gg_OFpA.initProc( Parameter_file ); ME_Signal_Spin2_qq_DownType_SF.initProc( Parameter_file ); ME_Signal_Spin2_qq_DownType_OF.initProc( Parameter_file ); ME_Signal_Spin2_qq_UpType_SF.initProc( Parameter_file ); ME_Signal_Spin2_qq_UpType_OF.initProc( Parameter_file ); ME_Signal_Spin2_qq_DownType_SFpA.initProc( Parameter_file ); ME_Signal_Spin2_qq_DownType_OFpA.initProc( Parameter_file ); ME_Signal_Spin2_qq_UpType_SFpA.initProc( Parameter_file ); ME_Signal_Spin2_qq_UpType_OFpA.initProc( Parameter_file ); // ZZ, no itial state ME_Signal_Spin0_SF.initProc( Parameter_file ); ME_Signal_Spin0_OF.initProc( Parameter_file ); ME_Signal_Spin0_SFpA.initProc( Parameter_file ); ME_Signal_Spin0_OFpA.initProc( Parameter_file ); ME_Signal_Spin1_SF.initProc( Parameter_file ); ME_Signal_Spin1_OF.initProc( Parameter_file ); ME_Signal_Spin1_SFpA.initProc( Parameter_file ); ME_Signal_Spin1_OFpA.initProc( Parameter_file ); ME_Signal_Spin2_SF.initProc( Parameter_file ); ME_Signal_Spin2_OF.initProc( Parameter_file ); ME_Signal_Spin2_SFpA.initProc( Parameter_file ); ME_Signal_Spin2_OFpA.initProc( Parameter_file ); // 2mu ME_Background_DY_qq_UpType_2l.initProc( Parameter_file ); ME_Background_DY_qq_DownType_2l.initProc( Parameter_file ); ME_Background_DY_qq_UpType_2lpA.initProc( Parameter_file ); ME_Background_DY_qq_DownType_2lpA.initProc( Parameter_file ); ME_Signal_Spin0_gg_2l.initProc( Parameter_file ); ME_Signal_Spin0_gg_2lpA.initProc( Parameter_file ); ME_Signal_Spin0_qq_DownType_2l.initProc( Parameter_file ); ME_Signal_Spin0_qq_UpType_2l.initProc( Parameter_file ); ME_Signal_Spin0_qq_DownType_2lpA.initProc( Parameter_file ); ME_Signal_Spin0_qq_UpType_2lpA.initProc( Parameter_file ); ME_Signal_Spin1_qq_DownType_2l.initProc( Parameter_file ); ME_Signal_Spin1_qq_UpType_2l.initProc( Parameter_file ); ME_Signal_Spin1_qq_DownType_2lpA.initProc( Parameter_file ); ME_Signal_Spin1_qq_UpType_2lpA.initProc( Parameter_file ); ME_Signal_Spin2_gg_2l.initProc( Parameter_file ); ME_Signal_Spin2_gg_2lpA.initProc( Parameter_file ); ME_Signal_Spin2_qq_DownType_2l.initProc( Parameter_file ); ME_Signal_Spin2_qq_UpType_2l.initProc( Parameter_file ); ME_Signal_Spin2_qq_DownType_2lpA.initProc( Parameter_file ); ME_Signal_Spin2_qq_UpType_2lpA.initProc( Parameter_file ); params_m_d = Set_Of_Model_Parameters.get_block_entry( "mass", 1, 0 ); params_m_u = Set_Of_Model_Parameters.get_block_entry( "mass", 2, 0 ); params_m_s = Set_Of_Model_Parameters.get_block_entry( "mass", 3, 0 ); params_m_c = Set_Of_Model_Parameters.get_block_entry( "mass", 4, 0 ); params_m_e = Set_Of_Model_Parameters.get_block_entry( "mass", 11, 0 ); params_m_mu = Set_Of_Model_Parameters.get_block_entry( "mass", 13, 0 ); params_m_Z = Set_Of_Model_Parameters.get_block_entry( "mass", 23, 9.11876e+01 ); params_rhou11 = Set_Of_Model_Parameters.get_block_entry( "heff", 9, 0 ); params_rhou12 = Set_Of_Model_Parameters.get_block_entry( "heff", 10, 0 ); params_rhoc11 = Set_Of_Model_Parameters.get_block_entry( "heff", 11, 0 ); params_rhoc12 = Set_Of_Model_Parameters.get_block_entry( "heff", 12, 0 ); params_rhod11 = Set_Of_Model_Parameters.get_block_entry( "heff", 13, 0 ); params_rhod12 = Set_Of_Model_Parameters.get_block_entry( "heff", 14, 0 ); params_rhos11 = Set_Of_Model_Parameters.get_block_entry( "heff", 15, 0 ); params_rhos12 = Set_Of_Model_Parameters.get_block_entry( "heff", 16, 0 ); params_rhob11 = Set_Of_Model_Parameters.get_block_entry( "heff", 17, 0 ); params_rhob12 = Set_Of_Model_Parameters.get_block_entry( "heff", 18, 0 ); params_rhou11 = Set_Of_Model_Parameters.get_block_entry( "vec", 3, 0 ); params_rhou12 = Set_Of_Model_Parameters.get_block_entry( "vec", 4, 0 ); params_rhou13 = Set_Of_Model_Parameters.get_block_entry( "vec", 5, 0 ); params_rhou14 = Set_Of_Model_Parameters.get_block_entry( "vec", 6, 0 ); params_rhoc11 = Set_Of_Model_Parameters.get_block_entry( "vec", 7, 0 ); params_rhoc12 = Set_Of_Model_Parameters.get_block_entry( "vec", 8, 0 ); params_rhoc13 = Set_Of_Model_Parameters.get_block_entry( "vec", 9, 0 ); params_rhoc14 = Set_Of_Model_Parameters.get_block_entry( "vec", 10, 0 ); params_rhod11 = Set_Of_Model_Parameters.get_block_entry( "vec", 11, 0 ); params_rhod12 = Set_Of_Model_Parameters.get_block_entry( "vec", 12, 0 ); params_rhod13 = Set_Of_Model_Parameters.get_block_entry( "vec", 13, 0 ); params_rhod14 = Set_Of_Model_Parameters.get_block_entry( "vec", 14, 0 ); params_rhos11 = Set_Of_Model_Parameters.get_block_entry( "vec", 15, 0 ); params_rhos12 = Set_Of_Model_Parameters.get_block_entry( "vec", 16, 0 ); params_rhos13 = Set_Of_Model_Parameters.get_block_entry( "vec", 17, 0 ); params_rhos14 = Set_Of_Model_Parameters.get_block_entry( "vec", 18, 0 ); params_rhob11 = Set_Of_Model_Parameters.get_block_entry( "vec", 19, 0 ); params_rhob12 = Set_Of_Model_Parameters.get_block_entry( "vec", 20, 0 ); params_rhob13 = Set_Of_Model_Parameters.get_block_entry( "vec", 21, 0 ); params_rhob14 = Set_Of_Model_Parameters.get_block_entry( "vec", 22, 0 ); params_rhou21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 21, 0 ); params_rhou22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 22, 0 ); params_rhou23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 23, 0 ); params_rhou24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 24, 0 ); params_rhoc21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 25, 0 ); params_rhoc22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 26, 0 ); params_rhoc23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 27, 0 ); params_rhoc24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 28, 0 ); params_rhod21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 29, 0 ); params_rhod22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 30, 0 ); params_rhod23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 31, 0 ); params_rhod24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 32, 0 ); params_rhos21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 33, 0 ); params_rhos22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 34, 0 ); params_rhos23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 35, 0 ); params_rhos24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 36, 0 ); params_rhob21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 37, 0 ); params_rhob22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 38, 0 ); params_rhob23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 39, 0 ); params_rhob24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 40, 0 ); v_expectation = 1/sqrt( sqrt(2)*Set_Of_Model_Parameters.get_block_entry( "sminputs", 2, 1.166370e-05 ) ); hZZ_coupling = 2*params_m_Z*params_m_Z/v_expectation; Load_pdfreader( const_cast<char*>(PDF_file.c_str()) ); Parameters_Are_Loaded = true; return 0; } int MEKD_MG::Reload_Parameters() { if( !Parameters_Are_Loaded ) return 1; Set_Of_Model_Parameters.read_slha_file( static_cast<string>(Parameter_file) ); params_m_d = Set_Of_Model_Parameters.get_block_entry( "mass", 1, 0 ); params_m_u = Set_Of_Model_Parameters.get_block_entry( "mass", 2, 0 ); params_m_s = Set_Of_Model_Parameters.get_block_entry( "mass", 3, 0 ); params_m_c = Set_Of_Model_Parameters.get_block_entry( "mass", 4, 0 ); params_m_e = Set_Of_Model_Parameters.get_block_entry( "mass", 11, 0 ); params_m_mu = Set_Of_Model_Parameters.get_block_entry( "mass", 13, 0 ); params_m_Z = Set_Of_Model_Parameters.get_block_entry( "mass", 23, 9.11876e+01 ); params_rhou11 = Set_Of_Model_Parameters.get_block_entry( "vec", 3, 0 ); params_rhou12 = Set_Of_Model_Parameters.get_block_entry( "vec", 4, 0 ); params_rhou13 = Set_Of_Model_Parameters.get_block_entry( "vec", 5, 0 ); params_rhou14 = Set_Of_Model_Parameters.get_block_entry( "vec", 6, 0 ); params_rhoc11 = Set_Of_Model_Parameters.get_block_entry( "vec", 7, 0 ); params_rhoc12 = Set_Of_Model_Parameters.get_block_entry( "vec", 8, 0 ); params_rhoc13 = Set_Of_Model_Parameters.get_block_entry( "vec", 9, 0 ); params_rhoc14 = Set_Of_Model_Parameters.get_block_entry( "vec", 10, 0 ); params_rhod11 = Set_Of_Model_Parameters.get_block_entry( "vec", 11, 0 ); params_rhod12 = Set_Of_Model_Parameters.get_block_entry( "vec", 12, 0 ); params_rhod13 = Set_Of_Model_Parameters.get_block_entry( "vec", 13, 0 ); params_rhod14 = Set_Of_Model_Parameters.get_block_entry( "vec", 14, 0 ); params_rhos11 = Set_Of_Model_Parameters.get_block_entry( "vec", 15, 0 ); params_rhos12 = Set_Of_Model_Parameters.get_block_entry( "vec", 16, 0 ); params_rhos13 = Set_Of_Model_Parameters.get_block_entry( "vec", 17, 0 ); params_rhos14 = Set_Of_Model_Parameters.get_block_entry( "vec", 18, 0 ); params_rhob11 = Set_Of_Model_Parameters.get_block_entry( "vec", 19, 0 ); params_rhob12 = Set_Of_Model_Parameters.get_block_entry( "vec", 20, 0 ); params_rhob13 = Set_Of_Model_Parameters.get_block_entry( "vec", 21, 0 ); params_rhob14 = Set_Of_Model_Parameters.get_block_entry( "vec", 22, 0 ); params_rhou11 = Set_Of_Model_Parameters.get_block_entry( "heff", 9, 0 ); params_rhou12 = Set_Of_Model_Parameters.get_block_entry( "heff", 10, 0 ); params_rhoc11 = Set_Of_Model_Parameters.get_block_entry( "heff", 11, 0 ); params_rhoc12 = Set_Of_Model_Parameters.get_block_entry( "heff", 12, 0 ); params_rhod11 = Set_Of_Model_Parameters.get_block_entry( "heff", 13, 0 ); params_rhod12 = Set_Of_Model_Parameters.get_block_entry( "heff", 14, 0 ); params_rhos11 = Set_Of_Model_Parameters.get_block_entry( "heff", 15, 0 ); params_rhos12 = Set_Of_Model_Parameters.get_block_entry( "heff", 16, 0 ); params_rhob11 = Set_Of_Model_Parameters.get_block_entry( "heff", 17, 0 ); params_rhob12 = Set_Of_Model_Parameters.get_block_entry( "heff", 18, 0 ); params_rhou21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 21, 0 ); params_rhou22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 22, 0 ); params_rhou23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 23, 0 ); params_rhou24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 24, 0 ); params_rhoc21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 25, 0 ); params_rhoc22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 26, 0 ); params_rhoc23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 27, 0 ); params_rhoc24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 28, 0 ); params_rhod21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 29, 0 ); params_rhod22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 30, 0 ); params_rhod23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 31, 0 ); params_rhod24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 32, 0 ); params_rhos21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 33, 0 ); params_rhos22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 34, 0 ); params_rhos23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 35, 0 ); params_rhos24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 36, 0 ); params_rhob21 = Set_Of_Model_Parameters.get_block_entry( "gravity", 37, 0 ); params_rhob22 = Set_Of_Model_Parameters.get_block_entry( "gravity", 38, 0 ); params_rhob23 = Set_Of_Model_Parameters.get_block_entry( "gravity", 39, 0 ); params_rhob24 = Set_Of_Model_Parameters.get_block_entry( "gravity", 40, 0 ); v_expectation = 1/sqrt( sqrt(2)*Set_Of_Model_Parameters.get_block_entry( "sminputs", 2, 1.166370e-05 ) ); hZZ_coupling = 2*params_m_Z*params_m_Z/v_expectation; Unload_pdfreader(); Load_pdfreader( const_cast<char*>(PDF_file.c_str()) ); return 0; } void MEKD_MG::Set_Default_MEKD_MG_Parameters() { Boost_To_CM = true; // for a boosted data Debug_Mode = false; // Enable debugging mode // Force_g3_running = false; // unused. At some point was included for alpha_QCD Overwrite_e_and_mu_masses = false; // switch for manual m_e, m_mu masses Use_mh_eq_m4l = true; // Set mh to m4l for every event Use_Higgs_width = true; // if false, width is fixed to =1 Use_PDF_w_pT0 = true; // Use PDFs in the pT=0 frame. If true, Boost_To_CM is ignored Vary_signal_couplings = true; // Allow couplings to change with mass Warning_Mode = true; // Print warnings ContributionCoeff_d = 0; //42 /// the value has no effect if PDF is used but the variable is always used ContributionCoeff_u = 1; //217 ContributionCoeff_s = 0; //5 ContributionCoeff_c = 0; //3 // GG=0; // Assign QCD coupling, force g3 running if needed Sqrt_s = 8000; //Max energy, collision energy Electron_mass = 0; //0.0005109989, for enabled overwriting Higgs_mass = 126; // Works only if Use_mh_eq_m4l=false Higgs_width = 5.753088e-03; // Practically not used, for future implementations Muon_mass = 0; //0.10565837, for enabled overwriting Proton_mass = 0.93827205; // Always used if needed Final_state = "2e2m"; // Final state, for the moment: 4e, 4mu, 2e2mu Resonance_decay_mode = "ZZ"; // default: ZZ. Alternatives: 2mu Test_Model = "ggSpin0Pm"; // Models: ZZ, DY, Custom, CPevenScalar, ggSpin0Pm, ggSpin0M, ggSpin0Ph, qqSpin1P, qqSpin1M, ggSpin2Pm, ggSpin2Ph, ggSpin2Mh, ggSpin2Pb, qqSpin2Pm, qqSpin2Ph, qqSpin2Mh, qqSpin2Pb, Spin0Pm, Spin0M, Spin0Ph, Spin1P, Spin1M, Spin2Pm, Spin2Ph, Spin2Mh, Spin2Pb #ifndef MEKD_STANDALONE string inputParameterFile = "ZZMatrixElement/MEKD/src/Cards/param_card.dat"; // Location where a parameter card is stored string inputPDFFile = "ZZMatrixElement/MEKD/src/PDFTables/cteq6l.pdt"; // PDF/PDT table file edm::FileInPath parameterFileWithFullPath(inputParameterFile); edm::FileInPath pdfFileWithFullPath(inputPDFFile); Parameter_file = parameterFileWithFullPath.fullPath(); PDF_file = pdfFileWithFullPath.fullPath(); #else Parameter_file = "../src/Cards/param_card.dat"; // Location where a parameter card is stored PDF_file = "../src/PDFTables/cteq6l.pdt"; // PDF/PDT table file #endif } int MEKD_MG::Run_MEKD_MG() { if( !Parameters_Are_Loaded ) Load_Parameters(); if( Arrange_Internal_pls() == 1 ) { cerr << "Particle id error. Exiting.\n"; exit(1); } double CollisionE; PDFx1 = 0; PDFx2 = 0; Background_ME = 0; Signal_ME = 0; if( Overwrite_e_and_mu_masses ) { Set_Of_Model_Parameters.set_block_entry( "mass", 11, Electron_mass ); Set_Of_Model_Parameters.set_block_entry( "mass", 13, Muon_mass ); params_m_e = Electron_mass; params_m_mu = Muon_mass; } if( Final_state == "4e" || Final_state == "4eA" ) { ml1=Set_Of_Model_Parameters.get_block_entry( "mass", 11, Electron_mass ); ml2=ml1; ml3=ml1; ml4=ml1; } if( Final_state == "4m" || Final_state == "4mu" || Final_state == "4mA" || Final_state == "4muA" ) { ml1=Set_Of_Model_Parameters.get_block_entry( "mass", 13, Muon_mass ); ml2=ml1; ml3=ml1; ml4=ml1; } if( Final_state == "2e2m" || Final_state == "2e2mu" || Final_state == "2e2mA" || Final_state == "2e2muA" ) { ml1=Set_Of_Model_Parameters.get_block_entry( "mass", 11, Electron_mass ); ml2=ml1; ml3=Set_Of_Model_Parameters.get_block_entry( "mass", 13, Muon_mass ); ml4=ml3; } if( Final_state == "2m" || Final_state == "2mu" || Final_state == "2mA" || Final_state == "2muA" ) { ml1=Set_Of_Model_Parameters.get_block_entry( "mass", 13, Muon_mass ); ml2=ml1; ml3=0; ml4=0; } /// No boosting setup for initial partons for( int i=0; i<4; i++ ) { p_set[0][i] = 0; p_set[1][i] = 0; if( pl1_internal == NULL ) p_set[2][i] = 0; else p_set[2][i] = pl1_internal[i]; if( pl2_internal == NULL ) p_set[3][i] = 0; else p_set[3][i] = pl2_internal[i]; if( pl3_internal == NULL ) p_set[4][i] = 0; else p_set[4][i] = pl3_internal[i]; if( pl4_internal == NULL ) p_set[5][i] = 0; else p_set[5][i] = pl4_internal[i]; if( pA1_internal == NULL ) p_set[6][i] = 0; else p_set[6][i] = pA1_internal[i]; } PDFx1 = ( (p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]) + (p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3]) )/Sqrt_s; PDFx2 = ( (p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]) - (p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3]) )/Sqrt_s; // 0 mass approximation p_set[0][0] = 0.5*PDFx1*Sqrt_s; p_set[0][1] = 0; p_set[0][2] = 0; p_set[0][3] = 0.5*PDFx1*Sqrt_s; // to be updated p_set[1][0] = 0.5*PDFx2*Sqrt_s; p_set[1][1] = 0; p_set[1][2] = 0; p_set[1][3] = -0.5*PDFx2*Sqrt_s; // to be updated /// Calculate values needed for the PDF in the pT=0 frame if( Use_PDF_w_pT0 ) { p_set[0][0] = Sqrt_s/2; p_set[1][0] = Sqrt_s/2; // p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - Proton_mass*Proton_mass ); // p_set[1][3] = -p_set[0][3]; // /// Using forward-beam approximation // Boost_4p_and_2p_2_pT0( ml1, p_set[2], ml2, p_set[3], ml3, p_set[4], ml4, p_set[5], Proton_mass, p_set[0], Proton_mass, p_set[1] ); // Boost_4p_2_pT0( ml1, p_set[2], ml2, p_set[3], ml3, p_set[4], ml4, p_set[5] ); Boost_5p_2_pT0( ml1, p_set[2], ml2, p_set[3], ml3, p_set[4], ml4, p_set[5], 0, p_set[6] ); PDFx1 = ( (p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]) + (p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3]) )/( 2*p_set[0][0] ); PDFx2 = ( (p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]) - (p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3]) )/( 2*p_set[0][0] ); /// Setting up partons p_set[0][0]*= PDFx1; p_set[0][1] = 0; p_set[0][2] = 0; p_set[0][3] = 0; // to be updated p_set[1][0]*= PDFx2; p_set[1][1] = 0; p_set[1][2] = 0; p_set[1][3] = 0; // to be updated if( Debug_Mode ) { printf( "Coefficients for PDF ( x1, x2 ): ( %.10E, %.10E )\n", PDFx1, PDFx2 ); } } /// If flag is true, boost to CM frame iff PDF is NOT included. if( Boost_To_CM && !Use_PDF_w_pT0 ) { // Boost2CM( ml1, p_set[2], ml2, p_set[3], ml3, p_set[4], ml4, p_set[5] ); Boost2CM( ml1, p_set[2], ml2, p_set[3], ml3, p_set[4], ml4, p_set[5], 0, p_set[6] ); CollisionE = p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]; p_set[0][0] = CollisionE/2; p_set[1][0] = CollisionE/2; } Mass_4l = sqrt( (p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0])*(p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]) - (p_set[2][1]+p_set[3][1]+p_set[4][1]+p_set[5][1]+p_set[6][1])*(p_set[2][1]+p_set[3][1]+p_set[4][1]+p_set[5][1]+p_set[6][1]) - (p_set[2][2]+p_set[3][2]+p_set[4][2]+p_set[5][2]+p_set[6][2])*(p_set[2][2]+p_set[3][2]+p_set[4][2]+p_set[5][2]+p_set[6][2]) - (p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3])*(p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3]) ); /// Pick quark flavors to use if PDFs are not set. Normalizing coefficients here. if( !Use_PDF_w_pT0 ) { buffer = new double; (*buffer) = ( ContributionCoeff_d+ContributionCoeff_u+ContributionCoeff_s+ContributionCoeff_c ); ContributionCoeff_d = (ContributionCoeff_d)/(*buffer); ContributionCoeff_u = (ContributionCoeff_u)/(*buffer); ContributionCoeff_c = (ContributionCoeff_c)/(*buffer); ContributionCoeff_s = (ContributionCoeff_s)/(*buffer); delete buffer; } if( Debug_Mode ) { printf( "Energy of Parton 1: %.10E\nEnergy of Parton 2: %.10E\n", p_set[0][0], p_set[1][0] ); printf( "Final-state four-momenta entering ME (E px py px):\n" ); printf( "%.10E %.10E %.10E %.10E\n", p_set[2][0], p_set[2][1], p_set[2][2], p_set[2][3] ); printf( "%.10E %.10E %.10E %.10E\n", p_set[3][0], p_set[3][1], p_set[3][2], p_set[3][3] ); printf( "%.10E %.10E %.10E %.10E\n", p_set[4][0], p_set[4][1], p_set[4][2], p_set[4][3] ); printf( "%.10E %.10E %.10E %.10E\n", p_set[5][0], p_set[5][1], p_set[5][2], p_set[5][3] ); printf( "%.10E %.10E %.10E %.10E\n", p_set[6][0], p_set[6][1], p_set[6][2], p_set[6][3] ); printf( "Sum px=%.10E\n", (p_set[2][1]+p_set[3][1]+p_set[4][1]+p_set[5][1]+p_set[6][1]) ); printf( "Sum py=%.10E\n", (p_set[2][2]+p_set[3][2]+p_set[4][2]+p_set[5][2]+p_set[6][2]) ); printf( "Sum pz=%.10E\n", (p_set[2][3]+p_set[3][3]+p_set[4][3]+p_set[5][3]+p_set[6][3]) ); printf( "Sum E=%.10E\n", (p_set[2][0]+p_set[3][0]+p_set[4][0]+p_set[5][0]+p_set[6][0]) ); } /// Resonance mode alert if( Warning_Mode && Resonance_decay_mode == "ZZ" ) { if( Final_state!="4e" && Final_state!="4eA" && Final_state!="2e2m" && Final_state!="2e2mu" && Final_state!="2e2mA" && Final_state!="2e2muA" && Final_state!="4m" && Final_state!="4mu" && Final_state!="4mA" && Final_state!="4muA") cout << "WARNING! A mismatch between the resonance mode and the expected final state. Priority: final state.\n"; } if( Warning_Mode && Resonance_decay_mode == "2mu" ) { if( Final_state!="2m" && Final_state!="2mu" && Final_state!="2mA" && Final_state!="2muA" ) cout << "WARNING! A mismatch between the resonance mode and the expected final state. Priority: final state.\n"; } /// Background is interesting in any case, except for the Signal Runs if( Test_Model[0]!='!' ) Run_MEKD_MG_ME_BKG(); /// Signal ME(s) is(are) chosen here if( Test_Models.size() > 0 && Test_Model[0]!='!' ) { Signal_MEs.clear(); for( unsigned int i=0; i<Test_Models.size(); i++) { if( Test_Models[i]=="-1" || Test_Models[i]=="ZZ" || Test_Models[i]=="DY" ) { Run_MEKD_MG_ME_BKG(); Signal_ME=Background_ME; } if( Test_Models[i]=="0" || Test_Models[i]=="Custom" ) Run_MEKD_MG_ME_Custom(); if( Test_Models[i]=="1" || Test_Models[i]=="ggSpin0Pm" ) // SM Higgs Run_MEKD_MG_ME_Spin0Pm( "gg" ); if( Test_Models[i]=="2" || Test_Models[i]=="ggSpin0M" ) Run_MEKD_MG_ME_Spin0M( "gg" ); if( Test_Models[i]=="3" || Test_Models[i]=="ggSpin0Ph" ) Run_MEKD_MG_ME_Spin0Ph( "gg" ); if( Test_Models[i]=="4" || Test_Models[i]=="qqSpin1M" ) Run_MEKD_MG_ME_Spin1M( "qq" ); if( Test_Models[i]=="5" || Test_Models[i]=="qqSpin1P" ) Run_MEKD_MG_ME_Spin1P( "qq" ); if( Test_Models[i]=="6" || Test_Models[i]=="ggSpin2Pm" ) Run_MEKD_MG_ME_Spin2Pm( "gg" ); if( Test_Models[i]=="7" || Test_Models[i]=="qqSpin2Pm" ) Run_MEKD_MG_ME_Spin2Pm( "qq" ); if( Test_Models[i]=="8" || Test_Models[i]=="CPevenScalar" || Test_Models[i]=="CP-even" ) Run_MEKD_MG_ME_CPevenScalar( "gg" ); if( Test_Models[i]=="9" || Test_Models[i]=="ggSpin2Ph" ) Run_MEKD_MG_ME_Spin2Ph( "gg" ); if( Test_Models[i]=="10" || Test_Models[i]=="ggSpin2Mh" ) Run_MEKD_MG_ME_Spin2Mh( "gg" ); if( Test_Models[i]=="11" || Test_Models[i]=="ggSpin2Pb" ) Run_MEKD_MG_ME_Spin2Pb( "gg" ); if( Test_Models[i]=="12" || Test_Models[i]=="qqSpin2Ph" ) Run_MEKD_MG_ME_Spin2Ph( "qq" ); if( Test_Models[i]=="13" || Test_Models[i]=="qqSpin2Mh" ) Run_MEKD_MG_ME_Spin2Mh( "qq" ); if( Test_Models[i]=="14" || Test_Models[i]=="qqSpin2Pb" ) Run_MEKD_MG_ME_Spin2Pb( "qq" ); if( Test_Models[i]=="Spin0Pm" ) Run_MEKD_MG_ME_Spin0Pm( "NO" ); if( Test_Models[i]=="Spin0M" ) Run_MEKD_MG_ME_Spin0M( "NO" ); if( Test_Models[i]=="Spin0Ph" ) Run_MEKD_MG_ME_Spin0Ph( "NO" ); if( Test_Models[i]=="Spin1P" ) Run_MEKD_MG_ME_Spin1P( "NO" ); if( Test_Models[i]=="Spin1M" ) Run_MEKD_MG_ME_Spin1M( "NO" ); if( Test_Models[i]=="Spin2Pm" ) Run_MEKD_MG_ME_Spin2Pm( "NO" ); if( Test_Models[i]=="Spin2Ph" ) Run_MEKD_MG_ME_Spin2Ph( "NO" ); if( Test_Models[i]=="Spin2Mh" ) Run_MEKD_MG_ME_Spin2Mh( "NO" ); if( Test_Models[i]=="Spin2Pb" ) Run_MEKD_MG_ME_Spin2Pb( "NO" ); Signal_MEs.push_back( Signal_ME ); } } else { if( Test_Model=="-1" || Test_Model=="ZZ" || Test_Model=="DY" || Test_Model=="!-1" || Test_Model=="!ZZ" || Test_Model=="!DY" ) { Run_MEKD_MG_ME_BKG(); Signal_ME=Background_ME; } if( Test_Model=="0" || Test_Model=="Custom" || Test_Model=="!0" || Test_Model=="!Custom" ) Run_MEKD_MG_ME_Custom(); if( Test_Model=="1" || Test_Model=="ggSpin0Pm" || Test_Model=="!1" || Test_Model=="!ggSpin0Pm" ) // SM Higgs Run_MEKD_MG_ME_Spin0Pm( "gg" ); if( Test_Model=="2" || Test_Model=="ggSpin0M" || Test_Model=="!2" || Test_Model=="!ggSpin0M" ) Run_MEKD_MG_ME_Spin0M( "gg" ); if( Test_Model=="3" || Test_Model=="ggSpin0Ph" || Test_Model=="!3" || Test_Model=="!ggSpin0Ph" ) Run_MEKD_MG_ME_Spin0Ph( "gg" ); if( Test_Model=="4" || Test_Model=="qqSpin1M" || Test_Model=="!4" || Test_Model=="!qqSpin1M" ) Run_MEKD_MG_ME_Spin1M( "qq" ); if( Test_Model=="5" || Test_Model=="qqSpin1P" || Test_Model=="!5" || Test_Model=="!qqSpin1P" ) Run_MEKD_MG_ME_Spin1P( "qq" ); if( Test_Model=="6" || Test_Model=="ggSpin2Pm" || Test_Model=="!6" || Test_Model=="!ggSpin2Pm" ) Run_MEKD_MG_ME_Spin2Pm( "gg" ); if( Test_Model=="7" || Test_Model=="qqSpin2Pm" || Test_Model=="!7" || Test_Model=="!qqSpin2Pm" ) Run_MEKD_MG_ME_Spin2Pm( "qq" ); if( Test_Model=="8" || Test_Model=="CPevenScalar" || Test_Model=="CP-even" || Test_Model=="!8" || Test_Model=="!CPevenScalar" || Test_Model=="!CP-even" ) Run_MEKD_MG_ME_CPevenScalar( "gg" ); if( Test_Model=="9" || Test_Model=="ggSpin2Ph" || Test_Model=="!9" || Test_Model=="!ggSpin2Ph" ) Run_MEKD_MG_ME_Spin2Pm( "gg" ); if( Test_Model=="10" || Test_Model=="ggSpin2Mh" || Test_Model=="!10" || Test_Model=="!ggSpin2Mh" ) Run_MEKD_MG_ME_Spin2Pm( "gg" ); if( Test_Model=="11" || Test_Model=="ggSpin2Pb" || Test_Model=="!11" || Test_Model=="!ggSpin2Pb" ) Run_MEKD_MG_ME_Spin2Pm( "gg" ); if( Test_Model=="12" || Test_Model=="qqSpin2Ph" || Test_Model=="!12" || Test_Model=="!qqSpin2Ph" ) Run_MEKD_MG_ME_Spin2Pm( "qq" ); if( Test_Model=="13" || Test_Model=="qqSpin2Mh" || Test_Model=="!13" || Test_Model=="!qqSpin2Mh" ) Run_MEKD_MG_ME_Spin2Pm( "qq" ); if( Test_Model=="14" || Test_Model=="qqSpin2Pb" || Test_Model=="!14" || Test_Model=="!qqSpin2Pb" ) Run_MEKD_MG_ME_Spin2Pm( "qq" ); if( Test_Model=="Spin0Pm" || Test_Model=="!Spin0Pm" ) Run_MEKD_MG_ME_Spin0Pm( "NO" ); if( Test_Model=="Spin0M" || Test_Model=="!Spin0M" ) Run_MEKD_MG_ME_Spin0M( "NO" ); if( Test_Model=="Spin0Ph" || Test_Model=="!Spin0Ph" ) Run_MEKD_MG_ME_Spin0Ph( "NO" ); if( Test_Model=="Spin1P" || Test_Model=="!Spin1P" ) Run_MEKD_MG_ME_Spin1P( "NO" ); if( Test_Model=="Spin1M" || Test_Model=="!Spin1M" ) Run_MEKD_MG_ME_Spin1M( "NO" ); if( Test_Model=="Spin2Pm" || Test_Model=="!Spin2Pm" ) Run_MEKD_MG_ME_Spin2Pm( "NO" ); if( Test_Model=="Spin2Ph" || Test_Model=="!Spin2Ph" ) Run_MEKD_MG_ME_Spin2Ph( "NO" ); if( Test_Model=="Spin2Mh" || Test_Model=="!Spin2Mh" ) Run_MEKD_MG_ME_Spin2Mh( "NO" ); if( Test_Model=="Spin2Pb" || Test_Model=="!Spin2Pb" ) Run_MEKD_MG_ME_Spin2Pb( "NO" ); } if( Test_Model[0]!='!' ) KD = log( Signal_ME/Background_ME ); return 0; } int MEKD_MG::Run_MEKD_MG(string Input_Model) { buffer_string = Test_Model; Test_Model = "!"; Test_Model += Input_Model; error_value = Run_MEKD_MG(); Test_Model = buffer_string; return error_value; } ///#include "MEKD_MG_RunMEs.cpp" /////////////////////////////////// /// INCLUDED MEKD_MG_RunMEs.cpp /// /// code follows below /// /// /// /// Part responsible for ME /// /// calculations /// /////////////////////////////////// int MEKD_MG::Run_MEKD_MG_ME_BKG() { return Run_MEKD_MG_MEs_BKG( "qq" ); } int MEKD_MG::Run_MEKD_MG_ME_Custom() { if( (error_value=Run_MEKD_MG_MEs_SIG_Spin0( "gg" ))!=0 ) return error_value; buffer_Custom = Signal_ME; if( (error_value=Run_MEKD_MG_MEs_SIG_Spin1( "qq" ))!=0 ) return error_value; buffer_Custom += Signal_ME; if( (error_value=Run_MEKD_MG_MEs_SIG_Spin2( "gg" ))!=0 ) return error_value; buffer_Custom += Signal_ME; if( (error_value=Run_MEKD_MG_MEs_SIG_Spin2( "qq" ))!=0 ) return error_value; Signal_ME += buffer_Custom; return 0; } int MEKD_MG::Run_MEKD_MG_ME_Spin0Pm(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 2, 4*LmbdGG(Mass_4l) ); Set_Of_Model_Parameters.set_block_entry( "heff", 5, hZZ_coupling ); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 2, 4*LmbdGG(Higgs_mass) ); Set_Of_Model_Parameters.set_block_entry( "heff", 5, hZZ_coupling ); } } //gg Set_Of_Model_Parameters.set_block_entry( "heff", 1, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 6, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 7, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 8, 0 ); //qq params_rhou01 = 0; params_rhou02 = 0; params_rhoc01 = 0; params_rhoc02 = 0; params_rhod01 = 0; params_rhod02 = 0; params_rhos01 = 0; params_rhos02 = 0; params_rhob01 = 0; params_rhob02 = 0; return Run_MEKD_MG_MEs_SIG_Spin0( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_Spin0M(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 4, 4*LmbdGG(Mass_4l)*sqrt(3) ); Set_Of_Model_Parameters.set_block_entry( "heff", 8, 2*hZZ_coupling/params_m_Z/params_m_Z*sqrt(3) ); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 4, 4*LmbdGG(Higgs_mass)*sqrt(3) ); Set_Of_Model_Parameters.set_block_entry( "heff", 8, 2*hZZ_coupling/params_m_Z/params_m_Z*sqrt(3) ); } } //gg Set_Of_Model_Parameters.set_block_entry( "heff", 1, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 2, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 5, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 6, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 7, 0 ); //qq params_rhou01 = 0; params_rhou02 = 0; params_rhoc01 = 0; params_rhoc02 = 0; params_rhod01 = 0; params_rhod02 = 0; params_rhos01 = 0; params_rhos02 = 0; params_rhob01 = 0; params_rhob02 = 0; return Run_MEKD_MG_MEs_SIG_Spin0( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_CPevenScalar(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 1, 4*LmbdGG(Mass_4l)*Mass_4l*Mass_4l ); Set_Of_Model_Parameters.set_block_entry( "heff", 2, 4*LmbdGG(Mass_4l) ); Set_Of_Model_Parameters.set_block_entry( "heff", 3, 4*LmbdGG(Mass_4l)/Mass_4l/Mass_4l/Mass_4l/Mass_4l ); Set_Of_Model_Parameters.set_block_entry( "heff", 5, hZZ_coupling ); Set_Of_Model_Parameters.set_block_entry( "heff", 6, 2*hZZ_coupling/params_m_Z/params_m_Z ); Set_Of_Model_Parameters.set_block_entry( "heff", 7, hZZ_coupling/params_m_Z/params_m_Z/params_m_Z/params_m_Z); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 1, 4*LmbdGG(Higgs_mass)*Higgs_mass*Higgs_mass ); Set_Of_Model_Parameters.set_block_entry( "heff", 2, 4*LmbdGG(Higgs_mass) ); Set_Of_Model_Parameters.set_block_entry( "heff", 3, 4*LmbdGG(Higgs_mass)/Higgs_mass/Higgs_mass ); Set_Of_Model_Parameters.set_block_entry( "heff", 5, hZZ_coupling ); Set_Of_Model_Parameters.set_block_entry( "heff", 6, 2*hZZ_coupling/params_m_Z/params_m_Z ); Set_Of_Model_Parameters.set_block_entry( "heff", 7, hZZ_coupling/params_m_Z/params_m_Z/params_m_Z/params_m_Z ); } } //gg Set_Of_Model_Parameters.set_block_entry( "heff", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 8, 0 ); //qq params_rhou01 = 0; params_rhou02 = 0; params_rhoc01 = 0; params_rhoc02 = 0; params_rhod01 = 0; params_rhod02 = 0; params_rhos01 = 0; params_rhos02 = 0; params_rhob01 = 0; params_rhob02 = 0; return Run_MEKD_MG_MEs_SIG_Spin0( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_Spin0Ph(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 2, 4*LmbdGG(Mass_4l)*sqrt(3) ); Set_Of_Model_Parameters.set_block_entry( "heff", 6, 2*hZZ_coupling/params_m_Z/params_m_Z*sqrt(3) ); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000006, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000006, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "heff", 2, 4*LmbdGG(Higgs_mass)*sqrt(3) ); Set_Of_Model_Parameters.set_block_entry( "heff", 6, 2*hZZ_coupling/params_m_Z/params_m_Z*sqrt(3) ); } } //gg Set_Of_Model_Parameters.set_block_entry( "heff", 1, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 5, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 7, 0 ); Set_Of_Model_Parameters.set_block_entry( "heff", 8, 0 ); //qq params_rhou01 = 0; params_rhou02 = 0; params_rhoc01 = 0; params_rhoc02 = 0; params_rhod01 = 0; params_rhod02 = 0; params_rhos01 = 0; params_rhos02 = 0; params_rhob01 = 0; params_rhob02 = 0; return Run_MEKD_MG_MEs_SIG_Spin0( initial_state ); } /// A vector default configuration int MEKD_MG::Run_MEKD_MG_ME_Spin1M(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 300, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 300, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 300, 1 ); if( Vary_signal_couplings ) { //qq params_rhod11 = LmbdGG(Mass_4l)*v_expectation; params_rhos11 = LmbdGG(Mass_4l)*v_expectation; params_rhob11 = LmbdGG(Mass_4l)*v_expectation; params_rhou11 = LmbdGG(Mass_4l)*v_expectation; params_rhoc11 = LmbdGG(Mass_4l)*v_expectation; Set_Of_Model_Parameters.set_block_entry( "vec", 1, hZZ_coupling/2/params_m_Z ); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 300, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 300, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 300, 1 ); if( Vary_signal_couplings ) { //qq params_rhod11 = LmbdGG(Higgs_mass)*v_expectation; params_rhos11 = LmbdGG(Higgs_mass)*v_expectation; params_rhob11 = LmbdGG(Higgs_mass)*v_expectation; params_rhou11 = LmbdGG(Higgs_mass)*v_expectation; params_rhoc11 = LmbdGG(Higgs_mass)*v_expectation; Set_Of_Model_Parameters.set_block_entry( "vec", 1, hZZ_coupling/2/params_m_Z ); } } Set_Of_Model_Parameters.set_block_entry( "vec", 2, 0 ); //qq params_rhod12 = 0; params_rhod13 = 0; params_rhod14 = 0; params_rhos12 = 0; params_rhos13 = 0; params_rhos14 = 0; params_rhob12 = 0; params_rhob13 = 0; params_rhob14 = 0; params_rhou12 = 0; params_rhou13 = 0; params_rhou14 = 0; params_rhoc12 = 0; params_rhoc13 = 0; params_rhoc14 = 0; return Run_MEKD_MG_MEs_SIG_Spin1( initial_state ); } /// A pseudovector default configuration int MEKD_MG::Run_MEKD_MG_ME_Spin1P(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 300, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 300, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 300, 1 ); if( Vary_signal_couplings ) { //qq params_rhod12 = LmbdGG(Mass_4l)*v_expectation; params_rhos12 = LmbdGG(Mass_4l)*v_expectation; params_rhob12 = LmbdGG(Mass_4l)*v_expectation; params_rhou12 = LmbdGG(Mass_4l)*v_expectation; params_rhoc12 = LmbdGG(Mass_4l)*v_expectation; Set_Of_Model_Parameters.set_block_entry( "vec", 2, hZZ_coupling/4/params_m_Z ); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 300, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 300, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 300, 1 ); if( Vary_signal_couplings ) { //qq params_rhod12 = LmbdGG(Higgs_mass)*v_expectation; params_rhos12 = LmbdGG(Higgs_mass)*v_expectation; params_rhob12 = LmbdGG(Higgs_mass)*v_expectation; params_rhou12 = LmbdGG(Higgs_mass)*v_expectation; params_rhoc12 = LmbdGG(Higgs_mass)*v_expectation; Set_Of_Model_Parameters.set_block_entry( "vec", 2, hZZ_coupling/4/params_m_Z ); } } Set_Of_Model_Parameters.set_block_entry( "vec", 1, 0 ); //qq params_rhod11 = 0; params_rhod13 = 0; params_rhod14 = 0; params_rhos11 = 0; params_rhos13 = 0; params_rhos14 = 0; params_rhob11 = 0; params_rhob13 = 0; params_rhob14 = 0; params_rhou11 = 0; params_rhou13 = 0; params_rhou14 = 0; params_rhoc11 = 0; params_rhoc13 = 0; params_rhoc14 = 0; return Run_MEKD_MG_MEs_SIG_Spin1( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_Spin2Pm(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Mass_4l) ); //qq params_rhod21 = LmbdGG(Mass_4l); params_rhos21 = LmbdGG(Mass_4l); params_rhob21 = LmbdGG(Mass_4l); params_rhou21 = LmbdGG(Mass_4l); params_rhoc21 = LmbdGG(Mass_4l); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Higgs_mass) ); //qq params_rhod21 = LmbdGG(Higgs_mass); params_rhos21 = LmbdGG(Higgs_mass); params_rhob21 = LmbdGG(Higgs_mass); params_rhou21 = LmbdGG(Higgs_mass); params_rhoc21 = LmbdGG(Higgs_mass); } } //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 2, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 5, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 6, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 7, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 8, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 9, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 10, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 11, -hZZ_coupling/sqrt(2)/params_m_Z/params_m_Z ); // to match model: sqrt(2) -> 2 but numbers will go too low Set_Of_Model_Parameters.set_block_entry( "gravity", 12, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 13, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 14, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 15, hZZ_coupling/sqrt(2) ); // to match model: sqrt(2) -> 2 but numbers will go too low Set_Of_Model_Parameters.set_block_entry( "gravity", 16, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 17, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 18, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 19, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 20, 0 ); //qq // params_rhod21 = 0; params_rhod22 = 0; params_rhod23 = 0; params_rhod24 = 0; // params_rhos21 = 0; params_rhos22 = 0; params_rhos23 = 0; params_rhos24 = 0; // params_rhos21 = 0; params_rhob22 = 0; params_rhob23 = 0; params_rhob24 = 0; // params_rhos21 = 0; params_rhou22 = 0; params_rhou23 = 0; params_rhou24 = 0; // params_rhos21 = 0; params_rhoc22 = 0; params_rhoc23 = 0; params_rhoc24 = 0; return Run_MEKD_MG_MEs_SIG_Spin2( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_Spin2Ph(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Mass_4l) ); //qq params_rhod21 = LmbdGG(Mass_4l); params_rhos21 = LmbdGG(Mass_4l); params_rhob21 = LmbdGG(Mass_4l); params_rhou21 = LmbdGG(Mass_4l); params_rhoc21 = LmbdGG(Mass_4l); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Higgs_mass) ); //qq params_rhod21 = LmbdGG(Higgs_mass); params_rhos21 = LmbdGG(Higgs_mass); params_rhob21 = LmbdGG(Higgs_mass); params_rhou21 = LmbdGG(Higgs_mass); params_rhoc21 = LmbdGG(Higgs_mass); } } //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 2, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 5, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 6, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 7, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 8, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 9, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 10, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 11, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 12, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 13, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 14, hZZ_coupling/params_m_Z/params_m_Z/params_m_Z ); Set_Of_Model_Parameters.set_block_entry( "gravity", 15, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 16, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 17, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 18, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 19, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 20, 0 ); //qq // params_rhod21 = 0; params_rhod22 = 0; params_rhod23 = 0; params_rhod24 = 0; // params_rhos21 = 0; params_rhos22 = 0; params_rhos23 = 0; params_rhos24 = 0; // params_rhos21 = 0; params_rhob22 = 0; params_rhob23 = 0; params_rhob24 = 0; // params_rhos21 = 0; params_rhou22 = 0; params_rhou23 = 0; params_rhou24 = 0; // params_rhos21 = 0; params_rhoc22 = 0; params_rhoc23 = 0; params_rhoc24 = 0; return Run_MEKD_MG_MEs_SIG_Spin2( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_Spin2Mh(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Mass_4l) ); //qq params_rhod22 = LmbdGG(Mass_4l); params_rhos22 = LmbdGG(Mass_4l); params_rhob22 = LmbdGG(Mass_4l); params_rhou22 = LmbdGG(Mass_4l); params_rhoc22 = LmbdGG(Mass_4l); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Higgs_mass) ); //qq params_rhod22 = LmbdGG(Higgs_mass); params_rhos22 = LmbdGG(Higgs_mass); params_rhob22 = LmbdGG(Higgs_mass); params_rhou22 = LmbdGG(Higgs_mass); params_rhoc22 = LmbdGG(Higgs_mass); } } //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 2, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 5, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 6, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 7, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 8, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 9, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 10, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 11, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 12, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 13, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 14, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 15, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 16, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 17, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 18, hZZ_coupling/params_m_Z/params_m_Z/params_m_Z ); Set_Of_Model_Parameters.set_block_entry( "gravity", 19, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 20, 0 ); //qq params_rhod21 = 0; // params_rhod22 = 0; params_rhod23 = 0; params_rhod24 = 0; params_rhos21 = 0; // params_rhos22 = 0; params_rhos23 = 0; params_rhos24 = 0; params_rhos21 = 0; // params_rhob22 = 0; params_rhob23 = 0; params_rhob24 = 0; params_rhos21 = 0; // params_rhou22 = 0; params_rhou23 = 0; // params_rhou24 = 0; params_rhos21 = 0; params_rhoc22 = 0; params_rhoc23 = 0; params_rhoc24 = 0; return Run_MEKD_MG_MEs_SIG_Spin2( initial_state ); } int MEKD_MG::Run_MEKD_MG_ME_Spin2Pb(string initial_state) { if( Use_mh_eq_m4l ) { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Mass_4l ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, static_cast<double>( MEKD_CalcHEP_Extra::Higgs_width(Mass_4l) ) ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Mass_4l) ); //qq params_rhod21 = LmbdGG(Mass_4l); params_rhos21 = LmbdGG(Mass_4l); params_rhob21 = LmbdGG(Mass_4l); params_rhou21 = LmbdGG(Mass_4l); params_rhoc21 = LmbdGG(Mass_4l); } } else { Set_Of_Model_Parameters.set_block_entry( "mass", 9000007, Higgs_mass ); if( Use_Higgs_width ) Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, Higgs_width ); else Set_Of_Model_Parameters.set_block_entry( "decay", 9000007, 1 ); if( Vary_signal_couplings ) { //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 1, 4*LmbdGG(Higgs_mass) ); //qq params_rhod21 = LmbdGG(Higgs_mass); params_rhos21 = LmbdGG(Higgs_mass); params_rhob21 = LmbdGG(Higgs_mass); params_rhou21 = LmbdGG(Higgs_mass); params_rhoc21 = LmbdGG(Higgs_mass); } } //gg Set_Of_Model_Parameters.set_block_entry( "gravity", 2, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 3, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 4, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 5, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 6, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 7, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 8, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 9, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 10, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 11, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 12, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 13, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 14, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 15, hZZ_coupling ); Set_Of_Model_Parameters.set_block_entry( "gravity", 16, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 17, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 18, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 19, 0 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 20, 0 ); //qq // params_rhod21 = 0; params_rhod22 = 0; params_rhod23 = 0; params_rhod24 = 0; // params_rhos21 = 0; params_rhos22 = 0; params_rhos23 = 0; params_rhos24 = 0; // params_rhos21 = 0; params_rhob22 = 0; params_rhob23 = 0; params_rhob24 = 0; // params_rhos21 = 0; params_rhou22 = 0; params_rhou23 = 0; params_rhou24 = 0; // params_rhos21 = 0; params_rhoc22 = 0; params_rhoc23 = 0; params_rhoc24 = 0; return Run_MEKD_MG_MEs_SIG_Spin2( initial_state ); } int MEKD_MG::Run_MEKD_MG_MEs_BKG(string initial_state) { if( Final_state=="4e" || Final_state=="4eA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_e ); if( Final_state=="4eA" ) return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "SF", false ); } if( Final_state=="2e2m" || Final_state=="2e2mu" || Final_state=="2e2mA" || Final_state=="2e2muA" ) { /// Common mass for the opposite-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 11, params_m_e ); Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2e2mA" || Final_state=="2e2muA" ) return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "OF", true ); return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "OF", false ); } if( Final_state=="4m" || Final_state=="4mu" || Final_state=="4mA" || Final_state=="4muA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="4mA" || Final_state=="4muA" ) return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "SF", false ); } if( Final_state=="2m" || Final_state=="2mu" || Final_state=="2mA" || Final_state=="2muA" ) { /// Mass for the muons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2mA" || Final_state=="2muA" ) return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "2l", true ); return Run_MEKD_MG_MEs_BKG_Sub( initial_state, "2l", false ); } return 1; } int MEKD_MG::Run_MEKD_MG_MEs_SIG_Spin0(string initial_state) { if( Final_state=="4e" || Final_state=="4eA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_e ); if( Final_state=="4eA" ) return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "SF", false ); } if( Final_state=="2e2m" || Final_state=="2e2mu" || Final_state=="2e2mA" || Final_state=="2e2muA" ) { /// Common mass for the opposite-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 11, params_m_e ); Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2e2mA" || Final_state=="2e2muA" ) return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "OF", true ); return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "OF", false ); } if( Final_state=="4m" || Final_state=="4mu" || Final_state=="4mA" || Final_state=="4muA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="4mA" || Final_state=="4muA" ) return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "SF", false ); } if( Final_state=="2m" || Final_state=="2mu" || Final_state=="2mA" || Final_state=="2muA" ) { /// Mass for the muons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2mA" || Final_state=="2muA" ) return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "2l", true ); return Run_MEKD_MG_MEs_SIG_Spin0_Sub( initial_state, "2l", false ); } return 1; } int MEKD_MG::Run_MEKD_MG_MEs_SIG_Spin1(string initial_state) { if( Final_state=="4e" || Final_state=="4eA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_e ); if( Final_state=="4eA" ) return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "SF", false ); } if( Final_state=="2e2m" || Final_state=="2e2mu" || Final_state=="2e2mA" || Final_state=="2e2muA" ) { /// Common mass for the opposite-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 11, params_m_e ); Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2e2mA" || Final_state=="2e2muA" ) return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "OF", true ); return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "OF", false ); } if( Final_state=="4m" || Final_state=="4mu" || Final_state=="4mA" || Final_state=="4muA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="4mA" || Final_state=="4muA" ) return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "SF", false ); } if( Final_state=="2m" || Final_state=="2mu" || Final_state=="2mA" || Final_state=="2muA" ) { /// Mass for the muons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2mA" || Final_state=="2muA" ) return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "2l", true ); return Run_MEKD_MG_MEs_SIG_Spin1_Sub( initial_state, "2l", false ); } return 1; } int MEKD_MG::Run_MEKD_MG_MEs_SIG_Spin2(string initial_state) { if( Final_state=="4e" || Final_state=="4eA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_e ); if( Final_state=="4eA" ) return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "SF", false ); } if( Final_state=="2e2m" || Final_state=="2e2mu" || Final_state=="2e2mA" || Final_state=="2e2muA" ) { /// Common mass for the opposite-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 11, params_m_e ); Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2e2mA" || Final_state=="2e2muA" ) return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "OF", true ); return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "OF", false ); } if( Final_state=="4m" || Final_state=="4mu" || Final_state=="4mA" || Final_state=="4muA" ) { /// Common mass for the same-flavor leptons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="4mA" || Final_state=="4muA" ) return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "SF", true ); return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "SF", false ); } if( Final_state=="2m" || Final_state=="2mu" || Final_state=="2mA" || Final_state=="2muA" ) { /// Mass for the muons Set_Of_Model_Parameters.set_block_entry( "mass", 13, params_m_mu ); if( Final_state=="2mA" || Final_state=="2muA" ) return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "2l", true ); return Run_MEKD_MG_MEs_SIG_Spin2_Sub( initial_state, "2l", false ); } return 1; } int MEKD_MG::Run_MEKD_MG_MEs_BKG_Sub(string initial_state, string flavor, bool photon) { if( initial_state=="qq" ) { /// Down quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_d ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_d*params_m_d ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_d*params_m_d ); if( flavor == "SF" && !photon ) { ME_Background_ZZ_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_SF.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Background_ZZ_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_OF.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Background_DY_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_DownType_2l.setMomenta( p_set ); ME_Background_DY_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Background_ZZ_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_SFpA.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Background_ZZ_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_OFpA.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Background_DY_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_DownType_2lpA.setMomenta( p_set ); ME_Background_DY_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_d = pdfreader( 1, PDFx1, Mass_4l )*pdfreader( -1, PDFx2, Mass_4l ); Background_ME = ContributionCoeff_d*buffer[0]; ContributionCoeff_d = pdfreader( -1, PDFx1, Mass_4l )*pdfreader( 1, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_d*buffer[1]; } else Background_ME = ContributionCoeff_d*(buffer[0]+buffer[1]); /// Strange quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_s ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_s*params_m_s ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_s*params_m_s ); if( flavor == "SF" && !photon ) { ME_Background_ZZ_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_SF.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Background_ZZ_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_OF.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Background_DY_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_DownType_2l.setMomenta( p_set ); ME_Background_DY_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Background_ZZ_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_SFpA.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Background_ZZ_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_DownType_OFpA.setMomenta( p_set ); ME_Background_ZZ_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Background_DY_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_DownType_2lpA.setMomenta( p_set ); ME_Background_DY_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_s= pdfreader( 3, PDFx1, Mass_4l )*pdfreader( -3, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_s*buffer[0]; ContributionCoeff_s = pdfreader( -3, PDFx1, Mass_4l )*pdfreader( 3, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_s*buffer[1]; } else Background_ME += ContributionCoeff_s*(buffer[0]+buffer[1]); /// Up quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_u ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_u*params_m_u ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_u*params_m_u ); if( flavor == "SF" && !photon ) { ME_Background_ZZ_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_SF.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Background_ZZ_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_OF.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Background_DY_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_UpType_2l.setMomenta( p_set ); ME_Background_DY_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Background_ZZ_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_SFpA.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Background_ZZ_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_OFpA.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Background_DY_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_UpType_2lpA.setMomenta( p_set ); ME_Background_DY_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_u = pdfreader( 2, PDFx1, Mass_4l )*pdfreader( -2, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_u*buffer[0]; ContributionCoeff_u = pdfreader( -2, PDFx1, Mass_4l )*pdfreader( 2, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_u*buffer[1]; } else Background_ME += ContributionCoeff_u*(buffer[0]+buffer[1]); /// Charm quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_c ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_c*params_m_c ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_c*params_m_c ); if( flavor == "SF" && !photon ) { ME_Background_ZZ_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_SF.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Background_ZZ_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_OF.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Background_DY_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_UpType_2l.setMomenta( p_set ); ME_Background_DY_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Background_ZZ_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_SFpA.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Background_ZZ_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Background_ZZ_qq_UpType_OFpA.setMomenta( p_set ); ME_Background_ZZ_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_ZZ_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Background_DY_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Background_DY_qq_UpType_2lpA.setMomenta( p_set ); ME_Background_DY_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Background_DY_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_c = pdfreader( 4, PDFx1, Mass_4l )*pdfreader( -4, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_c*buffer[0]; ContributionCoeff_c = pdfreader( -4, PDFx1, Mass_4l )*pdfreader( 4, PDFx2, Mass_4l ); Background_ME += ContributionCoeff_c*buffer[1]; } else Background_ME += ContributionCoeff_c*(buffer[0]+buffer[1]); } return 0; } int MEKD_MG::Run_MEKD_MG_MEs_SIG_Spin0_Sub(string initial_state, string flavor, bool photon) { if( initial_state=="NO" ) { /// No initial state block if( flavor == "2l" ) { cerr << "Two-lepton final state without an initial state is unsupported.\n"; return 1; } if( !photon ) { p_set[0][0] = p_set[2][0] + p_set[3][0] + p_set[4][0] + p_set[5][0]; p_set[0][1] = p_set[2][1] + p_set[3][1] + p_set[4][1] + p_set[5][1]; p_set[0][2] = p_set[2][2] + p_set[3][2] + p_set[4][2] + p_set[5][2]; p_set[0][3] = p_set[2][3] + p_set[3][3] + p_set[4][3] + p_set[5][3]; buffer = p_set[1]; for( unsigned int count=0; count < 4; count++ ) p_set[count+1] = p_set[count+2]; p_set[5] = buffer; } else { p_set[0][0] = p_set[2][0] + p_set[3][0] + p_set[4][0] + p_set[5][0] + p_set[6][0]; p_set[0][1] = p_set[2][1] + p_set[3][1] + p_set[4][1] + p_set[5][1] + p_set[6][1]; p_set[0][2] = p_set[2][2] + p_set[3][2] + p_set[4][2] + p_set[5][2] + p_set[6][2]; p_set[0][3] = p_set[2][3] + p_set[3][3] + p_set[4][3] + p_set[5][3] + p_set[6][3]; buffer = p_set[1]; for( unsigned int count=0; count < 5; count++ ) p_set[count+1] = p_set[count+2]; p_set[6] = buffer; } if( flavor == "SF" && !photon ) { ME_Signal_Spin0_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_SF.setMomenta( p_set ); ME_Signal_Spin0_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin0_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_OF.setMomenta( p_set ); ME_Signal_Spin0_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_OF.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin0_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_SFpA.setMomenta( p_set ); ME_Signal_Spin0_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin0_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_OFpA.setMomenta( p_set ); ME_Signal_Spin0_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_OFpA.getMatrixElements() ); } Signal_ME = buffer[0]; if( !photon ) { buffer = p_set[5]; for( unsigned int count=4; count > 0; count-- ) p_set[count+1] = p_set[count]; p_set[1] = buffer; } else { buffer = p_set[6]; for( unsigned int count=5; count > 0; count-- ) p_set[count+1] = p_set[count]; p_set[1] = buffer; } } if( initial_state=="gg" ) { /// gg block p_set[0][3] = p_set[0][0]; p_set[1][3] = -p_set[1][0]; if( flavor == "SF" && !photon ) { ME_Signal_Spin0_gg_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_gg_SF.setMomenta( p_set ); ME_Signal_Spin0_gg_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_gg_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin0_gg_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_gg_OF.setMomenta( p_set ); ME_Signal_Spin0_gg_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_gg_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin0_gg_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_gg_2l.setMomenta( p_set ); ME_Signal_Spin0_gg_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_gg_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin0_gg_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_gg_SFpA.setMomenta( p_set ); ME_Signal_Spin0_gg_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_gg_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin0_gg_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_gg_OFpA.setMomenta( p_set ); ME_Signal_Spin0_gg_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_gg_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin0_gg_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_gg_2lpA.setMomenta( p_set ); ME_Signal_Spin0_gg_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_gg_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { Signal_ME = pdfreader( 21, PDFx1, Mass_4l )*pdfreader( 21, PDFx2, Mass_4l )*buffer[0]; } else Signal_ME = buffer[0]; } if( initial_state=="qq" ) { /// Down quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_d ); Set_Of_Model_Parameters.set_block_entry( "heff", 15, params_rhod01 ); Set_Of_Model_Parameters.set_block_entry( "heff", 16, params_rhod02 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_d*params_m_d ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_d*params_m_d ); if( flavor == "SF" && !photon ) { ME_Signal_Spin0_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_SF.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin0_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_OF.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin0_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_2l.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin0_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_SFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin0_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_OFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin0_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_2lpA.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_d = pdfreader( 1, PDFx1, Mass_4l )*pdfreader( -1, PDFx2, Mass_4l ); Signal_ME = ContributionCoeff_d*buffer[0]; ContributionCoeff_d = pdfreader( -1, PDFx1, Mass_4l )*pdfreader( 1, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_d*buffer[1]; } else Signal_ME = ContributionCoeff_d*(buffer[0]+buffer[1]); /// Strange quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_s ); Set_Of_Model_Parameters.set_block_entry( "heff", 15, params_rhos01 ); Set_Of_Model_Parameters.set_block_entry( "heff", 16, params_rhos02 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_s*params_m_s ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_s*params_m_s ); if( flavor == "SF" && !photon ) { ME_Signal_Spin0_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_SF.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin0_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_OF.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin0_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_2l.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin0_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_SFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin0_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_OFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin0_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_DownType_2lpA.setMomenta( p_set ); ME_Signal_Spin0_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_s= pdfreader( 3, PDFx1, Mass_4l )*pdfreader( -3, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_s*buffer[0]; ContributionCoeff_s = pdfreader( -3, PDFx1, Mass_4l )*pdfreader( 3, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_s*buffer[1]; } else Signal_ME += ContributionCoeff_s*(buffer[0]+buffer[1]); /// Up quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_u ); Set_Of_Model_Parameters.set_block_entry( "heff", 11, params_rhou01 ); Set_Of_Model_Parameters.set_block_entry( "heff", 12, params_rhou02 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_u*params_m_u ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_u*params_m_u ); if( flavor == "SF" && !photon ) { ME_Signal_Spin0_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_SF.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin0_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_OF.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin0_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_2l.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin0_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_SFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin0_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_OFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin0_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_2lpA.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_u = pdfreader( 2, PDFx1, Mass_4l )*pdfreader( -2, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_u*buffer[0]; ContributionCoeff_u = pdfreader( -2, PDFx1, Mass_4l )*pdfreader( 2, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_u*buffer[1]; } else Signal_ME += ContributionCoeff_u*(buffer[0]+buffer[1]); /// Charm quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_c ); Set_Of_Model_Parameters.set_block_entry( "heff", 11, params_rhoc01 ); Set_Of_Model_Parameters.set_block_entry( "heff", 12, params_rhoc02 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_c*params_m_c ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_c*params_m_c ); if( flavor == "SF" && !photon ) { ME_Signal_Spin0_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_SF.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin0_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_OF.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin0_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_2l.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin0_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_SFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin0_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_OFpA.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin0_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin0_qq_UpType_2lpA.setMomenta( p_set ); ME_Signal_Spin0_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin0_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_c = pdfreader( 4, PDFx1, Mass_4l )*pdfreader( -4, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_c*buffer[0]; ContributionCoeff_c = pdfreader( -4, PDFx1, Mass_4l )*pdfreader( 4, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_c*buffer[1]; } else Signal_ME += ContributionCoeff_c*(buffer[0]+buffer[1]); } return 0; } int MEKD_MG::Run_MEKD_MG_MEs_SIG_Spin1_Sub(string initial_state, string flavor, bool photon) { if( initial_state=="NO" ) { /// No initial state block if( flavor == "2l" ) { cerr << "Two-lepton final state without an initial state is unsupported.\n"; return 1; } if( !photon ) { p_set[0][0] = p_set[2][0] + p_set[3][0] + p_set[4][0] + p_set[5][0]; p_set[0][1] = p_set[2][1] + p_set[3][1] + p_set[4][1] + p_set[5][1]; p_set[0][2] = p_set[2][2] + p_set[3][2] + p_set[4][2] + p_set[5][2]; p_set[0][3] = p_set[2][3] + p_set[3][3] + p_set[4][3] + p_set[5][3]; buffer = p_set[1]; for( unsigned int count=0; count < 4; count++ ) p_set[count+1] = p_set[count+2]; p_set[5] = buffer; } else { p_set[0][0] = p_set[2][0] + p_set[3][0] + p_set[4][0] + p_set[5][0] + p_set[6][0]; p_set[0][1] = p_set[2][1] + p_set[3][1] + p_set[4][1] + p_set[5][1] + p_set[6][1]; p_set[0][2] = p_set[2][2] + p_set[3][2] + p_set[4][2] + p_set[5][2] + p_set[6][2]; p_set[0][3] = p_set[2][3] + p_set[3][3] + p_set[4][3] + p_set[5][3] + p_set[6][3]; buffer = p_set[1]; for( unsigned int count=0; count < 5; count++ ) p_set[count+1] = p_set[count+2]; p_set[6] = buffer; } if( flavor == "SF" && !photon ) { ME_Signal_Spin1_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_SF.setMomenta( p_set ); ME_Signal_Spin1_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin1_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_OF.setMomenta( p_set ); ME_Signal_Spin1_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_OF.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin1_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_SFpA.setMomenta( p_set ); ME_Signal_Spin1_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin1_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_OFpA.setMomenta( p_set ); ME_Signal_Spin1_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_OFpA.getMatrixElements() ); } Signal_ME = buffer[0]; if( !photon ) { buffer = p_set[5]; for( unsigned int count=4; count > 0; count-- ) p_set[count+1] = p_set[count]; p_set[1] = buffer; } else { buffer = p_set[6]; for( unsigned int count=5; count > 0; count-- ) p_set[count+1] = p_set[count]; p_set[1] = buffer; } } if( initial_state=="qq" ) { /// Down quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_d ); Set_Of_Model_Parameters.set_block_entry( "vec", 15, params_rhod11 ); Set_Of_Model_Parameters.set_block_entry( "vec", 16, params_rhod12 ); Set_Of_Model_Parameters.set_block_entry( "vec", 17, params_rhod13 ); Set_Of_Model_Parameters.set_block_entry( "vec", 18, params_rhod14 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_d*params_m_d ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_d*params_m_d ); if( flavor == "SF" && !photon ) { ME_Signal_Spin1_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_SF.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin1_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_OF.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin1_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_2l.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin1_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_SFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin1_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_OFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin1_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_2lpA.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_d = pdfreader( 1, PDFx1, Mass_4l )*pdfreader( -1, PDFx2, Mass_4l ); Signal_ME = ContributionCoeff_d*buffer[0]; ContributionCoeff_d = pdfreader( -1, PDFx1, Mass_4l )*pdfreader( 1, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_d*buffer[1]; } else Signal_ME = ContributionCoeff_d*(buffer[0]+buffer[1]); /// Strange quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_s ); Set_Of_Model_Parameters.set_block_entry( "vec", 15, params_rhos11 ); Set_Of_Model_Parameters.set_block_entry( "vec", 16, params_rhos12 ); Set_Of_Model_Parameters.set_block_entry( "vec", 17, params_rhos13 ); Set_Of_Model_Parameters.set_block_entry( "vec", 18, params_rhos14 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_s*params_m_s ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_s*params_m_s ); if( flavor == "SF" && !photon ) { ME_Signal_Spin1_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_SF.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin1_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_OF.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin1_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_2l.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin1_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_SFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin1_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_OFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin1_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_DownType_2lpA.setMomenta( p_set ); ME_Signal_Spin1_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_s= pdfreader( 3, PDFx1, Mass_4l )*pdfreader( -3, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_s*buffer[0]; ContributionCoeff_s = pdfreader( -3, PDFx1, Mass_4l )*pdfreader( 3, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_s*buffer[1]; } else Signal_ME += ContributionCoeff_s*(buffer[0]+buffer[1]); /// Up quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_u ); Set_Of_Model_Parameters.set_block_entry( "vec", 7, params_rhou11 ); Set_Of_Model_Parameters.set_block_entry( "vec", 8, params_rhou12 ); Set_Of_Model_Parameters.set_block_entry( "vec", 9, params_rhou13 ); Set_Of_Model_Parameters.set_block_entry( "vec", 10, params_rhou14 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_u*params_m_u ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_u*params_m_u ); if( flavor == "SF" && !photon ) { ME_Signal_Spin1_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_SF.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin1_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_OF.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin1_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_2l.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin1_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_SFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin1_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_OFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin1_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_2lpA.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_u = pdfreader( 2, PDFx1, Mass_4l )*pdfreader( -2, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_u*buffer[0]; ContributionCoeff_u = pdfreader( -2, PDFx1, Mass_4l )*pdfreader( 2, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_u*buffer[1]; } else Signal_ME += ContributionCoeff_u*(buffer[0]+buffer[1]); /// Charm quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_c ); Set_Of_Model_Parameters.set_block_entry( "vec", 7, params_rhoc11 ); Set_Of_Model_Parameters.set_block_entry( "vec", 8, params_rhoc12 ); Set_Of_Model_Parameters.set_block_entry( "vec", 9, params_rhoc13 ); Set_Of_Model_Parameters.set_block_entry( "vec", 10, params_rhoc14 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_c*params_m_c ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_c*params_m_c ); if( flavor == "SF" && !photon ) { ME_Signal_Spin1_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_SF.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin1_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_OF.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin1_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_2l.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin1_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_SFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin1_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_OFpA.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin1_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin1_qq_UpType_2lpA.setMomenta( p_set ); ME_Signal_Spin1_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin1_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_c = pdfreader( 4, PDFx1, Mass_4l )*pdfreader( -4, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_c*buffer[0]; ContributionCoeff_c = pdfreader( -4, PDFx1, Mass_4l )*pdfreader( 4, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_c*buffer[1]; } else Signal_ME += ContributionCoeff_c*(buffer[0]+buffer[1]); } return 0; } int MEKD_MG::Run_MEKD_MG_MEs_SIG_Spin2_Sub(string initial_state, string flavor, bool photon) { if( initial_state=="NO" ) { /// No initial state block if( flavor == "2l" ) { cerr << "Two-lepton final state without an initial state is unsupported.\n"; return 1; } if( !photon ) { p_set[0][0] = p_set[2][0] + p_set[3][0] + p_set[4][0] + p_set[5][0]; p_set[0][1] = p_set[2][1] + p_set[3][1] + p_set[4][1] + p_set[5][1]; p_set[0][2] = p_set[2][2] + p_set[3][2] + p_set[4][2] + p_set[5][2]; p_set[0][3] = p_set[2][3] + p_set[3][3] + p_set[4][3] + p_set[5][3]; buffer = p_set[1]; for( unsigned int count=0; count < 4; count++ ) p_set[count+1] = p_set[count+2]; p_set[5] = buffer; } else { p_set[0][0] = p_set[2][0] + p_set[3][0] + p_set[4][0] + p_set[5][0] + p_set[6][0]; p_set[0][1] = p_set[2][1] + p_set[3][1] + p_set[4][1] + p_set[5][1] + p_set[6][1]; p_set[0][2] = p_set[2][2] + p_set[3][2] + p_set[4][2] + p_set[5][2] + p_set[6][2]; p_set[0][3] = p_set[2][3] + p_set[3][3] + p_set[4][3] + p_set[5][3] + p_set[6][3]; buffer = p_set[1]; for( unsigned int count=0; count < 5; count++ ) p_set[count+1] = p_set[count+2]; p_set[6] = buffer; } if( flavor == "SF" && !photon ) { ME_Signal_Spin2_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_SF.setMomenta( p_set ); ME_Signal_Spin2_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin2_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_OF.setMomenta( p_set ); ME_Signal_Spin2_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_OF.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin2_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_SFpA.setMomenta( p_set ); ME_Signal_Spin2_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin2_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_OFpA.setMomenta( p_set ); ME_Signal_Spin2_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_OFpA.getMatrixElements() ); } Signal_ME = buffer[0]; if( !photon ) { buffer = p_set[5]; for( unsigned int count=4; count > 0; count-- ) p_set[count+1] = p_set[count]; p_set[1] = buffer; } else { buffer = p_set[6]; for( unsigned int count=5; count > 0; count-- ) p_set[count+1] = p_set[count]; p_set[1] = buffer; } } if( initial_state=="gg" ) { /// gg block p_set[0][3] = p_set[0][0]; p_set[1][3] = -p_set[1][0]; if( flavor == "SF" && !photon ) { ME_Signal_Spin2_gg_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_gg_SF.setMomenta( p_set ); ME_Signal_Spin2_gg_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_gg_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin2_gg_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_gg_OF.setMomenta( p_set ); ME_Signal_Spin2_gg_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_gg_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin2_gg_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_gg_2l.setMomenta( p_set ); ME_Signal_Spin2_gg_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_gg_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin2_gg_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_gg_SFpA.setMomenta( p_set ); ME_Signal_Spin2_gg_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_gg_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin2_gg_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_gg_OFpA.setMomenta( p_set ); ME_Signal_Spin2_gg_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_gg_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin2_gg_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_gg_2lpA.setMomenta( p_set ); ME_Signal_Spin2_gg_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_gg_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { Signal_ME = pdfreader( 21, PDFx1, Mass_4l )*pdfreader( 21, PDFx2, Mass_4l )*buffer[0]; } else Signal_ME = buffer[0]; } if( initial_state=="qq" ) { /// Down quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_d ); Set_Of_Model_Parameters.set_block_entry( "gravity", 33, params_rhod21 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 34, params_rhod22 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 35, params_rhod23 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 36, params_rhod24 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_d*params_m_d ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_d*params_m_d ); if( flavor == "SF" && !photon ) { ME_Signal_Spin2_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_SF.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin2_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_OF.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin2_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_2l.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin2_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_SFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin2_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_OFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin2_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_2lpA.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_d = pdfreader( 1, PDFx1, Mass_4l )*pdfreader( -1, PDFx2, Mass_4l ); Signal_ME = ContributionCoeff_d*buffer[0]; ContributionCoeff_d = pdfreader( -1, PDFx1, Mass_4l )*pdfreader( 1, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_d*buffer[1]; } else Signal_ME = ContributionCoeff_d*(buffer[0]+buffer[1]); /// Strange quark block Set_Of_Model_Parameters.set_block_entry( "mass", 3, params_m_s ); Set_Of_Model_Parameters.set_block_entry( "gravity", 33, params_rhos21 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 34, params_rhos22 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 35, params_rhos23 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 36, params_rhos24 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_s*params_m_s ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_s*params_m_s ); if( flavor == "SF" && !photon ) { ME_Signal_Spin2_qq_DownType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_SF.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin2_qq_DownType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_OF.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin2_qq_DownType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_2l.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin2_qq_DownType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_SFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin2_qq_DownType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_OFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin2_qq_DownType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_DownType_2lpA.setMomenta( p_set ); ME_Signal_Spin2_qq_DownType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_DownType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_s= pdfreader( 3, PDFx1, Mass_4l )*pdfreader( -3, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_s*buffer[0]; ContributionCoeff_s = pdfreader( -3, PDFx1, Mass_4l )*pdfreader( 3, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_s*buffer[1]; } else Signal_ME += ContributionCoeff_s*(buffer[0]+buffer[1]); /// Up quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_u ); Set_Of_Model_Parameters.set_block_entry( "gravity", 25, params_rhou21 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 26, params_rhou22 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 27, params_rhou23 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 28, params_rhou24 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_u*params_m_u ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_u*params_m_u ); if( flavor == "SF" && !photon ) { ME_Signal_Spin2_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_SF.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin2_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_OF.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin2_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_2l.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin2_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_SFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin2_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_OFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin2_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_2lpA.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_u = pdfreader( 2, PDFx1, Mass_4l )*pdfreader( -2, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_u*buffer[0]; ContributionCoeff_u = pdfreader( -2, PDFx1, Mass_4l )*pdfreader( 2, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_u*buffer[1]; } else Signal_ME += ContributionCoeff_u*(buffer[0]+buffer[1]); /// Charm quark block Set_Of_Model_Parameters.set_block_entry( "mass", 4, params_m_c ); Set_Of_Model_Parameters.set_block_entry( "gravity", 25, params_rhoc21 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 26, params_rhoc22 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 27, params_rhoc23 ); Set_Of_Model_Parameters.set_block_entry( "gravity", 28, params_rhoc24 ); p_set[0][3] = sqrt( p_set[0][0]*p_set[0][0] - params_m_c*params_m_c ); p_set[1][3] = -sqrt( p_set[1][0]*p_set[1][0] - params_m_c*params_m_c ); if( flavor == "SF" && !photon ) { ME_Signal_Spin2_qq_UpType_SF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_SF.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_SF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_SF.getMatrixElements() ); } if( flavor == "OF" && !photon ) { ME_Signal_Spin2_qq_UpType_OF.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_OF.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_OF.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_OF.getMatrixElements() ); } if( flavor == "2l" && !photon ) { ME_Signal_Spin2_qq_UpType_2l.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_2l.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_2l.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_2l.getMatrixElements() ); } if( flavor == "SF" && photon ) { ME_Signal_Spin2_qq_UpType_SFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_SFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_SFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_SFpA.getMatrixElements() ); } if( flavor == "OF" && photon ) { ME_Signal_Spin2_qq_UpType_OFpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_OFpA.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_OFpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_OFpA.getMatrixElements() ); } if( flavor == "2l" && photon ) { ME_Signal_Spin2_qq_UpType_2lpA.updateProc( Set_Of_Model_Parameters ); ME_Signal_Spin2_qq_UpType_2lpA.setMomenta( p_set ); ME_Signal_Spin2_qq_UpType_2lpA.sigmaKin(); buffer = const_cast<double*>( ME_Signal_Spin2_qq_UpType_2lpA.getMatrixElements() ); } if( Use_PDF_w_pT0 ) { ContributionCoeff_c = pdfreader( 4, PDFx1, Mass_4l )*pdfreader( -4, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_c*buffer[0]; ContributionCoeff_c = pdfreader( -4, PDFx1, Mass_4l )*pdfreader( 4, PDFx2, Mass_4l ); Signal_ME += ContributionCoeff_c*buffer[1]; } else Signal_ME += ContributionCoeff_c*(buffer[0]+buffer[1]); } return 0; } /////////////////////////////////// /// END OF MEKD_MG_RunMEs.cpp /// /////////////////////////////////// ///#include "MEKD_MG_Sorter.cpp" /////////////////////////////////// /// INCLUDED MEKD_MG_Sorter.cpp /// /// code follows below /// /// /// /// Part responsible for /// /// momenta rearrangement /// /////////////////////////////////// int MEKD_MG::Arrange_Internal_pls() { id_set[0]=id1; id_set[1]=id2; id_set[2]=id3; id_set[3]=id4; id_set[4]=id5; if( id_set[0] == 0 ) id_set[0]=10000; if( id_set[1] == 0 ) id_set[1]=10000; if( id_set[2] == 0 ) id_set[2]=10000; if( id_set[3] == 0 ) id_set[3]=10000; if( id_set[4] == 0 ) id_set[4]=10000; sort( id_set.begin(), id_set.end() ); //////////////////////////// /// 2mu-decay-mode block /// //////////////////////////// /// Two-lepton final state block if( id_set[0] == -13 && id_set[1] == 13 && id_set[2] == 10000 && id_set[3] == 10000 && id_set[4] == 10000 ) { if( id1 == 13 ) pl1_internal = p1; if( id2 == 13 ) pl1_internal = p2; if( id1 == -13 ) pl2_internal = p1; if( id2 == -13 ) pl2_internal = p2; pA1_internal = NULL; Final_state = "2m"; return 0; } /// Two-lepton + photon final state block if( id_set[0] == -13 && id_set[1] == 13 && id_set[2] == 22 && id_set[3] == 10000 && id_set[4] == 10000 ) { if( id1 == 13 ) pl1_internal = p1; if( id2 == 13 ) pl1_internal = p2; if( id3 == 13 ) pl1_internal = p3; if( id1 == -13 ) pl2_internal = p1; if( id2 == -13 ) pl2_internal = p2; if( id3 == -13 ) pl2_internal = p3; if( id1 == 22 ) pA1_internal = p1; if( id2 == 22 ) pA1_internal = p2; if( id3 == 22 ) pA1_internal = p3; Final_state = "2mA"; return 0; } /////////////////////////// /// ZZ-decay-mode block /// /////////////////////////// /// Four-lepton final state block if( id_set[0] == -13 && id_set[1] == -11 && id_set[2] == 11 && id_set[3] == 13 && id_set[4] == 10000 ) { if( id1 == 11 ) pl1_internal = p1; if( id2 == 11 ) pl1_internal = p2; if( id3 == 11 ) pl1_internal = p3; if( id4 == 11 ) pl1_internal = p4; if( id1 == -11 ) pl2_internal = p1; if( id2 == -11 ) pl2_internal = p2; if( id3 == -11 ) pl2_internal = p3; if( id4 == -11 ) pl2_internal = p4; if( id1 == 13 ) pl3_internal = p1; if( id2 == 13 ) pl3_internal = p2; if( id3 == 13 ) pl3_internal = p3; if( id4 == 13 ) pl3_internal = p4; if( id1 == -13 ) pl4_internal = p1; if( id2 == -13 ) pl4_internal = p2; if( id3 == -13 ) pl4_internal = p3; if( id4 == -13 ) pl4_internal = p4; pA1_internal = NULL; Final_state = "2e2m"; return 0; } if( id_set[0] == -13 && id_set[1] == -13 && id_set[2] == 13 && id_set[3] == 13 && id_set[4] == 10000 ) { buffer_bool = false; //first muon has beed caught if( id1 == 13 && !buffer_bool ) { pl1_internal=p1; buffer_bool=true; } if( id2 == 13 && buffer_bool ) pl3_internal = p2; if( id2 == 13 && !buffer_bool ) { pl1_internal=p2; buffer_bool=true; } if( id3 == 13 && buffer_bool ) pl3_internal = p3; if( id3 == 13 && !buffer_bool ) { pl1_internal=p3; buffer_bool=true; } if( id4 == 13 && buffer_bool ) pl3_internal = p4; buffer_bool = false; //first antimuon has beed caught if( id1 == -13 && !buffer_bool ) { pl2_internal=p1; buffer_bool=true; } if( id2 == -13 && buffer_bool ) pl4_internal = p2; if( id2 == -13 && !buffer_bool ) { pl2_internal=p2; buffer_bool=true; } if( id3 == -13 && buffer_bool ) pl4_internal = p3; if( id3 == -13 && !buffer_bool ) { pl2_internal=p3; buffer_bool=true; } if( id4 == -13 && buffer_bool ) pl4_internal = p4; pA1_internal = NULL; Final_state = "4mu"; return 0; } if( id_set[0] == -11 && id_set[1] == -11 && id_set[2] == 11 && id_set[3] == 11 && id_set[4] == 10000 ) { buffer_bool = false; //first electron has beed caught if( id1 == 11 && !buffer_bool ) { pl1_internal=p1; buffer_bool=true; } if( id2 == 11 && buffer_bool ) pl3_internal = p2; if( id2 == 11 && !buffer_bool ) { pl1_internal=p2; buffer_bool=true; } if( id3 == 11 && buffer_bool ) pl3_internal = p3; if( id3 == 11 && !buffer_bool ) { pl1_internal=p3; buffer_bool=true; } if( id4 == 11 && buffer_bool ) pl3_internal = p4; buffer_bool = false; //first positron has beed caught if( id1 == -11 && !buffer_bool ) { pl2_internal=p1; buffer_bool=true; } if( id2 == -11 && buffer_bool ) pl4_internal = p2; if( id2 == -11 && !buffer_bool ) { pl2_internal=p2; buffer_bool=true; } if( id3 == -11 && buffer_bool ) pl4_internal = p3; if( id3 == -11 && !buffer_bool ) { pl2_internal=p3; buffer_bool=true; } if( id4 == -11 && buffer_bool ) pl4_internal = p4; pA1_internal = NULL; Final_state = "4e"; return 0; } /// Four-lepton + photon final state block if( id_set[0] == -13 && id_set[1] == -11 && id_set[2] == 11 && id_set[3] == 13 && id_set[4] == 22 ) { if( id1 == 11 ) pl1_internal = p1; if( id2 == 11 ) pl1_internal = p2; if( id3 == 11 ) pl1_internal = p3; if( id4 == 11 ) pl1_internal = p4; if( id5 == 11 ) pl1_internal = p5; if( id1 == -11 ) pl2_internal = p1; if( id2 == -11 ) pl2_internal = p2; if( id3 == -11 ) pl2_internal = p3; if( id4 == -11 ) pl2_internal = p4; if( id5 == -11 ) pl1_internal = p5; if( id1 == 13 ) pl3_internal = p1; if( id2 == 13 ) pl3_internal = p2; if( id3 == 13 ) pl3_internal = p3; if( id4 == 13 ) pl3_internal = p4; if( id5 == 13 ) pl3_internal = p5; if( id1 == -13 ) pl4_internal = p1; if( id2 == -13 ) pl4_internal = p2; if( id3 == -13 ) pl4_internal = p3; if( id4 == -13 ) pl4_internal = p4; if( id5 == -13 ) pl4_internal = p5; if( id1 == 22 ) pA1_internal = p1; if( id2 == 22 ) pA1_internal = p2; if( id3 == 22 ) pA1_internal = p3; if( id4 == 22 ) pA1_internal = p4; if( id5 == 22 ) pA1_internal = p5; Final_state = "2e2mA"; return 0; } if( id_set[0] == -13 && id_set[1] == -13 && id_set[2] == 13 && id_set[3] == 13 && id_set[4] == 22 ) { buffer_bool = false; //first muon has beed caught if( id1 == 13 && !buffer_bool ) { pl1_internal=p1; buffer_bool=true; } if( id2 == 13 && buffer_bool ) pl3_internal = p2; if( id2 == 13 && !buffer_bool ) { pl1_internal=p2; buffer_bool=true; } if( id3 == 13 && buffer_bool ) pl3_internal = p3; if( id3 == 13 && !buffer_bool ) { pl1_internal=p3; buffer_bool=true; } if( id4 == 13 && buffer_bool ) pl3_internal = p4; if( id4 == 13 && !buffer_bool ) { pl1_internal=p4; buffer_bool=true; } if( id5 == 13 && buffer_bool ) pl3_internal = p5; buffer_bool = false; //first antimuon has beed caught if( id1 == -13 && !buffer_bool ) { pl2_internal=p1; buffer_bool=true; } if( id2 == -13 && buffer_bool ) pl4_internal = p2; if( id2 == -13 && !buffer_bool ) { pl2_internal=p2; buffer_bool=true; } if( id3 == -13 && buffer_bool ) pl4_internal = p3; if( id3 == -13 && !buffer_bool ) { pl2_internal=p3; buffer_bool=true; } if( id4 == -13 && buffer_bool ) pl4_internal = p4; if( id4 == -13 && !buffer_bool ) { pl2_internal=p4; buffer_bool=true; } if( id5 == -13 && buffer_bool ) pl4_internal = p5; if( id1 == 22 ) pA1_internal = p1; if( id2 == 22 ) pA1_internal = p2; if( id3 == 22 ) pA1_internal = p3; if( id4 == 22 ) pA1_internal = p4; if( id5 == 22 ) pA1_internal = p5; Final_state = "4muA"; return 0; } if( id_set[0] == -11 && id_set[1] == -11 && id_set[2] == 11 && id_set[3] == 11 && id_set[4] == 22 ) { buffer_bool = false; //first electron has beed caught if( id1 == 11 && !buffer_bool ) { pl1_internal=p1; buffer_bool=true; } if( id2 == 11 && buffer_bool ) pl3_internal = p2; if( id2 == 11 && !buffer_bool ) { pl1_internal=p2; buffer_bool=true; } if( id3 == 11 && buffer_bool ) pl3_internal = p3; if( id3 == 11 && !buffer_bool ) { pl1_internal=p3; buffer_bool=true; } if( id4 == 11 && buffer_bool ) pl3_internal = p4; if( id4 == 11 && !buffer_bool ) { pl1_internal=p4; buffer_bool=true; } if( id5 == 11 && buffer_bool ) pl3_internal = p5; buffer_bool = false; //first positron has beed caught if( id1 == -11 && !buffer_bool ) { pl2_internal=p1; buffer_bool=true; } if( id2 == -11 && buffer_bool ) pl4_internal = p2; if( id2 == -11 && !buffer_bool ) { pl2_internal=p2; buffer_bool=true; } if( id3 == -11 && buffer_bool ) pl4_internal = p3; if( id3 == -11 && !buffer_bool ) { pl2_internal=p3; buffer_bool=true; } if( id4 == -11 && buffer_bool ) pl4_internal = p4; if( id4 == -11 && !buffer_bool ) { pl2_internal=p4; buffer_bool=true; } if( id5 == -11 && buffer_bool ) pl4_internal = p5; if( id1 == 22 ) pA1_internal = p1; if( id2 == 22 ) pA1_internal = p2; if( id3 == 22 ) pA1_internal = p3; if( id4 == 22 ) pA1_internal = p4; if( id5 == 22 ) pA1_internal = p5; Final_state = "4eA"; return 0; } if( id_set[0] == 10000 && id_set[1] == 10000 && id_set[2] == 10000 && id_set[3] == 10000 && id_set[4] == 10000 ) { if( Warning_Mode ) cout << "Warning. Particle ids are not set. Assuming a proper input-particle configuration.\n"; if( Warning_Mode ) cout << "Proceeding according to a specified final state (" << Final_state << ").\n"; pl1_internal=p1; pl2_internal=p2; pl3_internal=p3; pl4_internal=p4; pA1_internal=p5; return 0; } return 1; } /////////////////////////////////// /// END OF MEKD_MG_Sorter.cpp /// /////////////////////////////////// #endif
[ "sbcooperstei@wisc.edu" ]
sbcooperstei@wisc.edu
2f7450129a114711e0c80bf4f5e5fd328d70fffc
d46b7b1158f9b09a6c669f4aeb34836fbbfcea95
/Source/RnD/Items/UsableItem.h
86c76f2db64b4e0bcd0a2544eb9cb0e4ebba4857
[ "MIT" ]
permissive
Dredfort/RND_Online
98d064cefc97d61fe08c07d7980b2b38ef45f23a
d76d616d4ac59137ae5b626fb2209f9537e6a1e7
refs/heads/master
2021-07-14T12:53:44.929977
2017-07-10T16:14:53
2017-07-10T16:14:53
96,791,190
0
0
null
null
null
null
UTF-8
C++
false
false
515
h
// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "GameFramework/Actor.h" #include "UsableItem.generated.h" UCLASS() class RND_API AUsableItem : public AActor { GENERATED_BODY() public: // Sets default values for this actor's properties AUsableItem(); // Called when the game starts or when spawned virtual void BeginPlay() override; // Called every frame virtual void Tick( float DeltaSeconds ) override; virtual void Use(APawn* Caller); };
[ "oleg.fen@gmail.com" ]
oleg.fen@gmail.com
d7cfba4def7e9e1368d40c688bdd1e12b85ef7e2
61d4e279bb59dab28e11ac17f99e466cf8aba3cc
/src/server/game/Entities/Unit/Unit.h
91c13fbdfc487aad259c6236b6a517f1d4cbb5ff
[]
no_license
dufernst/5.4.8-Wow-source
a840af25441ec9c38622c16de40b2997d4605ad1
5511dffb1e9ad2e2e0b794288c4b9ea5041112d5
refs/heads/master
2021-01-16T22:12:12.568039
2015-08-19T22:55:05
2015-08-19T22:55:05
41,120,934
2
10
null
2015-08-20T22:03:56
2015-08-20T22:03:56
null
UTF-8
C++
false
false
124,490
h
/* * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program 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 2 of the License, or (at your * option) any later version. * * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef __UNIT_H #define __UNIT_H #include "Common.h" #include "Object.h" #include "Opcodes.h" #include "SpellAuraDefines.h" #include "UpdateFields.h" #include "SharedDefines.h" #include "ThreatManager.h" #include "HostileRefManager.h" #include "FollowerReference.h" #include "FollowerRefManager.h" #include "EventProcessor.h" #include "MotionMaster.h" #include "DBCStructure.h" #include "SpellInfo.h" #include "Path.h" #include "WorldPacket.h" #include "WorldSession.h" #include "../SharedPtrs/SharedPtrs.h" #include "Timer.h" #include <list> #include "../DynamicObject/DynamicObject.h" #include "../AreaTrigger/AreaTrigger.h" #include "MovementStructures.h" #define WORLD_TRIGGER 12999 enum SpellInterruptFlags { SPELL_INTERRUPT_FLAG_MOVEMENT = 0x01, // why need this for instant? SPELL_INTERRUPT_FLAG_PUSH_BACK = 0x02, // push back SPELL_INTERRUPT_FLAG_UNK3 = 0x04, // any info? SPELL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt SPELL_INTERRUPT_FLAG_ABORT_ON_DMG = 0x10, // _complete_ interrupt on direct damage //SPELL_INTERRUPT_UNK = 0x20 // unk, 564 of 727 spells having this spell start with "Glyph" }; // See SpellAuraInterruptFlags for other values definitions enum SpellChannelInterruptFlags { CHANNEL_INTERRUPT_FLAG_INTERRUPT = 0x08, // interrupt CHANNEL_FLAG_DELAY = 0x4000 }; enum SpellAuraInterruptFlags { AURA_INTERRUPT_FLAG_HITBYSPELL = 0x00000001, // 0 removed when getting hit by a negative spell? AURA_INTERRUPT_FLAG_TAKE_DAMAGE = 0x00000002, // 1 removed by any damage AURA_INTERRUPT_FLAG_CAST = 0x00000004, // 2 cast any spells AURA_INTERRUPT_FLAG_MOVE = 0x00000008, // 3 removed by any movement AURA_INTERRUPT_FLAG_TURNING = 0x00000010, // 4 removed by any turning AURA_INTERRUPT_FLAG_JUMP = 0x00000020, // 5 removed by entering combat AURA_INTERRUPT_FLAG_NOT_MOUNTED = 0x00000040, // 6 removed by dismounting AURA_INTERRUPT_FLAG_NOT_ABOVEWATER = 0x00000080, // 7 removed by entering water AURA_INTERRUPT_FLAG_NOT_UNDERWATER = 0x00000100, // 8 removed by leaving water AURA_INTERRUPT_FLAG_NOT_SHEATHED = 0x00000200, // 9 removed by unsheathing AURA_INTERRUPT_FLAG_TALK = 0x00000400, // 10 talk to npc / loot? action on creature AURA_INTERRUPT_FLAG_USE = 0x00000800, // 11 mine/use/open action on gameobject AURA_INTERRUPT_FLAG_MELEE_ATTACK = 0x00001000, // 12 removed by attacking AURA_INTERRUPT_FLAG_SPELL_ATTACK = 0x00002000, // 13 ??? AURA_INTERRUPT_FLAG_UNK14 = 0x00004000, // 14 AURA_INTERRUPT_FLAG_TRANSFORM = 0x00008000, // 15 removed by transform? AURA_INTERRUPT_FLAG_UNK16 = 0x00010000, // 16 AURA_INTERRUPT_FLAG_MOUNT = 0x00020000, // 17 misdirect, aspect, swim speed AURA_INTERRUPT_FLAG_NOT_SEATED = 0x00040000, // 18 removed by standing up (used by food and drink mostly and sleep/Fake Death like) AURA_INTERRUPT_FLAG_CHANGE_MAP = 0x00080000, // 19 leaving map/getting teleported AURA_INTERRUPT_FLAG_IMMUNE_OR_LOST_SELECTION = 0x00100000, // 20 removed by auras that make you invulnerable, or make other to lose selection on you AURA_INTERRUPT_FLAG_UNK21 = 0x00200000, // 21 AURA_INTERRUPT_FLAG_TELEPORTED = 0x00400000, // 22 AURA_INTERRUPT_FLAG_ENTER_PVP_COMBAT = 0x00800000, // 23 removed by entering pvp combat AURA_INTERRUPT_FLAG_DIRECT_DAMAGE = 0x01000000, // 24 removed by any direct damage AURA_INTERRUPT_FLAG_LANDING = 0x02000000, // 25 removed by hitting the ground AURA_INTERRUPT_FLAG_NOT_VICTIM = (AURA_INTERRUPT_FLAG_HITBYSPELL | AURA_INTERRUPT_FLAG_TAKE_DAMAGE | AURA_INTERRUPT_FLAG_DIRECT_DAMAGE), }; enum SpellModOp { SPELLMOD_DAMAGE = 0, SPELLMOD_DURATION = 1, SPELLMOD_THREAT = 2, SPELLMOD_EFFECT1 = 3, SPELLMOD_CHARGES = 4, SPELLMOD_RANGE = 5, SPELLMOD_RADIUS = 6, SPELLMOD_CRITICAL_CHANCE = 7, SPELLMOD_ALL_EFFECTS = 8, SPELLMOD_NOT_LOSE_CASTING_TIME = 9, SPELLMOD_CASTING_TIME = 10, SPELLMOD_COOLDOWN = 11, SPELLMOD_EFFECT2 = 12, SPELLMOD_IGNORE_ARMOR = 13, SPELLMOD_COST = 14, SPELLMOD_CRIT_DAMAGE_BONUS = 15, SPELLMOD_RESIST_MISS_CHANCE = 16, SPELLMOD_JUMP_TARGETS = 17, SPELLMOD_CHANCE_OF_SUCCESS = 18, SPELLMOD_ACTIVATION_TIME = 19, SPELLMOD_DAMAGE_MULTIPLIER = 20, SPELLMOD_GLOBAL_COOLDOWN = 21, SPELLMOD_DOT = 22, SPELLMOD_EFFECT3 = 23, SPELLMOD_BONUS_MULTIPLIER = 24, // spellmod 25 SPELLMOD_PROC_PER_MINUTE = 26, SPELLMOD_VALUE_MULTIPLIER = 27, SPELLMOD_RESIST_DISPEL_CHANCE = 28, SPELLMOD_CRIT_DAMAGE_BONUS_2 = 29, //one not used spell SPELLMOD_SPELL_COST_REFUND_ON_FAIL = 30, SPELLMOD_EFFECT5 = 33, }; #define MAX_SPELLMOD 36 enum SpellValueMod { SPELLVALUE_BASE_POINT0, SPELLVALUE_BASE_POINT1, SPELLVALUE_BASE_POINT2, SPELLVALUE_BASE_POINT3, SPELLVALUE_BASE_POINT4, SPELLVALUE_BASE_POINT5, SPELLVALUE_RADIUS_MOD, SPELLVALUE_MAX_TARGETS, SPELLVALUE_AURA_STACK, }; typedef std::pair<SpellValueMod, int32> CustomSpellValueMod; class CustomSpellValues : public std::vector<CustomSpellValueMod> { public: void AddSpellMod(SpellValueMod mod, int32 value) { push_back(std::make_pair(mod, value)); } }; enum SpellFacingFlags { SPELL_FACING_FLAG_INFRONT = 0x0001 }; #define BASE_MINDAMAGE 1.0f #define BASE_MAXDAMAGE 2.0f #define BASE_ATTACK_TIME 2000 // byte value (UNIT_FIELD_BYTES_1, 0) enum UnitStandStateType { UNIT_STAND_STATE_STAND = 0, UNIT_STAND_STATE_SIT = 1, UNIT_STAND_STATE_SIT_CHAIR = 2, UNIT_STAND_STATE_SLEEP = 3, UNIT_STAND_STATE_SIT_LOW_CHAIR = 4, UNIT_STAND_STATE_SIT_MEDIUM_CHAIR = 5, UNIT_STAND_STATE_SIT_HIGH_CHAIR = 6, UNIT_STAND_STATE_DEAD = 7, UNIT_STAND_STATE_KNEEL = 8, UNIT_STAND_STATE_SUBMERGED = 9 }; // byte flag value (UNIT_FIELD_BYTES_1, 2) enum UnitStandFlags { UNIT_STAND_FLAGS_UNK1 = 0x01, UNIT_STAND_FLAGS_CREEP = 0x02, UNIT_STAND_FLAGS_UNTRACKABLE = 0x04, UNIT_STAND_FLAGS_UNK4 = 0x08, UNIT_STAND_FLAGS_UNK5 = 0x10, UNIT_STAND_FLAGS_ALL = 0xFF }; // byte flags value (UNIT_FIELD_BYTES_1, 3) enum UnitBytes1_Flags { UNIT_BYTE1_FLAG_ALWAYS_STAND = 0x01, UNIT_BYTE1_FLAG_HOVER = 0x02, UNIT_BYTE1_FLAG_UNK_3 = 0x04, UNIT_BYTE1_FLAG_ALL = 0xFF }; // high byte (3 from 0..3) of UNIT_FIELD_BYTES_2 enum ShapeshiftForm { FORM_NONE = 0x00, FORM_CAT = 0x01, FORM_TREE = 0x02, FORM_TRAVEL = 0x03, FORM_AQUA = 0x04, FORM_BEAR = 0x05, FORM_AMBIENT = 0x06, FORM_GHOUL = 0x07, FORM_DIREBEAR = 0x08, // Removed in 4.0.1 FORM_STEVES_GHOUL = 0x09, FORM_THARONJA_SKELETON = 0x0A, FORM_TEST_OF_STRENGTH = 0x0B, FORM_BLB_PLAYER = 0x0C, FORM_SHADOW_DANCE = 0x0D, FORM_CREATUREBEAR = 0x0E, FORM_CREATURECAT = 0x0F, FORM_GHOSTWOLF = 0x10, FORM_BATTLESTANCE = 0x11, FORM_DEFENSIVESTANCE = 0x12, FORM_BERSERKERSTANCE = 0x13, FORM_WISE_SERPENT = 0x14, FORM_ZOMBIE = 0x15, FORM_METAMORPHOSIS = 0x16, FORM_STURDY_OX = 0x17, FORM_FIERCE_TIGER = 0x18, FORM_UNDEAD = 0x19, FORM_MASTER_ANGLER = 0x1A, FORM_FLIGHT_EPIC = 0x1B, FORM_SHADOW = 0x1C, FORM_FLIGHT = 0x1D, FORM_STEALTH = 0x1E, FORM_MOONKIN = 0x1F, FORM_SPIRITOFREDEMPTION = 0x20 }; // low byte (0 from 0..3) of UNIT_FIELD_BYTES_2 enum SheathState { SHEATH_STATE_UNARMED = 0, // non prepared weapon SHEATH_STATE_MELEE = 1, // prepared melee weapon SHEATH_STATE_RANGED = 2 // prepared ranged weapon }; #define MAX_SHEATH_STATE 3 // byte (1 from 0..3) of UNIT_FIELD_BYTES_2 enum UnitPVPStateFlags { UNIT_BYTE2_FLAG_PVP = 0x01, UNIT_BYTE2_FLAG_UNK1 = 0x02, UNIT_BYTE2_FLAG_FFA_PVP = 0x04, UNIT_BYTE2_FLAG_SANCTUARY = 0x08, UNIT_BYTE2_FLAG_UNK4 = 0x10, UNIT_BYTE2_FLAG_UNK5 = 0x20, UNIT_BYTE2_FLAG_UNK6 = 0x40, UNIT_BYTE2_FLAG_UNK7 = 0x80 }; // byte (2 from 0..3) of UNIT_FIELD_BYTES_2 enum UnitRename { UNIT_CAN_BE_RENAMED = 0x01, UNIT_CAN_BE_ABANDONED = 0x02, }; #define CREATURE_MAX_SPELLS 8 #define MAX_SPELL_CHARM 4 #define MAX_SPELL_VEHICLE 6 #define MAX_SPELL_POSSESS 8 #define MAX_SPELL_CONTROL_BAR 10 #define MAX_AGGRO_RESET_TIME 10 // in seconds #define MAX_AGGRO_RADIUS 45.0f // yards enum Swing { NOSWING = 0, SINGLEHANDEDSWING = 1, TWOHANDEDSWING = 2 }; enum VictimState { VICTIMSTATE_INTACT = 0, // set when attacker misses VICTIMSTATE_HIT = 1, // victim got clear/blocked hit VICTIMSTATE_DODGE = 2, VICTIMSTATE_PARRY = 3, VICTIMSTATE_INTERRUPT = 4, VICTIMSTATE_BLOCKS = 5, // unused? not set when blocked, even on full block VICTIMSTATE_EVADES = 6, VICTIMSTATE_IS_IMMUNE = 7, VICTIMSTATE_DEFLECTS = 8 }; enum HitInfo { HITINFO_NORMALSWING = 0x00000000, HITINFO_UNK1 = 0x00000001, // req correct packet structure HITINFO_AFFECTS_VICTIM = 0x00000002, HITINFO_OFFHAND = 0x00000004, HITINFO_UNK2 = 0x00000008, HITINFO_MISS = 0x00000010, HITINFO_FULL_ABSORB = 0x00000020, HITINFO_PARTIAL_ABSORB = 0x00000040, HITINFO_FULL_RESIST = 0x00000080, HITINFO_PARTIAL_RESIST = 0x00000100, HITINFO_CRITICALHIT = 0x00000200, // critical hit // 0x00000400 // 0x00000800 HITINFO_UNK12 = 0x00001000, HITINFO_BLOCK = 0x00002000, // blocked damage // 0x00004000 // Hides worldtext for 0 damage // 0x00008000 // Related to blood visual HITINFO_GLANCING = 0x00010000, HITINFO_CRUSHING = 0x00020000, HITINFO_NO_ANIMATION = 0x00040000, // 0x00080000 // 0x00100000 HITINFO_SWINGNOHITSOUND = 0x00200000, // unused? // 0x00400000 HITINFO_RAGE_GAIN = 0x00800000, HITINFO_FAKE_DAMAGE = 0x01000000, // enables damage animation even if no damage done, set only if no damage HITINFO_UNK25 = 0x02000000, HITINFO_UNK26 = 0x04000000, }; //i would like to remove this: (it is defined in item.h enum InventorySlot { NULL_BAG = 0, NULL_SLOT = 255 }; struct FactionTemplateEntry; struct SpellValue; class AuraApplication; class Aura; class UnitAura; class AuraEffect; class Creature; class Spell; class SpellInfo; class DynamicObject; class AreaTrigger; class GameObject; class Item; class Pet; class PetAura; class Minion; class Guardian; class UnitAI; class Totem; class Transport; class Vehicle; class TransportBase; typedef std::list<Unit*> UnitList; typedef std::list< std::pair<AuraPtr, uint8> > DispelChargesList; struct SpellImmune { uint32 type; uint32 spellId; }; typedef std::list<SpellImmune> SpellImmuneList; enum UnitModifierType { BASE_VALUE = 0, BASE_PCT = 1, TOTAL_VALUE = 2, TOTAL_PCT = 3, MODIFIER_TYPE_END = 4 }; enum WeaponDamageRange { MINDAMAGE, MAXDAMAGE }; enum DamageTypeToSchool { RESISTANCE, DAMAGE_DEALT, DAMAGE_TAKEN }; enum AuraRemoveMode { AURA_REMOVE_NONE = 0, AURA_REMOVE_BY_DEFAULT = 1, // scripted remove, remove by stack with aura with different ids and sc aura remove AURA_REMOVE_BY_CANCEL, AURA_REMOVE_BY_ENEMY_SPELL, // dispel and absorb aura destroy AURA_REMOVE_BY_EXPIRE, // aura duration has ended AURA_REMOVE_BY_DEATH }; enum TriggerCastFlags { TRIGGERED_NONE = 0x00000000, //! Not triggered TRIGGERED_IGNORE_GCD = 0x00000001, //! Will ignore GCD TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD = 0x00000002, //! Will ignore Spell and Category cooldowns TRIGGERED_IGNORE_POWER_AND_REAGENT_COST = 0x00000004, //! Will ignore power and reagent cost TRIGGERED_IGNORE_CAST_ITEM = 0x00000008, //! Will not take away cast item or update related achievement criteria TRIGGERED_IGNORE_AURA_SCALING = 0x00000010, //! Will ignore aura scaling TRIGGERED_IGNORE_CAST_IN_PROGRESS = 0x00000020, //! Will not check if a current cast is in progress TRIGGERED_IGNORE_COMBO_POINTS = 0x00000040, //! Will ignore combo point requirement TRIGGERED_CAST_DIRECTLY = 0x00000080, //! In Spell::prepare, will be cast directly without setting containers for executed spell TRIGGERED_IGNORE_AURA_INTERRUPT_FLAGS = 0x00000100, //! Will ignore interruptible aura's at cast TRIGGERED_IGNORE_SET_FACING = 0x00000200, //! Will not adjust facing to target (if any) TRIGGERED_IGNORE_SHAPESHIFT = 0x00000400, //! Will ignore shapeshift checks TRIGGERED_IGNORE_CASTER_AURASTATE = 0x00000800, //! Will ignore caster aura states including combat requirements and death state TRIGGERED_IGNORE_CASTER_MOUNTED_OR_ON_VEHICLE = 0x00002000, //! Will ignore mounted/on vehicle restrictions TRIGGERED_IGNORE_CASTER_AURAS = 0x00010000, //! Will ignore caster aura restrictions or requirements TRIGGERED_DISALLOW_PROC_EVENTS = 0x00020000, //! Disallows proc events from triggered spell (default) TRIGGERED_DONT_REPORT_CAST_ERROR = 0x00040000, //! Will return SPELL_FAILED_DONT_REPORT in CheckCast functions TRIGGERED_FULL_MASK = 0xFFFFFFFF, }; enum UnitMods { UNIT_MOD_STAT_STRENGTH, // UNIT_MOD_STAT_STRENGTH..UNIT_MOD_STAT_SPIRIT must be in existed order, it's accessed by index values of Stats enum. UNIT_MOD_STAT_AGILITY, UNIT_MOD_STAT_STAMINA, UNIT_MOD_STAT_INTELLECT, UNIT_MOD_STAT_SPIRIT, UNIT_MOD_HEALTH, UNIT_MOD_MANA, // UNIT_MOD_MANA..UNIT_MOD_RUNIC_POWER must be in existed order, it's accessed by index values of Powers enum. UNIT_MOD_RAGE, UNIT_MOD_FOCUS, UNIT_MOD_ENERGY, UNIT_MOD_UNUSED, // Old UNIT_MOD_HAPPINESS UNIT_MOD_RUNE, UNIT_MOD_RUNIC_POWER, UNIT_MOD_SOUL_SHARDS, UNIT_MOD_ECLIPSE, UNIT_MOD_HOLY_POWER, UNIT_MOD_ALTERNATIVE, UNIT_MOD_UNK, UNIT_MOD_CHI, UNIT_MOD_SHADOW_ORB, UNIT_MOD_BURNING_EMBERS, UNIT_MOD_DEMONIC_FURY, UNIT_MOD_ARMOR, // UNIT_MOD_ARMOR..UNIT_MOD_RESISTANCE_ARCANE must be in existed order, it's accessed by index values of SpellSchools enum. UNIT_MOD_RESISTANCE_HOLY, UNIT_MOD_RESISTANCE_FIRE, UNIT_MOD_RESISTANCE_NATURE, UNIT_MOD_RESISTANCE_FROST, UNIT_MOD_RESISTANCE_SHADOW, UNIT_MOD_RESISTANCE_ARCANE, UNIT_MOD_ATTACK_POWER, UNIT_MOD_ATTACK_POWER_RANGED, UNIT_MOD_DAMAGE_MAINHAND, UNIT_MOD_DAMAGE_OFFHAND, UNIT_MOD_DAMAGE_RANGED, UNIT_MOD_END, // synonyms UNIT_MOD_STAT_START = UNIT_MOD_STAT_STRENGTH, UNIT_MOD_STAT_END = UNIT_MOD_STAT_SPIRIT + 1, UNIT_MOD_RESISTANCE_START = UNIT_MOD_ARMOR, UNIT_MOD_RESISTANCE_END = UNIT_MOD_RESISTANCE_ARCANE + 1, UNIT_MOD_POWER_START = UNIT_MOD_MANA, UNIT_MOD_POWER_END = UNIT_MOD_DEMONIC_FURY + 1 }; enum BaseModGroup { CRIT_PERCENTAGE, RANGED_CRIT_PERCENTAGE, OFFHAND_CRIT_PERCENTAGE, SHIELD_BLOCK_VALUE, BASEMOD_END }; enum BaseModType { FLAT_MOD, PCT_MOD }; #define MOD_END (PCT_MOD+1) enum DeathState { ALIVE = 0, JUST_DIED = 1, CORPSE = 2, DEAD = 3, JUST_RESPAWNED = 4, }; enum UnitState { UNIT_STATE_DIED = 0x00000001, // player has fake death aura UNIT_STATE_MELEE_ATTACKING = 0x00000002, // player is melee attacking someone //UNIT_STATE_MELEE_ATTACK_BY = 0x00000004, // player is melee attack by someone UNIT_STATE_STUNNED = 0x00000008, UNIT_STATE_ROAMING = 0x00000010, UNIT_STATE_CHASE = 0x00000020, //UNIT_STATE_SEARCHING = 0x00000040, UNIT_STATE_FLEEING = 0x00000080, UNIT_STATE_IN_FLIGHT = 0x00000100, // player is in flight mode UNIT_STATE_FOLLOW = 0x00000200, UNIT_STATE_ROOT = 0x00000400, UNIT_STATE_CONFUSED = 0x00000800, UNIT_STATE_DISTRACTED = 0x00001000, UNIT_STATE_ISOLATED = 0x00002000, // area auras do not affect other players UNIT_STATE_ATTACK_PLAYER = 0x00004000, UNIT_STATE_CASTING = 0x00008000, UNIT_STATE_POSSESSED = 0x00010000, UNIT_STATE_CHARGING = 0x00020000, UNIT_STATE_JUMPING = 0x00040000, UNIT_STATE_ONVEHICLE = 0x00080000, UNIT_STATE_MOVE = 0x00100000, UNIT_STATE_ROTATING = 0x00200000, UNIT_STATE_EVADE = 0x00400000, UNIT_STATE_ROAMING_MOVE = 0x00800000, UNIT_STATE_CONFUSED_MOVE = 0x01000000, UNIT_STATE_FLEEING_MOVE = 0x02000000, UNIT_STATE_CHASE_MOVE = 0x04000000, UNIT_STATE_FOLLOW_MOVE = 0x08000000, UNIT_STATE_UNATTACKABLE = (UNIT_STATE_IN_FLIGHT | UNIT_STATE_ONVEHICLE), // for real move using movegen check and stop (except unstoppable flight) UNIT_STATE_MOVING = UNIT_STATE_ROAMING_MOVE | UNIT_STATE_CONFUSED_MOVE | UNIT_STATE_FLEEING_MOVE | UNIT_STATE_CHASE_MOVE | UNIT_STATE_FOLLOW_MOVE , UNIT_STATE_CONTROLLED = (UNIT_STATE_CONFUSED | UNIT_STATE_STUNNED | UNIT_STATE_FLEEING), UNIT_STATE_LOST_CONTROL = (UNIT_STATE_CONTROLLED | UNIT_STATE_JUMPING | UNIT_STATE_CHARGING), UNIT_STATE_SIGHTLESS = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_EVADE), UNIT_STATE_CANNOT_AUTOATTACK = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_CASTING), UNIT_STATE_CANNOT_TURN = (UNIT_STATE_LOST_CONTROL | UNIT_STATE_ROTATING), // stay by different reasons UNIT_STATE_NOT_MOVE = UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DIED | UNIT_STATE_DISTRACTED, UNIT_STATE_ALL_STATE = 0xffffffff //(UNIT_STATE_STOPPED | UNIT_STATE_MOVING | UNIT_STATE_IN_COMBAT | UNIT_STATE_IN_FLIGHT) }; enum UnitMoveType { MOVE_WALK = 0, MOVE_RUN = 1, MOVE_RUN_BACK = 2, MOVE_SWIM = 3, MOVE_SWIM_BACK = 4, MOVE_TURN_RATE = 5, MOVE_FLIGHT = 6, MOVE_FLIGHT_BACK = 7, MOVE_PITCH_RATE = 8 }; #define MAX_MOVE_TYPE 9 extern float baseMoveSpeed[MAX_MOVE_TYPE]; extern float playerBaseMoveSpeed[MAX_MOVE_TYPE]; enum WeaponAttackType { BASE_ATTACK = 0, OFF_ATTACK = 1, RANGED_ATTACK = 2, MAX_ATTACK }; // Last check : 5.0.5 enum CombatRating { CR_WEAPON_SKILL = 0, CR_DEFENSE_SKILL = 1, // Removed in 4.0.1 CR_DODGE = 2, CR_PARRY = 3, CR_BLOCK = 4, CR_HIT_MELEE = 5, CR_HIT_RANGED = 6, CR_HIT_SPELL = 7, CR_CRIT_MELEE = 8, CR_CRIT_RANGED = 9, CR_CRIT_SPELL = 10, CR_HIT_TAKEN_MELEE = 11, // Deprecated since Cataclysm CR_HIT_TAKEN_RANGED = 12, // Deprecated since Cataclysm CR_HIT_TAKEN_SPELL = 13, // Deprecated since Cataclysm CR_RESILIENCE_CRIT_TAKEN = 14, CR_RESILIENCE_PLAYER_DAMAGE_TAKEN = 15, CR_CRIT_TAKEN_SPELL = 16, // Deprecated since Cataclysm CR_HASTE_MELEE = 17, CR_HASTE_RANGED = 18, CR_HASTE_SPELL = 19, CR_WEAPON_SKILL_MAINHAND = 20, CR_WEAPON_SKILL_OFFHAND = 21, CR_WEAPON_SKILL_RANGED = 22, CR_EXPERTISE = 23, CM_ARMOR_PENETRATION = 24, CR_MASTERY = 25, CR_PVP_POWER = 26, }; #define MAX_COMBAT_RATING 27 enum DamageEffectType { DIRECT_DAMAGE = 0, // used for normal weapon damage (not for class abilities or spells) SPELL_DIRECT_DAMAGE = 1, // spell/class abilities damage DOT = 2, HEAL = 3, NODAMAGE = 4, // used also in case when damage applied to health but not applied to spell channelInterruptFlags/etc SELF_DAMAGE = 5 }; // Value masks for UNIT_FIELD_FLAGS enum UnitFlags { UNIT_FLAG_SERVER_CONTROLLED = 0x00000001, // set only when unit movement is controlled by server - by SPLINE/MONSTER_MOVE packets, together with UNIT_FLAG_STUNNED; only set to units controlled by client; client function CGUnit_C::IsClientControlled returns false when set for owner UNIT_FLAG_NON_ATTACKABLE = 0x00000002, // not attackable UNIT_FLAG_DISABLE_MOVE = 0x00000004, UNIT_FLAG_PVP_ATTACKABLE = 0x00000008, // allow apply pvp rules to attackable state in addition to faction dependent state UNIT_FLAG_RENAME = 0x00000010, UNIT_FLAG_PREPARATION = 0x00000020, // don't take reagents for spells with SPELL_ATTR5_NO_REAGENT_WHILE_PREP UNIT_FLAG_UNK_6 = 0x00000040, UNIT_FLAG_NOT_ATTACKABLE_1 = 0x00000080, // ?? (UNIT_FLAG_PVP_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1) is NON_PVP_ATTACKABLE UNIT_FLAG_IMMUNE_TO_PC = 0x00000100, // disables combat/assistance with PlayerCharacters (PC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget UNIT_FLAG_IMMUNE_TO_NPC = 0x00000200, // disables combat/assistance with NonPlayerCharacters (NPC) - see Unit::_IsValidAttackTarget, Unit::_IsValidAssistTarget UNIT_FLAG_LOOTING = 0x00000400, // loot animation UNIT_FLAG_PET_IN_COMBAT = 0x00000800, // in combat?, 2.0.8 UNIT_FLAG_PVP = 0x00001000, // changed in 3.0.3 UNIT_FLAG_SILENCED = 0x00002000, // silenced, 2.1.1 UNIT_FLAG_UNK_14 = 0x00004000, // 2.0.8 UNIT_FLAG_UNK_15 = 0x00008000, UNIT_FLAG_UNK_16 = 0x00010000, UNIT_FLAG_PACIFIED = 0x00020000, // 3.0.3 ok UNIT_FLAG_STUNNED = 0x00040000, // 3.0.3 ok UNIT_FLAG_IN_COMBAT = 0x00080000, UNIT_FLAG_TAXI_FLIGHT = 0x00100000, // disable casting at client side spell not allowed by taxi flight (mounted?), probably used with 0x4 flag UNIT_FLAG_DISARMED = 0x00200000, // 3.0.3, disable melee spells casting..., "Required melee weapon" added to melee spells tooltip. UNIT_FLAG_CONFUSED = 0x00400000, UNIT_FLAG_FLEEING = 0x00800000, UNIT_FLAG_PLAYER_CONTROLLED = 0x01000000, // used in spell Eyes of the Beast for pet... let attack by controlled creature UNIT_FLAG_NOT_SELECTABLE = 0x02000000, UNIT_FLAG_SKINNABLE = 0x04000000, UNIT_FLAG_MOUNT = 0x08000000, UNIT_FLAG_UNK_28 = 0x10000000, UNIT_FLAG_UNK_29 = 0x20000000, // used in Feing Death spell UNIT_FLAG_SHEATHE = 0x40000000, UNIT_FLAG_UNK_31 = 0x80000000 }; // Value masks for UNIT_FIELD_FLAGS_2 enum UnitFlags2 { UNIT_FLAG2_FEIGN_DEATH = 0x00000001, UNIT_FLAG2_UNK1 = 0x00000002, // Hide unit model (show only player equip) UNIT_FLAG2_IGNORE_REPUTATION = 0x00000004, UNIT_FLAG2_COMPREHEND_LANG = 0x00000008, UNIT_FLAG2_MIRROR_IMAGE = 0x00000010, UNIT_FLAG2_INSTANTLY_APPEAR_MODEL = 0x00000020, // Unit model instantly appears when summoned (does not fade in) UNIT_FLAG2_FORCE_MOVEMENT = 0x00000040, UNIT_FLAG2_DISARM_OFFHAND = 0x00000080, UNIT_FLAG2_DISABLE_PRED_STATS = 0x00000100, // Player has disabled predicted stats (Used by raid frames) UNIT_FLAG2_DISARM_RANGED = 0x00000400, // this does not disable ranged weapon display (maybe additional flag needed?) UNIT_FLAG2_REGENERATE_POWER = 0x00000800, UNIT_FLAG2_RESTRICT_PARTY_INTERACTION = 0x00001000, // Restrict interaction to party or raid UNIT_FLAG2_PREVENT_SPELL_CLICK = 0x00002000, // Prevent spellclick UNIT_FLAG2_ALLOW_ENEMY_INTERACT = 0x00004000, UNIT_FLAG2_DISABLE_TURN = 0x00008000, UNIT_FLAG2_UNK2 = 0x00010000, UNIT_FLAG2_PLAY_DEATH_ANIM = 0x00020000, // Plays special death animation upon death UNIT_FLAG2_ALLOW_CHEAT_SPELLS = 0x00040000, // allows casting spells with AttributesEx7 & SPELL_ATTR7_IS_CHEAT_SPELL UNIT_FLAG2_UNK3 = 0x00080000, UNIT_FLAG2_UNK4 = 0x00100000, UNIT_FLAG2_UNK5 = 0x00200000, UNIT_FLAG2_UNK6 = 0x00400000, UNIT_FLAG2_UNK7 = 0x00800000, UNIT_FLAG2_UNK8 = 0x01000000, UNIT_FLAG2_UNK9 = 0x02000000, UNIT_FLAG2_UNK10 = 0x04000000 }; /// Non Player Character flags enum NPCFlags { UNIT_NPC_FLAG_NONE = 0x00000000, UNIT_NPC_FLAG_GOSSIP = 0x00000001, // 100% UNIT_NPC_FLAG_QUESTGIVER = 0x00000002, // 100% UNIT_NPC_FLAG_UNK1 = 0x00000004, UNIT_NPC_FLAG_UNK2 = 0x00000008, UNIT_NPC_FLAG_TRAINER = 0x00000010, // 100% UNIT_NPC_FLAG_TRAINER_CLASS = 0x00000020, // 100% UNIT_NPC_FLAG_TRAINER_PROFESSION = 0x00000040, // 100% UNIT_NPC_FLAG_VENDOR = 0x00000080, // 100% UNIT_NPC_FLAG_VENDOR_AMMO = 0x00000100, // 100%, general goods vendor UNIT_NPC_FLAG_VENDOR_FOOD = 0x00000200, // 100% UNIT_NPC_FLAG_VENDOR_POISON = 0x00000400, // guessed UNIT_NPC_FLAG_VENDOR_REAGENT = 0x00000800, // 100% UNIT_NPC_FLAG_REPAIR = 0x00001000, // 100% UNIT_NPC_FLAG_FLIGHTMASTER = 0x00002000, // 100% UNIT_NPC_FLAG_SPIRITHEALER = 0x00004000, // guessed UNIT_NPC_FLAG_SPIRITGUIDE = 0x00008000, // guessed UNIT_NPC_FLAG_INNKEEPER = 0x00010000, // 100% UNIT_NPC_FLAG_BANKER = 0x00020000, // 100% UNIT_NPC_FLAG_PETITIONER = 0x00040000, // 100% 0xC0000 = guild petitions, 0x40000 = arena team petitions UNIT_NPC_FLAG_TABARDDESIGNER = 0x00080000, // 100% UNIT_NPC_FLAG_BATTLEMASTER = 0x00100000, // 100% UNIT_NPC_FLAG_AUCTIONEER = 0x00200000, // 100% UNIT_NPC_FLAG_STABLEMASTER = 0x00400000, // 100% UNIT_NPC_FLAG_GUILD_BANKER = 0x00800000, // cause client to send 997 opcode UNIT_NPC_FLAG_SPELLCLICK = 0x01000000, // cause client to send 1015 opcode (spell click) UNIT_NPC_FLAG_PLAYER_VEHICLE = 0x02000000, // players with mounts that have vehicle data should have it set UNIT_NPC_FLAG_REFORGER = 0x08000000, // reforging UNIT_NPC_FLAG_TRANSMOGRIFIER = 0x10000000, // transmogrification UNIT_NPC_FLAG_VAULTKEEPER = 0x20000000, // void storage UNIT_NPC_FLAG_PETBATTLE = 0x40000000, // pet battle UNIT_NPC_FLAG_BLACK_MARKET = 0x80000000 // black market auction house }; /// Non Player Character flags enum NPCFlags2 { UNIT_NPC_FLAG2_NONE = 0x00000000, UNIT_NPC_FLAG2_ITEM_UPGRADE = 0x00000001 // Item Upgrade }; enum UnitTypeMask { UNIT_MASK_NONE = 0x00000000, UNIT_MASK_SUMMON = 0x00000001, UNIT_MASK_MINION = 0x00000002, UNIT_MASK_GUARDIAN = 0x00000004, UNIT_MASK_TOTEM = 0x00000008, UNIT_MASK_PET = 0x00000010, UNIT_MASK_VEHICLE = 0x00000020, UNIT_MASK_PUPPET = 0x00000040, UNIT_MASK_HUNTER_PET = 0x00000080, UNIT_MASK_CONTROLABLE_GUARDIAN = 0x00000100, UNIT_MASK_ACCESSORY = 0x00000200, }; namespace Movement{ class MoveSpline; } enum DiminishingLevels { DIMINISHING_LEVEL_1 = 0, DIMINISHING_LEVEL_2 = 1, DIMINISHING_LEVEL_3 = 2, DIMINISHING_LEVEL_IMMUNE = 3, DIMINISHING_LEVEL_4 = 3, DIMINISHING_LEVEL_TAUNT_IMMUNE = 4, }; struct DiminishingReturn { DiminishingReturn(DiminishingGroup group, uint32 t, uint32 count) : DRGroup(group), stack(0), hitTime(t), hitCount(count) {} DiminishingGroup DRGroup:16; uint16 stack:16; uint32 hitTime; uint32 hitCount; }; enum MeleeHitOutcome { MELEE_HIT_EVADE, MELEE_HIT_MISS, MELEE_HIT_DODGE, MELEE_HIT_BLOCK, MELEE_HIT_PARRY, MELEE_HIT_GLANCING, MELEE_HIT_CRIT, MELEE_HIT_CRUSHING, MELEE_HIT_NORMAL }; enum HealDamageLogType { DAMAGE_DONE_LOG = 0, DAMAGE_TAKE_LOG, HEAL_DONE_LOG, HEAL_TAKE_LOG, }; struct HealDamageLog { HealDamageLog() : m_value(0), m_time(0), m_type(DAMAGE_DONE_LOG) { } HealDamageLog(uint32 value, uint32 time, HealDamageLogType type) : m_value(value), m_time(time), m_type(type) { } uint32 m_value; uint32 m_time; HealDamageLogType m_type; }; class DispelInfo { public: explicit DispelInfo(Unit* dispeller, uint32 dispellerSpellId, uint8 chargesRemoved) : _dispellerUnit(dispeller), _dispellerSpell(dispellerSpellId), _chargesRemoved(chargesRemoved) {} Unit* GetDispeller() const { return _dispellerUnit; } uint32 GetDispellerSpellId() const { return _dispellerSpell; } uint8 GetRemovedCharges() const { return _chargesRemoved; } void SetRemovedCharges(uint8 amount) { _chargesRemoved = amount; } private: Unit* _dispellerUnit; uint32 _dispellerSpell; uint8 _chargesRemoved; }; struct CleanDamage { CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome) : absorbed_damage(absorbed), mitigated_damage(mitigated), attackType(_attackType), hitOutCome(_hitOutCome) {} uint32 absorbed_damage; uint32 mitigated_damage; WeaponAttackType attackType; MeleeHitOutcome hitOutCome; }; struct CalcDamageInfo; class DamageInfo { private: Unit* const m_attacker; Unit* const m_victim; uint32 m_damage; SpellInfo const* const m_spellInfo; SpellSchoolMask const m_schoolMask; DamageEffectType const m_damageType; WeaponAttackType m_attackType; uint32 m_absorb; uint32 m_resist; uint32 m_block; public: explicit DamageInfo(Unit* _attacker, Unit* _victim, uint32 _damage, SpellInfo const* _spellInfo, SpellSchoolMask _schoolMask, DamageEffectType _damageType); explicit DamageInfo(CalcDamageInfo& dmgInfo); void ModifyDamage(int32 amount); void AbsorbDamage(uint32 amount); void ResistDamage(uint32 amount); void BlockDamage(uint32 amount); Unit* GetAttacker() const { return m_attacker; }; Unit* GetVictim() const { return m_victim; }; SpellInfo const* GetSpellInfo() const { return m_spellInfo; }; SpellSchoolMask GetSchoolMask() const { return m_schoolMask; }; DamageEffectType GetDamageType() const { return m_damageType; }; WeaponAttackType GetAttackType() const { return m_attackType; }; uint32 GetDamage() const { return m_damage; }; uint32 GetAbsorb() const { return m_absorb; }; uint32 GetResist() const { return m_resist; }; uint32 GetBlock() const { return m_block; }; }; class HealInfo { private: Unit* const m_healer; Unit* const m_target; uint32 m_heal; uint32 m_absorb; SpellInfo const* const m_spellInfo; SpellSchoolMask const m_schoolMask; public: explicit HealInfo(Unit* _healer, Unit* _target, uint32 _heal, SpellInfo const* _spellInfo, SpellSchoolMask _schoolMask) : m_healer(_healer), m_target(_target), m_heal(_heal), m_spellInfo(_spellInfo), m_schoolMask(_schoolMask) { m_absorb = 0; } void AbsorbHeal(uint32 amount) { amount = std::min(amount, GetHeal()); m_absorb += amount; m_heal -= amount; } uint32 GetHeal() const { return m_heal; }; }; class ProcEventInfo { private: Unit* const _actor; Unit* const _actionTarget; Unit* const _procTarget; uint32 _typeMask; uint32 _spellTypeMask; uint32 _spellPhaseMask; uint32 _hitMask; Spell* _spell; DamageInfo* _damageInfo; HealInfo* _healInfo; public: explicit ProcEventInfo(Unit* actor, Unit* actionTarget, Unit* procTarget, uint32 typeMask, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell* spell, DamageInfo* damageInfo, HealInfo* healInfo); Unit* GetActor() { return _actor; }; Unit* GetActionTarget() const { return _actionTarget; } Unit* GetProcTarget() const { return _procTarget; } uint32 GetTypeMask() const { return _typeMask; } uint32 GetSpellTypeMask() const { return _spellTypeMask; } uint32 GetSpellPhaseMask() const { return _spellPhaseMask; } uint32 GetHitMask() const { return _hitMask; } SpellInfo const* GetSpellInfo() const { return NULL; } SpellSchoolMask GetSchoolMask() const { return SPELL_SCHOOL_MASK_NONE; } DamageInfo* GetDamageInfo() const { return _damageInfo; } HealInfo* GetHealInfo() const { return _healInfo; } }; // Struct for use in Unit::CalculateMeleeDamage // Need create structure like in SMSG_ATTACKER_STATE_UPDATE opcode struct CalcDamageInfo { Unit *attacker; // Attacker Unit *target; // Target for damage uint32 damageSchoolMask; uint32 damage; uint32 absorb; uint32 resist; uint32 blocked_amount; uint32 HitInfo; uint32 TargetState; // Helper WeaponAttackType attackType; // uint32 procAttacker; uint32 procVictim; uint32 procEx; uint32 cleanDamage; // Used only for rage calculation MeleeHitOutcome hitOutCome; // TODO: remove this field (need use TargetState) }; // Spell damage info structure based on structure sending in SMSG_SPELL_NON_MELEE_DAMAGE_LOG opcode struct SpellNonMeleeDamage{ SpellNonMeleeDamage(Unit* _attacker, Unit* _target, uint32 _SpellID, uint32 _schoolMask) : target(_target), attacker(_attacker), SpellID(_SpellID), damage(0), overkill(0), schoolMask(_schoolMask), absorb(0), resist(0), physicalLog(false), unused(false), blocked(0), HitInfo(0), cleanDamage(0) {} Unit *target; Unit *attacker; uint32 SpellID; uint32 damage; uint32 overkill; uint32 schoolMask; uint32 absorb; uint32 resist; bool physicalLog; bool unused; uint32 blocked; uint32 HitInfo; // Used for help uint32 cleanDamage; }; struct SpellPeriodicAuraLogInfo { SpellPeriodicAuraLogInfo(constAuraEffectPtr _auraEff, uint32 _damage, uint32 _overDamage, uint32 _absorb, uint32 _resist, float _multiplier, bool _critical) : auraEff(_auraEff), damage(_damage), overDamage(_overDamage), absorb(_absorb), resist(_resist), multiplier(_multiplier), critical(_critical){} constAuraEffectPtr auraEff; uint32 damage; uint32 overDamage; // overkill/overheal uint32 absorb; uint32 resist; float multiplier; bool critical; }; uint32 createProcExtendMask(SpellNonMeleeDamage* damageInfo, SpellMissInfo missCondition); #define MAX_DECLINED_NAME_CASES 5 struct DeclinedName { std::string name[MAX_DECLINED_NAME_CASES]; }; enum CurrentSpellTypes { CURRENT_MELEE_SPELL = 0, CURRENT_GENERIC_SPELL = 1, CURRENT_CHANNELED_SPELL = 2, CURRENT_AUTOREPEAT_SPELL = 3 }; #define CURRENT_FIRST_NON_MELEE_SPELL 1 #define CURRENT_MAX_SPELL 4 struct GlobalCooldown { explicit GlobalCooldown(uint32 _dur = 0, uint32 _time = 0) : duration(_dur), cast_time(_time) {} uint32 duration; uint32 cast_time; }; typedef UNORDERED_MAP<uint32 /*category*/, GlobalCooldown> GlobalCooldownList; class GlobalCooldownMgr // Shared by Player and CharmInfo { public: GlobalCooldownMgr() {} public: bool HasGlobalCooldown(SpellInfo const* spellInfo) const; void AddGlobalCooldown(SpellInfo const* spellInfo, uint32 gcd); void CancelGlobalCooldown(SpellInfo const* spellInfo); private: GlobalCooldownList m_GlobalCooldowns; }; enum ActiveStates { ACT_PASSIVE = 0x01, // 0x01 - passive ACT_DISABLED = 0x81, // 0x80 - castable ACT_ENABLED = 0xC1, // 0x40 | 0x80 - auto cast + castable ACT_COMMAND = 0x07, // 0x01 | 0x02 | 0x04 ACT_REACTION = 0x06, // 0x02 | 0x04 ACT_DECIDE = 0x00 // custom }; enum ReactStates { REACT_PASSIVE = 0, REACT_DEFENSIVE = 1, REACT_AGGRESSIVE = 2, REACT_HELPER = 3 }; enum CommandStates { COMMAND_STAY = 0, COMMAND_FOLLOW = 1, COMMAND_ATTACK = 2, COMMAND_ABANDON = 3, COMMAND_MOVE_TO = 4 }; #define UNIT_ACTION_BUTTON_ACTION(X) (uint32(X) & 0x00FFFFFF) #define UNIT_ACTION_BUTTON_TYPE(X) ((uint32(X) & 0xFF000000) >> 24) #define MAKE_UNIT_ACTION_BUTTON(A, T) (uint32(A) | (uint32(T) << 24)) struct UnitActionBarEntry { UnitActionBarEntry() : packedData(uint32(ACT_DISABLED) << 24) {} uint32 packedData; // helper ActiveStates GetType() const { return ActiveStates(UNIT_ACTION_BUTTON_TYPE(packedData)); } uint32 GetAction() const { return UNIT_ACTION_BUTTON_ACTION(packedData); } bool IsActionBarForSpell() const { ActiveStates Type = GetType(); return Type == ACT_DISABLED || Type == ACT_ENABLED || Type == ACT_PASSIVE; } void SetActionAndType(uint32 action, ActiveStates type) { packedData = MAKE_UNIT_ACTION_BUTTON(action, type); } void SetType(ActiveStates type) { packedData = MAKE_UNIT_ACTION_BUTTON(UNIT_ACTION_BUTTON_ACTION(packedData), type); } void SetAction(uint32 action) { packedData = (packedData & 0xFF000000) | UNIT_ACTION_BUTTON_ACTION(action); } }; typedef std::list<Player*> SharedVisionList; enum CharmType { CHARM_TYPE_CHARM, CHARM_TYPE_POSSESS, CHARM_TYPE_VEHICLE, CHARM_TYPE_CONVERT, }; typedef UnitActionBarEntry CharmSpellInfo; enum ActionBarIndex { ACTION_BAR_INDEX_START = 0, ACTION_BAR_INDEX_PET_SPELL_START = 3, ACTION_BAR_INDEX_PET_SPELL_END = 7, ACTION_BAR_INDEX_END = 10, }; #define MAX_UNIT_ACTION_BAR_INDEX (ACTION_BAR_INDEX_END-ACTION_BAR_INDEX_START) struct CharmInfo { public: explicit CharmInfo(Unit* unit); ~CharmInfo(); void RestoreState(); uint32 GetPetNumber() const { return m_petnumber; } void SetPetNumber(uint32 petnumber, bool statwindow); void SetCommandState(CommandStates st) { m_CommandState = st; } CommandStates GetCommandState() const { return m_CommandState; } bool HasCommandState(CommandStates state) const { return (m_CommandState == state); } void InitPossessCreateSpells(); void InitCharmCreateSpells(); void InitPetActionBar(); void InitEmptyActionBar(bool withAttack = true); //return true if successful bool AddSpellToActionBar(SpellInfo const* spellInfo, ActiveStates newstate = ACT_DECIDE); bool RemoveSpellFromActionBar(uint32 spell_id); void LoadPetActionBar(const std::string& data); void BuildActionBar(WorldPacket* data); void SetSpellAutocast(SpellInfo const* spellInfo, bool state); void SetActionBar(uint8 index, uint32 spellOrAction, ActiveStates type) { PetActionBar[index].SetActionAndType(spellOrAction, type); } UnitActionBarEntry const* GetActionBarEntry(uint8 index) const { return &(PetActionBar[index]); } void ToggleCreatureAutocast(SpellInfo const* spellInfo, bool apply); CharmSpellInfo* GetCharmSpell(uint8 index) { return &(m_charmspells[index]); } GlobalCooldownMgr& GetGlobalCooldownMgr() { return m_GlobalCooldownMgr; } void SetIsCommandAttack(bool val); bool IsCommandAttack(); void SetIsCommandFollow(bool val); bool IsCommandFollow(); void SetIsAtStay(bool val); bool IsAtStay(); void SetIsFollowing(bool val); bool IsFollowing(); void SetIsReturning(bool val); bool IsReturning(); void SaveStayPosition(); void GetStayPosition(float &x, float &y, float &z); private: Unit* m_unit; UnitActionBarEntry PetActionBar[MAX_UNIT_ACTION_BAR_INDEX]; CharmSpellInfo m_charmspells[4]; CommandStates m_CommandState; uint32 m_petnumber; bool m_barInit; //for restoration after charmed ReactStates m_oldReactState; bool m_isCommandAttack; bool _isCommandFollow; bool m_isAtStay; bool m_isFollowing; bool m_isReturning; float m_stayX; float m_stayY; float m_stayZ; GlobalCooldownMgr m_GlobalCooldownMgr; }; // for clearing special attacks #define REACTIVE_TIMER_START 4000 enum ReactiveType { REACTIVE_DEFENSE = 0, REACTIVE_HUNTER_PARRY = 1, REACTIVE_OVERPOWER = 2 }; #define MAX_REACTIVE 3 #define SUMMON_SLOT_PET 0 #define SUMMON_SLOT_TOTEM 1 #define MAX_TOTEM_SLOT 5 #define SUMMON_SLOT_MINIPET 5 #define SUMMON_SLOT_QUEST 6 #define MAX_SUMMON_SLOT 7 #define MAX_GAMEOBJECT_SLOT 4 enum PlayerTotemType { SUMMON_TYPE_TOTEM_FIRE = 63, SUMMON_TYPE_TOTEM_FIRE2 = 3403, SUMMON_TYPE_TOTEM_FIRE3 = 3599, SUMMON_TYPE_TOTEM_FIRE4 = 3211, SUMMON_TYPE_TOTEM_EARTH = 81, SUMMON_TYPE_TOTEM_EARTH2 = 3400, SUMMON_TYPE_TOTEM_EARTH3 = 3404, SUMMON_TYPE_TOTEM_WATER = 82, SUMMON_TYPE_TOTEM_WATER2 = 3402, SUMMON_TYPE_TOTEM_AIR = 83, SUMMON_TYPE_TOTEM_AIR2 = 3405, SUMMON_TYPE_TOTEM_AIR3 = 3407, SUMMON_TYPE_TOTEM_AIR4 = 3406, SUMMON_TYPE_TOTEM_AIR5 = 3399 }; enum Stagger { LIGHT_STAGGER = 124275, MODERATE_STAGGER = 124274, HEAVY_STAGGER = 124273 }; // delay time next attack to prevent client attack animation problems #define ATTACK_DISPLAY_DELAY 200 #define MAX_PLAYER_STEALTH_DETECT_RANGE 30.0f // max distance for detection targets by player struct SpellProcEventEntry; // used only privately class Unit : public WorldObject { public: typedef std::set<Unit*> AttackerSet; typedef std::set<Unit*> ControlList; typedef std::pair<uint32, uint8> spellEffectPair; typedef std::multimap<uint32, AuraPtr> AuraMap; typedef std::multimap<uint32, AuraApplication*> AuraApplicationMap; typedef std::multimap<AuraStateType, AuraApplication*> AuraStateAurasMap; typedef std::list<AuraEffectPtr> AuraEffectList; typedef std::list<AuraPtr> AuraList; typedef std::list<AuraApplication *> AuraApplicationList; typedef std::list<DiminishingReturn> Diminishing; typedef std::set<uint32> ComboPointHolderSet; typedef std::vector<uint32> AuraIdList; typedef std::map<uint8, AuraApplication*> VisibleAuraMap; virtual ~Unit(); UnitAI* GetAI() { return i_AI; } void SetAI(UnitAI* newAI) { i_AI = newAI; } void AddToWorld(); void RemoveFromWorld(); void CleanupBeforeRemoveFromMap(bool finalCleanup); void CleanupsBeforeDelete(bool finalCleanup = true); // used in ~Creature/~Player (or before mass creature delete to remove cross-references to already deleted units) DiminishingLevels GetDiminishing(DiminishingGroup group); void IncrDiminishing(DiminishingGroup group); float ApplyDiminishingToDuration(DiminishingGroup group, int32 &duration, Unit* caster, DiminishingLevels Level, int32 limitduration); void ApplyDiminishingAura(DiminishingGroup group, bool apply); void ClearDiminishings() { m_Diminishing.clear(); } // target dependent range checks float GetSpellMaxRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const; float GetSpellMinRangeForTarget(Unit const* target, SpellInfo const* spellInfo) const; bool CanIgnoreMinRange(Unit const* target, SpellInfo const* spellInfo) const; virtual void Update(uint32 time); void setAttackTimer(WeaponAttackType type, uint32 time) { m_attackTimer[type] = time; } void resetAttackTimer(WeaponAttackType type = BASE_ATTACK); uint32 getAttackTimer(WeaponAttackType type) const { return m_attackTimer[type]; } bool isAttackReady(WeaponAttackType type = BASE_ATTACK) const { return m_attackTimer[type] == 0; } bool haveOffhandWeapon() const; bool CanDualWield() const { return m_canDualWield; } void SetCanDualWield(bool value) { m_canDualWield = value; } float GetCombatReach() const { return m_floatValues[UNIT_FIELD_COMBATREACH]; } float GetMeleeReach() const { float reach = m_floatValues[UNIT_FIELD_COMBATREACH]; return reach > MIN_MELEE_REACH ? reach : MIN_MELEE_REACH; } bool IsWithinCombatRange(const Unit* obj, float dist2compare) const; bool IsWithinMeleeRange(const Unit* obj, float dist = MELEE_RANGE) const; void GetRandomContactPoint(const Unit* target, float &x, float &y, float &z, float distance2dMin, float distance2dMax) const; uint32 m_extraAttacks; bool m_canDualWield; int32 insightCount; void _addAttacker(Unit* pAttacker) // must be called only from Unit::Attack(Unit*) { m_attackers.insert(pAttacker); } void _removeAttacker(Unit* pAttacker) // must be called only from Unit::AttackStop() { m_attackers.erase(pAttacker); } Unit* getAttackerForHelper() const // If someone wants to help, who to give them { if (getVictim() != NULL) return getVictim(); if (!m_attackers.empty()) return *(m_attackers.begin()); return NULL; } bool Attack(Unit* victim, bool meleeAttack); void CastStop(uint32 except_spellid = 0); bool AttackStop(); void RemoveAllAttackers(); AttackerSet const& getAttackers() const { return m_attackers; } bool isAttackingPlayer() const; Unit* getVictim() const { return m_attacking; } void CombatStop(bool includingCast = false); void CombatStopWithPets(bool includingCast = false); void StopAttackFaction(uint32 faction_id); void GetAttackableUnitListInRange(std::list<Unit*> &list, float fMaxSearchRange) const; Unit* SelectNearbyTarget(Unit* exclude = NULL, float dist = NOMINAL_MELEE_RANGE) const; Unit* SelectNearbyAlly(Unit* exclude = NULL, float dist = NOMINAL_MELEE_RANGE) const; void SendMeleeAttackStop(Unit* victim = NULL); void SendMeleeAttackStart(Unit* victim); bool IsVisionObscured(Unit* victim, SpellInfo const* spellInfo); // Part of Evade mechanics time_t GetLastDamagedTime() const { return _lastDamagedTime; } void SetLastDamagedTime(time_t val) { _lastDamagedTime = val; } void AddUnitState(uint32 f) { m_state |= f; } bool HasUnitState(const uint32 f) const { return (m_state & f); } void ClearUnitState(uint32 f) { m_state &= ~f; } bool CanFreeMove() const { return !HasUnitState(UNIT_STATE_CONFUSED | UNIT_STATE_FLEEING | UNIT_STATE_IN_FLIGHT | UNIT_STATE_ROOT | UNIT_STATE_STUNNED | UNIT_STATE_DISTRACTED) && GetOwnerGUID() == 0; } uint32 HasUnitTypeMask(uint32 mask) const { return mask & m_unitTypeMask; } void AddUnitTypeMask(uint32 mask) { m_unitTypeMask |= mask; } bool isSummon() const { return m_unitTypeMask & UNIT_MASK_SUMMON; } bool isGuardian() const { return m_unitTypeMask & UNIT_MASK_GUARDIAN; } bool isPet() const { return m_unitTypeMask & UNIT_MASK_PET; } bool isHunterPet() const{ return m_unitTypeMask & UNIT_MASK_HUNTER_PET; } bool isTotem() const { return m_unitTypeMask & UNIT_MASK_TOTEM; } bool IsVehicle() const { return m_unitTypeMask & UNIT_MASK_VEHICLE; } bool IsPetGuardianStuff() const { return m_unitTypeMask & ( UNIT_MASK_SUMMON | UNIT_MASK_GUARDIAN | UNIT_MASK_PET | UNIT_MASK_HUNTER_PET | UNIT_MASK_TOTEM ); } uint8 getLevel() const { return uint8(GetUInt32Value(UNIT_FIELD_LEVEL)); } uint8 getLevelForTarget(WorldObject const* /*target*/) const { return getLevel(); } void SetLevel(uint8 lvl); uint8 getRace() const { return GetByteValue(UNIT_FIELD_BYTES_0, 0); } uint32 getRaceMask() const { return 1 << (getRace()-1); } uint8 getClass() const { return GetByteValue(UNIT_FIELD_BYTES_0, 1); } uint32 getClassMask() const { return 1 << (getClass()-1); } uint8 getGender() const { return GetByteValue(UNIT_FIELD_BYTES_0, 3); } float GetStat(Stats stat) const { return float(GetUInt32Value(UNIT_FIELD_STAT0+stat)); } void SetStat(Stats stat, int32 val) { SetStatInt32Value(UNIT_FIELD_STAT0+stat, val); } uint32 GetArmor() const { return GetResistance(SPELL_SCHOOL_NORMAL); } void SetArmor(int32 val) { SetResistance(SPELL_SCHOOL_NORMAL, val); } uint32 GetResistance(SpellSchools school) const { return GetUInt32Value(UNIT_FIELD_RESISTANCES+school); } uint32 GetResistance(SpellSchoolMask mask) const; void SetResistance(SpellSchools school, int32 val) { SetStatInt32Value(UNIT_FIELD_RESISTANCES+school, val); } uint32 GetHealth() const { return GetUInt32Value(UNIT_FIELD_HEALTH); } uint32 GetMaxHealth() const { return GetUInt32Value(UNIT_FIELD_MAXHEALTH); } bool IsFullHealth() const { return GetHealth() == GetMaxHealth(); } bool HealthBelowPct(int32 pct) const { return GetHealth() < CountPctFromMaxHealth(pct); } bool HealthBelowPctDamaged(int32 pct, uint32 damage) const { return int64(GetHealth()) - int64(damage) < int64(CountPctFromMaxHealth(pct)); } bool HealthAbovePct(int32 pct) const { return GetHealth() > CountPctFromMaxHealth(pct); } bool HealthAbovePctHealed(int32 pct, uint32 heal) const { return uint64(GetHealth()) + uint64(heal) > CountPctFromMaxHealth(pct); } float GetHealthPct() const { return GetMaxHealth() ? 100.f * GetHealth() / GetMaxHealth() : 0.0f; } uint32 CountPctFromMaxHealth(int32 pct) const { return CalculatePct(GetMaxHealth(), pct); } uint32 CountPctFromCurHealth(int32 pct) const { return CalculatePct(GetHealth(), pct); } uint32 CountPctFromMaxMana(int32 pct) const { return CalculatePct(GetMaxPower(POWER_MANA), pct); } uint32 CountPctFromCurMana(int32 pct) const { return CalculatePct(GetPower(POWER_MANA), pct); } uint32 CountPctFromMaxPower(int32 pct, Powers power) const { return CalculatePct(GetMaxPower(power), pct); } uint32 CountPctFromCurPower(int32 pct, Powers power) const { return CalculatePct(GetPower(power), pct); } void SetHealth(uint32 val); void SetMaxHealth(uint32 val); inline void SetFullHealth() { SetHealth(GetMaxHealth()); } int32 ModifyHealth(int32 val); int32 GetHealthGain(int32 dVal); Powers getPowerType() const { return Powers(GetUInt32Value(UNIT_FIELD_DISPLAY_POWER)); } void setPowerType(Powers power); int32 GetPower(Powers power) const; int32 GetMinPower(Powers power) const { return power == POWER_ECLIPSE ? -100 : 0; } int32 GetMaxPower(Powers power) const; void SetPower(Powers power, int32 val, bool regen = false); void SetMaxPower(Powers power, int32 val); SpellPowerEntry const* GetSpellPowerEntryBySpell(SpellInfo const* spell) const; // returns the change in power int32 ModifyPower(Powers power, int32 val); int32 ModifyPowerPct(Powers power, float pct, bool apply = true); uint32 GetPowerIndexByClass(uint32 powerId, uint32 classId) const; uint32 GetAttackTime(WeaponAttackType att) const { float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME+att) / m_modAttackSpeedPct[att]; return (uint32)f_BaseAttackTime; } void SetAttackTime(WeaponAttackType att, uint32 val) { SetFloatValue(UNIT_FIELD_BASEATTACKTIME+att, val*m_modAttackSpeedPct[att]); } void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply); void ApplyCastTimePercentMod(float val, bool apply); SheathState GetSheath() const { return SheathState(GetByteValue(UNIT_FIELD_BYTES_2, 0)); } virtual void SetSheath(SheathState sheathed) { SetByteValue(UNIT_FIELD_BYTES_2, 0, sheathed); } // faction template id uint32 getFaction() const { return GetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE); } void setFaction(uint32 faction) { SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction); } FactionTemplateEntry const* getFactionTemplateEntry() const; ReputationRank GetReactionTo(Unit const* target) const; ReputationRank static GetFactionReactionTo(FactionTemplateEntry const* factionTemplateEntry, Unit const* target); bool IsHostileTo(Unit const* unit) const; bool IsHostileToPlayers() const; bool IsFriendlyTo(Unit const* unit) const; bool IsNeutralToAll() const; bool IsInPartyWith(Unit const* unit) const; bool IsInRaidWith(Unit const* unit) const; void GetPartyMembers(std::list<Unit*> &units); bool IsContestedGuard() const { if (FactionTemplateEntry const* entry = getFactionTemplateEntry()) return entry->IsContestedGuardFaction(); return false; } bool IsPvP() const { return HasByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP); } void SetPvP(bool state) { if (state) SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP); else RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_PVP); } uint32 GetCreatureType() const; uint32 GetCreatureTypeMask() const { uint32 creatureType = GetCreatureType(); return (creatureType >= 1) ? (1 << (creatureType - 1)) : 0; } uint8 getStandState() const { return GetByteValue(UNIT_FIELD_BYTES_1, 0); } bool IsSitState() const; bool IsStandState() const; void SetStandState(uint8 state); void SetStandFlags(uint8 flags) { SetByteFlag(UNIT_FIELD_BYTES_1, 2, flags); } void RemoveStandFlags(uint8 flags) { RemoveByteFlag(UNIT_FIELD_BYTES_1, 2, flags); } bool IsMounted() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_MOUNT); } uint32 GetMountID() const { return GetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID); } void Mount(uint32 mount, uint32 vehicleId = 0, uint32 creatureEntry = 0); void Dismount(); void SendMountResult(MountResult error); MountCapabilityEntry const* GetMountCapability(uint32 mountType) const; void SendDurabilityLoss(Player* receiver, uint32 percent); void PlayOneShotAnimKit(uint32 id); uint16 GetMaxSkillValueForLevel(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } void DealDamageMods(Unit* victim, uint32 &damage, uint32* absorb); uint32 DealDamage(Unit* victim, uint32 damage, CleanDamage const* cleanDamage = NULL, DamageEffectType damagetype = DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* spellProto = NULL, bool durabilityLoss = true); uint32 CalcStaggerDamage(Player* victim, uint32 damage); void Kill(Unit* victim, bool durabilityLoss = true, SpellInfo const* spellProto = NULL); int32 DealHeal(Unit* victim, uint32 addhealth, SpellInfo const* spellProto = NULL); void ProcDamageAndSpell(Unit* victim, uint32 procAttacker, uint32 procVictim, uint32 procEx, uint32 amount, uint32 absorb = 0, WeaponAttackType attType = BASE_ATTACK, SpellInfo const* procSpell = NULL, SpellInfo const* procAura = NULL); void ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage, uint32 absorb = 0, SpellInfo const* procAura = NULL); bool IsNoBreakingCC(bool isVictim, Unit* target, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, SpellInfo const* procSpell, uint32 damage, uint32 absorb, SpellInfo const* procAura, SpellInfo const* spellProto) const; void GetProcAurasTriggeredOnEvent(std::list<AuraApplication*>& aurasTriggeringProc, std::list<AuraApplication*>* procAuras, ProcEventInfo eventInfo); void TriggerAurasProcOnEvent(CalcDamageInfo& damageInfo); void TriggerAurasProcOnEvent(std::list<AuraApplication*>* myProcAuras, std::list<AuraApplication*>* targetProcAuras, Unit* actionTarget, uint32 typeMaskActor, uint32 typeMaskActionTarget, uint32 spellTypeMask, uint32 spellPhaseMask, uint32 hitMask, Spell* spell, DamageInfo* damageInfo, HealInfo* healInfo); void TriggerAurasProcOnEvent(ProcEventInfo& eventInfo, std::list<AuraApplication*>& procAuras); void HandleEmoteCommand(uint32 anim_id); void AttackerStateUpdate (Unit* victim, WeaponAttackType attType = BASE_ATTACK, bool extra = false); void CalculateMeleeDamage(Unit* victim, uint32 damage, CalcDamageInfo* damageInfo, WeaponAttackType attackType = BASE_ATTACK); void DealMeleeDamage(CalcDamageInfo* damageInfo, bool durabilityLoss); void HandleProcExtraAttackFor(Unit* victim); void CalculateSpellDamageTaken(SpellNonMeleeDamage* damageInfo, int32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType = BASE_ATTACK, bool crit = false); void DealSpellDamage(SpellNonMeleeDamage* damageInfo, bool durabilityLoss); // player or player's pet resilience (-1%) uint32 GetCritDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_CRIT_TAKEN, 33.0f, damage); } uint32 GetDamageReduction(uint32 damage) const { return GetCombatRatingDamageReduction(CR_RESILIENCE_PLAYER_DAMAGE_TAKEN, 100.0f, damage); } void ApplyResilience(const Unit* victim, int32 * damage) const; float MeleeSpellMissChance(const Unit* victim, WeaponAttackType attType, uint32 spellId) const; SpellMissInfo MeleeSpellHitResult(Unit* victim, SpellInfo const* spell); SpellMissInfo MagicSpellHitResult(Unit* victim, SpellInfo const* spell); SpellMissInfo SpellHitResult(Unit* victim, SpellInfo const* spell, bool canReflect = false); float GetUnitDodgeChance() const; float GetUnitParryChance() const; float GetUnitBlockChance() const; float GetUnitMissChance(WeaponAttackType attType) const; float GetUnitCriticalChance(WeaponAttackType attackType, const Unit* victim) const; int32 GetMechanicResistChance(const SpellInfo* spell); bool CanUseAttackType(uint8 attacktype) const { switch (attacktype) { case BASE_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED); case OFF_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_DISARM_OFFHAND); case RANGED_ATTACK: return !HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_DISARM_RANGED); } return true; } virtual uint32 GetBlockPercent() { return 30; } uint32 GetUnitMeleeSkill(Unit const* target = NULL) const { return (target ? getLevelForTarget(target) : getLevel()) * 5; } float GetWeaponProcChance() const; float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo* spellProto) const; MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType) const; MeleeHitOutcome RollMeleeOutcomeAgainst (const Unit* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const; bool isVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); } bool isTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); } bool isQuestGiver() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } bool isGossip() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); } bool isTaxi() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_FLIGHTMASTER); } bool isGuildMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PETITIONER); } bool isBattleMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BATTLEMASTER); } bool isBanker() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BANKER); } bool isInnkeeper() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_INNKEEPER); } bool isSpiritHealer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER); } bool isSpiritGuide() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITGUIDE); } bool isTabardDesigner()const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TABARDDESIGNER); } bool isAuctioner() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_AUCTIONEER); } bool isArmorer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_REPAIR); } bool isServiceProvider() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR | UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_FLIGHTMASTER | UNIT_NPC_FLAG_PETITIONER | UNIT_NPC_FLAG_BATTLEMASTER | UNIT_NPC_FLAG_BANKER | UNIT_NPC_FLAG_INNKEEPER | UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE | UNIT_NPC_FLAG_TABARDDESIGNER | UNIT_NPC_FLAG_AUCTIONEER); } bool isSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); } bool isInFlight() const { return HasUnitState(UNIT_STATE_IN_FLIGHT); } bool isInCombat() const { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT); } void CombatStart(Unit* target, bool initialAggro = true); void SetInCombatState(bool PvP, Unit* enemy = NULL, bool isControlled = false); void SetInCombatWith(Unit* enemy); void ClearInCombat(); uint32 GetCombatTimer() const { return m_CombatTimer; } void SetCombatTimer(uint32 value) { m_CombatTimer = value; } bool HasAuraTypeWithFamilyFlags(AuraType auraType, uint32 familyName, uint32 familyFlags) const; bool virtual HasSpell(uint32 /*spellID*/) const { return false; } bool HasCrowdControlAuraType(AuraType type, uint32 excludeAura = 0) const; bool HasCrowdControlAura(Unit* excludeCasterChannel = NULL) const; bool HasBreakableByDamageAuraType(AuraType type, uint32 excludeAura = 0) const; bool HasBreakableByDamageCrowdControlAura(Unit* excludeCasterChannel = NULL) const; bool HasStealthAura() const { return HasAuraType(SPELL_AURA_MOD_STEALTH); } bool HasInvisibilityAura() const { return HasAuraType(SPELL_AURA_MOD_INVISIBILITY); } bool isFeared() const { return HasAuraType(SPELL_AURA_MOD_FEAR) || HasAuraType(SPELL_AURA_MOD_FEAR_2); } bool isInRoots() const { return HasAuraType(SPELL_AURA_MOD_ROOT); } bool isInStun() const { return HasAuraType(SPELL_AURA_MOD_STUN); } bool IsPolymorphed() const; bool isFrozen() const; bool isTargetableForAttack(bool checkFakeDeath = true) const; bool IsValidAttackTarget(Unit const* target) const; bool _IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, WorldObject const* obj = NULL) const; bool IsValidAssistTarget(Unit const* target) const; bool _IsValidAssistTarget(Unit const* target, SpellInfo const* bySpell) const; virtual bool IsInWater() const; virtual bool IsUnderWater() const; virtual void UpdateUnderwaterState(Map* m, float x, float y, float z); bool isInAccessiblePlaceFor(Creature const* c) const; void SendHealSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, uint32 OverHeal, uint32 Absorb, bool critical = false); int32 HealBySpell(Unit* victim, SpellInfo const* spellInfo, uint32 addHealth, bool critical = false); void SendEnergizeSpellLog(Unit* victim, uint32 SpellID, uint32 Damage, Powers powertype); void EnergizeBySpell(Unit* victim, uint32 SpellID, int32 Damage, Powers powertype); uint32 SpellNonMeleeDamageLog(Unit* victim, uint32 spellID, uint32 damage); void CastSpell(SpellCastTargets const& targets, SpellInfo const* spellInfo, CustomSpellValues const* value, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0, float periodicDamageModifier = 0.0f); void CastSpell(Unit* victim, uint32 spellId, bool triggered, Item* castItem = NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0, float periodicDamageModifier = 0.0f); void CastSpell(Unit* victim, uint32 spellId, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem = NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0, float periodicDamageModifier = 0.0f); void CastSpell(Unit* victim, SpellInfo const* spellInfo, bool triggered, Item* castItem= NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); void CastSpell(Unit* victim, SpellInfo const* spellInfo, TriggerCastFlags triggerFlags = TRIGGERED_NONE, Item* castItem= NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0, float periodicDamageModifier = 0.0f); void CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item* castItem = NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, bool triggered, Item* castItem= NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); void CastCustomSpell(Unit* Victim, uint32 spellId, int32 const* bp0, int32 const* bp1, int32 const* bp2, int32 const* bp3, int32 const* bp4, int32 const* bp5, bool triggered, Item* castItem= NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); void CastCustomSpell(uint32 spellId, SpellValueMod mod, int32 value, Unit* Victim = NULL, bool triggered = true, Item* castItem = NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); void CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* Victim = NULL, bool triggered = true, Item* castItem = NULL, constAuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); void CastSpell(GameObject* go, uint32 spellId, bool triggered, Item* castItem = NULL, AuraEffectPtr triggeredByAura = NULLAURA_EFFECT, uint64 originalCaster = 0); AuraPtr ToggleAura(uint32 spellId, Unit* target); AuraPtr AddAura(uint32 spellId, Unit* target); AuraPtr AddAura(SpellInfo const* spellInfo, uint32 effMask, Unit* target); void SetAuraStack(uint32 spellId, Unit* target, uint32 stack); void SendPlaySpellVisualKit(uint32 id, uint32 unkParam); void DeMorph(); void SendAttackStateUpdate(CalcDamageInfo* damageInfo); void SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount); void SendSpellNonMeleeDamageLog(SpellNonMeleeDamage* log); void SendSpellNonMeleeDamageLog(Unit* target, uint32 SpellID, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit = false); void SendPeriodicAuraLog(SpellPeriodicAuraLogInfo* pInfo); void SendSpellMiss(Unit* target, uint32 spellID, SpellMissInfo missInfo); void SendSpellDamageResist(Unit* target, uint32 spellId); void SendSpellDamageImmune(Unit* target, uint32 spellId); void SendMessageUnfriendlyToSetInRange(WorldPacket* data, float fist); void NearTeleportTo(float x, float y, float z, float orientation, bool casting = false); void SendTeleportPacket(Position &oldPos); virtual bool UpdatePosition(float x, float y, float z, float ang, bool teleport = false); // returns true if unit's position really changed bool UpdatePosition(const Position &pos, bool teleport = false) { return UpdatePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation(), teleport); } void UpdateOrientation(float orientation); void UpdateHeight(float newZ); void SendMoveKnockBack(Player* player, float speedXY, float speedZ, float vcos, float vsin); void KnockbackFrom(float x, float y, float speedXY, float speedZ); void JumpTo(float speedXY, float speedZ, bool forward = true); void JumpTo(WorldObject* obj, float speedZ); void MonsterMoveWithSpeed(float x, float y, float z, float speed); //void SetFacing(float ori, WorldObject* obj = NULL); //void SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 type, uint32 MovementFlags, uint32 Time, Player* player = NULL); void SendMovementFlagUpdate(bool self = false); /*! These methods send the same packet to the client in apply and unapply case. The client-side interpretation of this packet depends on the presence of relevant movementflags which are sent with movementinfo. Furthermore, these packets are broadcast to nearby players as well as the current unit. */ void SendMovementHover(bool apply); void SendMovementFeatherFall(); void SendMovementWaterWalking(bool enable, bool packetOnly = false); void SendMovementGravityChange(); void SendMovementCanFlyChange(); void SendCanTurnWhileFalling(bool apply); bool IsLevitating() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY);} bool IsWalking() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_WALKING);} virtual bool SetWalk(bool enable); virtual bool SetDisableGravity(bool disable, bool packetOnly = false); bool SetHover(bool enable); void SetInFront(Unit const* target); void SetFacingTo(float ori); void SetFacingToObject(WorldObject* object); void SendChangeCurrentVictimOpcode(HostileReference* pHostileReference); void SendClearThreatListOpcode(); void SendRemoveFromThreatListOpcode(HostileReference* pHostileReference); void SendThreatListUpdate(); void SendClearTarget(); void BuildHeartBeatMsg(WorldPacket* data) const; bool isAlive() const { return (m_deathState == ALIVE); }; bool isDying() const { return (m_deathState == JUST_DIED); }; bool isDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); }; DeathState getDeathState() { return m_deathState; }; virtual void setDeathState(DeathState s); // overwrited in Creature/Player/Pet uint64 GetOwnerGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMONEDBY); } void SetOwnerGUID(uint64 owner); uint64 GetCreatorGUID() const { return GetUInt64Value(UNIT_FIELD_CREATEDBY); } void SetCreatorGUID(uint64 creator) { SetUInt64Value(UNIT_FIELD_CREATEDBY, creator); } uint64 GetMinionGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMON); } void SetMinionGUID(uint64 guid) { SetUInt64Value(UNIT_FIELD_SUMMON, guid); } uint64 GetCharmerGUID() const { return GetUInt64Value(UNIT_FIELD_CHARMEDBY); } void SetCharmerGUID(uint64 owner) { SetUInt64Value(UNIT_FIELD_CHARMEDBY, owner); } uint64 GetCharmGUID() const { return GetUInt64Value(UNIT_FIELD_CHARM); } void SetPetGUID(uint64 guid) { m_SummonSlot[SUMMON_SLOT_PET] = guid; } uint64 GetPetGUID() const { return m_SummonSlot[SUMMON_SLOT_PET]; } void SetCritterGUID(uint64 guid) { SetUInt64Value(UNIT_FIELD_CRITTER, guid); } uint64 GetCritterGUID() const { return GetUInt64Value(UNIT_FIELD_CRITTER); } bool IsControlledByPlayer() const { return m_ControlledByPlayer; } uint64 GetCharmerOrOwnerGUID() const { return GetCharmerGUID() ? GetCharmerGUID() : GetOwnerGUID(); } uint64 GetCharmerOrOwnerOrOwnGUID() const { if (uint64 guid = GetCharmerOrOwnerGUID()) return guid; return GetGUID(); } bool isCharmedOwnedByPlayerOrPlayer() const { return IS_PLAYER_GUID(GetCharmerOrOwnerOrOwnGUID()); } Player* GetSpellModOwner() const; Unit* GetOwner() const; Guardian *GetGuardianPet() const; Minion *GetFirstMinion() const; Unit* GetCharmer() const; Unit* GetCharm() const; Unit* GetCharmerOrOwner() const { return GetCharmerGUID() ? GetCharmer() : GetOwner(); } Unit* GetCharmerOrOwnerOrSelf() const { if (Unit* u = GetCharmerOrOwner()) return u; return (Unit*)this; } Player* GetCharmerOrOwnerPlayerOrPlayerItself() const; Player* GetAffectingPlayer() const; void SetMinion(Minion *minion, bool apply, PetSlot slot, bool stampeded = false); void GetAllMinionsByEntry(std::list<Creature*>& Minions, uint32 entry); Unit* GetFirstMinionByEntry(uint32 entry); void RemoveAllMinionsByEntry(uint32 entry); void SetCharm(Unit* target, bool apply); Unit* GetNextRandomRaidMemberOrPet(float radius); bool SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* aurApp = NULL); void RemoveCharmedBy(Unit* charmer); void RestoreFaction(); ControlList m_Controlled; Unit* GetFirstControlled() const; void RemoveAllControlled(); bool isCharmed() const { return GetCharmerGUID() != 0; } bool isPossessed() const { return HasUnitState(UNIT_STATE_POSSESSED); } bool isPossessedByPlayer() const { return HasUnitState(UNIT_STATE_POSSESSED) && IS_PLAYER_GUID(GetCharmerGUID()); } bool isPossessing() const { if (Unit* u = GetCharm()) return u->isPossessed(); else return false; } bool isPossessing(Unit* u) const { return u->isPossessed() && GetCharmGUID() == u->GetGUID(); } CharmInfo* GetCharmInfo() { return m_charmInfo; } CharmInfo* InitCharmInfo(); void DeleteCharmInfo(); void UpdateCharmAI(); //Player* GetMoverSource() const; Player* m_movedPlayer; SharedVisionList const& GetSharedVisionList() { return m_sharedVision; } void AddPlayerToVision(Player* player); void RemovePlayerFromVision(Player* player); bool HasSharedVision() const { return !m_sharedVision.empty(); } void RemoveBindSightAuras(); void RemoveCharmAuras(); Pet* CreateTamedPetFrom(Creature* creatureTarget, uint32 spell_id = 0); Pet* CreateTamedPetFrom(uint32 creatureEntry, uint32 spell_id = 0); bool InitTamedPet(Pet* pet, uint8 level, uint32 spell_id); // aura apply/remove helpers - you should better not use these AuraPtr _TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint32 effMask, Unit* caster, int32* baseAmount = NULL, Item* castItem = NULL, uint64 casterGUID = 0); void _AddAura(UnitAuraPtr aura, Unit* caster); AuraApplication * _CreateAuraApplication(AuraPtr aura, uint32 effMask); void _ApplyAuraEffect(AuraPtr aura, uint32 effIndex); void _ApplyAura(AuraApplication * aurApp, uint32 effMask); void _UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMode); void _UnapplyAura(AuraApplication * aurApp, AuraRemoveMode removeMode); void _RemoveNoStackAuraApplicationsDueToAura(AuraPtr aura); void _RemoveNoStackAurasDueToAura(AuraPtr aura); bool _IsNoStackAuraDueToAura(AuraPtr appliedAura, AuraPtr existingAura) const; void _RegisterAuraEffect(AuraEffectPtr aurEff, bool apply); // m_ownedAuras container management AuraMap & GetOwnedAuras() { return m_ownedAuras; } AuraMap const& GetOwnedAuras() const { return m_ownedAuras; } void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint32 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveOwnedAura(AuraPtr aura, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); AuraPtr GetOwnedAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint32 reqEffMask = 0, AuraPtr except = NULLAURA) const; // m_appliedAuras container management AuraApplicationMap & GetAppliedAuras() { return m_appliedAuras; } AuraApplicationMap const& GetAppliedAuras() const { return m_appliedAuras; } void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); void RemoveAura(uint32 spellId, uint64 casterGUID = 0, uint32 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveAura(AuraApplication * aurApp, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); void RemoveAura(AuraPtr aur, AuraRemoveMode mode = AURA_REMOVE_BY_DEFAULT); void RemoveAllSymbiosisAuras(); void RemoveAurasDueToSpell(uint32 spellId, uint64 casterGUID = 0, uint32 reqEffMask = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT); void RemoveAuraFromStack(uint32 spellId, uint64 casterGUID = 0, AuraRemoveMode removeMode = AURA_REMOVE_BY_DEFAULT, int32 num = 1); void RemoveAurasDueToSpellByDispel(uint32 spellId, uint32 dispellerSpellId, uint64 casterGUID, Unit* dispeller, uint8 chargesRemoved = 1); void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit* stealer); void RemoveAurasDueToItemSpell(Item* castItem, uint32 spellId); void RemoveAurasByType(AuraType auraType, uint64 casterGUID = 0, AuraPtr aura = NULLAURA, uint32 exceptAuraId = 0, bool negative = true, bool positive = true); void RemoveNotOwnSingleTargetAuras(uint32 newPhase = 0x0); void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except = 0); void RemoveFlagsAuras(); void RemoveAurasWithAttribute(uint32 flags); void RemoveAurasWithFamily(SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID); void RemoveAurasWithMechanic(uint32 mechanic_mask, AuraRemoveMode removemode = AURA_REMOVE_BY_DEFAULT, uint32 except = 0, uint8 count = 0); void RemoveMovementImpairingAuras(); void RemoveAurasBreakableByDamage(); void RemoveDKPresences(); void RemoveAreaAurasDueToLeaveWorld(); void RemoveAllAuras(); void RemoveNonPassivesAuras(); void RemoveArenaAuras(); void RemoveAllAurasOnDeath(); void RemoveNegativeAuras(); void RemoveAllAurasRequiringDeadTarget(); void RemoveAllAurasExceptType(AuraType type); void RemoveAllAurasByType(AuraType type); void DelayOwnedAuras(uint32 spellId, uint64 caster, int32 delaytime); void _RemoveAllAuraStatMods(); void _ApplyAllAuraStatMods(); AuraEffectList const& GetAuraEffectsByType(AuraType type) const { return m_modAuras[type]; } AuraEffectList GetAuraEffectsByMechanic(uint32 mechanic_mask) const; AuraList & GetSingleCastAuras() { return m_scAuras; } AuraList const& GetSingleCastAuras() const { return m_scAuras; } AuraEffectPtr GetAuraEffect(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; AuraEffectPtr GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, uint64 casterGUID = 0) const; AuraEffectPtr GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const; // spell mustn't have familyflags AuraEffectPtr GetAuraEffect(AuraType type, SpellFamilyNames family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID =0); inline AuraEffectPtr GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint32 effIndex) const { return GetAuraEffect(SPELL_AURA_DUMMY, name, iconId, effIndex);} AuraApplication * GetAuraApplication(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint32 reqEffMask = 0, AuraApplication * except = NULL) const; AuraPtr GetAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint32 reqEffMask = 0) const; AuraApplication * GetAuraApplicationOfRankedSpell(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint32 reqEffMask = 0, AuraApplication * except = NULL) const; AuraPtr GetAuraOfRankedSpell(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint32 reqEffMask = 0) const; void GetDispellableAuraList(Unit* caster, uint32 dispelMask, DispelChargesList& dispelList); bool HasAuraEffect(uint32 spellId, uint8 effIndex, uint64 caster = 0) const; uint32 GetAuraCount(uint32 spellId) const; bool HasAura(uint32 spellId, uint64 casterGUID = 0, uint64 itemCasterGUID = 0, uint32 reqEffMask = 0) const; bool HasAuraType(AuraType auraType) const; bool HasAuraTypeWithCaster(AuraType auratype, uint64 caster) const; bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const; bool HasAuraTypeWithAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const; bool HasAuraTypeWithValue(AuraType auratype, int32 value) const; bool HasNegativeAuraWithInterruptFlag(uint32 flag, uint64 guid = 0); bool HasNegativeAuraWithAttribute(uint32 flag, uint64 guid = 0); bool HasAuraWithMechanic(uint32 mechanicMask); bool HasAuraWithNegativeCaster(uint32 spellid); void RemoveSoulSwapDOT(Unit* target); void ApplySoulSwapDOT(Unit* caster, Unit* target); AuraEffectPtr IsScriptOverriden(SpellInfo const* spell, int32 script) const; uint32 GetDiseasesByCaster(uint64 casterGUID, bool remove = false); uint32 GetDoTsByCaster(uint64 casterGUID) const; int32 GetTotalAuraModifier(AuraType auratype) const; float GetTotalAuraMultiplier(AuraType auratype) const; int32 GetMaxPositiveAuraModifier(AuraType auratype); int32 GetMaxNegativeAuraModifier(AuraType auratype) const; int32 GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const; float GetTotalAuraMultiplierByMiscMask(AuraType auratype, uint32 misc_mask) const; int32 GetMaxPositiveAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask, constAuraEffectPtr except = NULLAURA_EFFECT) const; int32 GetMaxNegativeAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) const; int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const; float GetTotalAuraMultiplierByMiscValue(AuraType auratype, int32 misc_value) const; int32 GetMaxPositiveAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const; int32 GetMaxNegativeAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const; int32 GetTotalAuraModifierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const; float GetTotalAuraMultiplierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const; int32 GetMaxPositiveAuraModifierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const; int32 GetMaxNegativeAuraModifierByAffectMask(AuraType auratype, SpellInfo const* affectedSpell) const; float GetResistanceBuffMods(SpellSchools school, bool positive) const { return GetFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school); } void SetResistanceBuffMods(SpellSchools school, bool positive, float val) { SetFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school, val); } void ApplyResistanceBuffModsMod(SpellSchools school, bool positive, float val, bool apply) { ApplyModSignedFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school, val, apply); } void ApplyResistanceBuffModsPercentMod(SpellSchools school, bool positive, float val, bool apply) { ApplyPercentModFloatValue(positive ? UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE+school : UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE+school, val, apply); } void InitStatBuffMods() { for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(UNIT_FIELD_POSSTAT0+i, 0); for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetFloatValue(UNIT_FIELD_NEGSTAT0+i, 0); } void ApplyStatBuffMod(Stats stat, float val, bool apply) { ApplyModSignedFloatValue((val > 0 ? UNIT_FIELD_POSSTAT0+stat : UNIT_FIELD_NEGSTAT0+stat), val, apply); } void ApplyStatPercentBuffMod(Stats stat, float val, bool apply) { ApplyPercentModFloatValue(UNIT_FIELD_POSSTAT0+stat, val, apply); ApplyPercentModFloatValue(UNIT_FIELD_NEGSTAT0+stat, val, apply); } void SetCreateStat(Stats stat, float val) { m_createStats[stat] = val; } void SetCreateHealth(uint32 val) { SetUInt32Value(UNIT_FIELD_BASE_HEALTH, val); } uint32 GetCreateHealth() const { return GetUInt32Value(UNIT_FIELD_BASE_HEALTH); } void SetCreateMana(uint32 val) { SetUInt32Value(UNIT_FIELD_BASE_MANA, val); } uint32 GetCreateMana() const { return GetUInt32Value(UNIT_FIELD_BASE_MANA); } int32 GetCreatePowers(Powers power) const; float GetPosStat(Stats stat) const { return GetFloatValue(UNIT_FIELD_POSSTAT0+stat); } float GetNegStat(Stats stat) const { return GetFloatValue(UNIT_FIELD_NEGSTAT0+stat); } float GetCreateStat(Stats stat) const { return m_createStats[stat]; } void SetCurrentCastedSpell(Spell* pSpell); virtual void ProhibitSpellSchool(SpellSchoolMask /*idSchoolMask*/, uint32 /*unTimeMs*/) { } void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed = true, bool withInstant = true); void FinishSpell(CurrentSpellTypes spellType, bool ok = true); // set withDelayed to true to account delayed spells as casted // delayed+channeled spells are always accounted as casted // we can skip channeled or delayed checks using flags bool IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled = false, bool skipAutorepeat = false, bool isAutoshoot = false, bool skipInstant = true) const; // set withDelayed to true to interrupt delayed spells too // delayed+channeled spells are always interrupted void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid = 0, bool withInstant = true); void InterruptNonMeleeSpellsExcept(bool withDelayed, uint32 except, bool withInstant = true); Spell* GetCurrentSpell(CurrentSpellTypes spellType) const { return m_currentSpells[spellType]; } Spell* GetCurrentSpell(uint32 spellType) const { return m_currentSpells[spellType]; } Spell* FindCurrentSpellBySpellId(uint32 spell_id) const; int32 GetCurrentSpellCastTime(uint32 spell_id) const; uint32 m_addDmgOnce; uint64 m_SummonSlot[MAX_SUMMON_SLOT]; uint64 m_ObjectSlot[MAX_GAMEOBJECT_SLOT]; ShapeshiftForm GetShapeshiftForm() const { return ShapeshiftForm(GetByteValue(UNIT_FIELD_BYTES_2, 3)); } void SetShapeshiftForm(ShapeshiftForm form) { SetByteValue(UNIT_FIELD_BYTES_2, 3, form); } inline bool IsInFeralForm() const { ShapeshiftForm form = GetShapeshiftForm(); return form == FORM_CAT || form == FORM_BEAR; } inline bool IsInDisallowedMountForm() const { ShapeshiftForm form = GetShapeshiftForm(); return form != FORM_NONE && form != FORM_BATTLESTANCE && form != FORM_BERSERKERSTANCE && form != FORM_DEFENSIVESTANCE && form != FORM_SHADOW && form != FORM_STEALTH && form != FORM_UNDEAD && form != FORM_WISE_SERPENT && form != FORM_STURDY_OX && form != FORM_FIERCE_TIGER && form != FORM_MOONKIN; } float m_modMeleeHitChance; float m_modRangedHitChance; float m_modSpellHitChance; int32 m_baseSpellCritChance; float m_threatModifier[MAX_SPELL_SCHOOL]; float m_modAttackSpeedPct[3]; // Event handler EventProcessor m_Events; // stat system bool HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply); void SetModifierValue(UnitMods unitMod, UnitModifierType modifierType, float value) { m_auraModifiersGroup[unitMod][modifierType] = value; } float GetModifierValue(UnitMods unitMod, UnitModifierType modifierType) const; float GetTotalStatValue(Stats stat) const; float GetTotalAuraModValue(UnitMods unitMod) const; SpellSchools GetSpellSchoolByAuraGroup(UnitMods unitMod) const; Stats GetStatByAuraGroup(UnitMods unitMod) const; Powers GetPowerTypeByAuraGroup(UnitMods unitMod) const; bool CanModifyStats() const { return m_canModifyStats; } void SetCanModifyStats(bool modifyStats) { m_canModifyStats = modifyStats; } virtual bool UpdateStats(Stats stat) = 0; virtual bool UpdateAllStats() = 0; virtual void UpdateResistances(uint32 school) = 0; virtual void UpdateArmor() = 0; virtual void UpdateMaxHealth() = 0; virtual void UpdateMaxPower(Powers power) = 0; virtual void UpdateAttackPowerAndDamage(bool ranged = false) = 0; virtual void UpdateDamagePhysical(WeaponAttackType attType) = 0; float GetTotalAttackPowerValue(WeaponAttackType attType) const; float GetWeaponDamageRange(WeaponAttackType attType, WeaponDamageRange type) const; void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value) { m_weaponDamage[attType][damageRange] = value; } bool isInFrontInMap(Unit const* target, float distance, float arc = M_PI) const; bool isInBackInMap(Unit const* target, float distance, float arc = M_PI) const; // Visibility system bool IsVisible() const { return (m_serverSideVisibility.GetValue(SERVERSIDE_VISIBILITY_GM) > SEC_PLAYER) ? false : true; } void SetVisible(bool x); // common function for visibility checks for player/creatures with detection code void SetPhaseMask(uint32 newPhaseMask, bool update);// overwrite WorldObject::SetPhaseMask void UpdateObjectVisibility(bool forced = true); SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY]; uint32 m_lastSanctuaryTime; // Threat related methods bool CanHaveThreatList() const; void AddThreat(Unit* victim, float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellInfo const* threatSpell = NULL); float ApplyTotalThreatModifier(float fThreat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL); void DeleteThreatList(); void TauntApply(Unit* victim); void TauntFadeOut(Unit* taunter); ThreatManager& getThreatManager() { return m_ThreatManager; } void addHatedBy(HostileReference* pHostileReference) { m_HostileRefManager.insertFirst(pHostileReference); }; void removeHatedBy(HostileReference* /*pHostileReference*/) { /* nothing to do yet */ } HostileRefManager& getHostileRefManager() { return m_HostileRefManager; } VisibleAuraMap const* GetVisibleAuras() { return &m_visibleAuras; } AuraApplication * GetVisibleAura(uint8 slot) { VisibleAuraMap::iterator itr = m_visibleAuras.find(slot); if (itr != m_visibleAuras.end()) return itr->second; return 0; } void SetVisibleAura(uint8 slot, AuraApplication * aur){ m_visibleAuras[slot]=aur; UpdateAuraForGroup(slot);} void RemoveVisibleAura(uint8 slot){ m_visibleAuras.erase(slot); UpdateAuraForGroup(slot);} uint32 GetInterruptMask() const { return m_interruptMask; } void AddInterruptMask(uint32 mask) { m_interruptMask |= mask; } void UpdateInterruptMask(); uint32 GetDisplayId() { return GetUInt32Value(UNIT_FIELD_DISPLAYID); } void SetDisplayId(uint32 modelId); uint32 GetNativeDisplayId() { return GetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID); } void RestoreDisplayId(); void SetNativeDisplayId(uint32 modelId) { SetUInt32Value(UNIT_FIELD_NATIVEDISPLAYID, modelId); } void setTransForm(uint32 spellid) { m_transform = spellid;} uint32 getTransForm() const { return m_transform;} // DynamicObject management void _RegisterDynObject(DynamicObject* dynObj); void _UnregisterDynObject(DynamicObject* dynObj); DynamicObject* GetDynObject(uint32 spellId); int32 CountDynObject(uint32 spellId); void GetDynObjectList(std::list<DynamicObject*> &list, uint32 spellId); void RemoveDynObject(uint32 spellId); void RemoveAllDynObjects(); // AreaTrigger management void _RegisterAreaTrigger(AreaTrigger* areaTrigger); void _UnregisterAreaTrigger(AreaTrigger* areaTrigger); AreaTrigger* GetAreaTrigger(uint32 spellId); int32 CountAreaTrigger(uint32 spellId); void GetAreaTriggerList(std::list<AreaTrigger*> &list, uint32 spellId); void RemoveAreaTrigger(uint32 spellId); void RemoveAllAreasTrigger(); GameObject* GetGameObject(uint32 spellId) const; void AddGameObject(GameObject* gameObj); void RemoveGameObject(GameObject* gameObj, bool del); void RemoveGameObject(uint32 spellid, bool del); void RemoveAllGameObjects(); uint32 CalculateDamage(WeaponAttackType attType, bool normalized, bool addTotalPct); float GetAPMultiplier(WeaponAttackType attType, bool normalized); void ModifyAuraState(AuraStateType flag, bool apply); uint32 BuildAuraStateUpdateForTarget(Unit* target) const; bool HasAuraState(AuraStateType flag, SpellInfo const* spellProto = NULL, Unit const* Caster = NULL) const; void UnsummonAllTotems(); Unit* GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo); Unit* GetMeleeHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo = NULL); int32 SpellBaseDamageBonusDone(SpellSchoolMask schoolMask); int32 SpellBaseDamageBonusTaken(SpellSchoolMask schoolMask); uint32 SpellDamageBonusDone(Unit* victim, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); uint32 SpellDamageBonusTaken(Unit* caster, SpellInfo const *spellProto, uint32 pdamage, DamageEffectType damagetype, uint32 stack = 1); int32 SpellBaseHealingBonusDone(SpellSchoolMask schoolMask); int32 SpellBaseHealingBonusTaken(SpellSchoolMask schoolMask); uint32 SpellHealingBonusDone(Unit* victim, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); uint32 SpellHealingBonusTaken(Unit* caster, SpellInfo const *spellProto, uint32 healamount, DamageEffectType damagetype, uint32 stack = 1); uint32 MeleeDamageBonusDone(Unit *pVictim, uint32 damage, WeaponAttackType attType, SpellInfo const *spellProto = NULL); uint32 MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage,WeaponAttackType attType, SpellInfo const *spellProto = NULL); bool isSpellBlocked(Unit* victim, SpellInfo const* spellProto, WeaponAttackType attackType = BASE_ATTACK); bool isBlockCritical(); bool isSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const; float GetSpellCrit(Unit* victim, SpellInfo const* spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType = BASE_ATTACK) const; uint32 SpellCriticalDamageBonus(SpellInfo const* spellProto, uint32 damage, Unit* victim); uint32 SpellCriticalHealingBonus(SpellInfo const* spellProto, uint32 damage, Unit* victim); void SetContestedPvP(Player* attackedPlayer = NULL); uint32 GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectType damagetype, uint32 CastingTime) const; float CalculateDefaultCoefficient(SpellInfo const *spellInfo, DamageEffectType damagetype) const; uint32 GetRemainingPeriodicAmount(uint64 caster, uint32 spellId, AuraType auraType, uint8 effectIndex = 0) const; void ApplyUberImmune(uint32 spellid, bool apply); void ApplySpellImmune(uint32 spellId, uint32 op, uint32 type, bool apply); void ApplySpellDispelImmunity(const SpellInfo* spellProto, DispelType type, bool apply); virtual bool IsImmunedToSpell(SpellInfo const* spellInfo); // redefined in Creature bool IsImmunedToDamage(SpellSchoolMask meleeSchoolMask); bool IsImmunedToDamage(SpellInfo const* spellInfo); virtual bool IsImmunedToSpellEffect(SpellInfo const* spellInfo, uint32 index) const; // redefined in Creature static bool IsDamageReducedByArmor(SpellSchoolMask damageSchoolMask, SpellInfo const* spellInfo = NULL, uint8 effIndex = MAX_SPELL_EFFECTS); uint32 CalcArmorReducedDamage(Unit* victim, const uint32 damage, SpellInfo const* spellInfo, WeaponAttackType attackType=MAX_ATTACK); void CalcAbsorbResist(Unit* victim, SpellSchoolMask schoolMask, DamageEffectType damagetype, const uint32 damage, uint32 *absorb, uint32 *resist, SpellInfo const* spellInfo = NULL); void CalcHealAbsorb(Unit* victim, const SpellInfo* spellProto, uint32 &healAmount, uint32 &absorb); bool IsSpellResisted(Unit* victim, SpellSchoolMask schoolMask, SpellInfo const* spellInfo); void UpdateSpeed(UnitMoveType mtype, bool forced); float GetSpeed(UnitMoveType mtype) const { return m_speed_rate[mtype] * (IsControlledByPlayer() ? playerBaseMoveSpeed[mtype] : baseMoveSpeed[mtype]); } float GetSpeedRate(UnitMoveType mtype) const { return m_speed_rate[mtype]; } void SetSpeed(UnitMoveType mtype, float rate, bool forced = false); float m_TempSpeed; bool isHover() const { return HasAuraType(SPELL_AURA_HOVER); } bool isCamouflaged() const { return HasAuraType(SPELL_AURA_MOD_CAMOUFLAGE); } float ApplyEffectModifiers(SpellInfo const* spellProto, uint8 effect_index, float value) const; int32 CalculateSpellDamage(Unit const* target, SpellInfo const* spellProto, uint8 effect_index, int32 const* basePoints = NULL) const; int32 CalcSpellDuration(SpellInfo const* spellProto); int32 ModSpellDuration(SpellInfo const* spellProto, Unit const* target, int32 duration, bool positive, uint32 effectMask); void ModSpellCastTime(SpellInfo const* spellProto, int32 & castTime, Spell* spell=NULL); float CalculateLevelPenalty(SpellInfo const* spellProto) const; void addFollower(FollowerReference* pRef) { m_FollowingRefManager.insertFirst(pRef); } void removeFollower(FollowerReference* /*pRef*/) { /* nothing to do yet */ } static Unit* GetUnit(WorldObject& object, uint64 guid); static Player* GetPlayer(WorldObject& object, uint64 guid); static Creature* GetCreature(WorldObject& object, uint64 guid); MotionMaster* GetMotionMaster() { return &i_motionMaster; } const MotionMaster* GetMotionMaster() const { return &i_motionMaster; } bool IsStopped() const { return !(HasUnitState(UNIT_STATE_MOVING)); } void StopMoving(); void AddUnitMovementFlag(uint32 f) { m_movementInfo.flags |= f; } void RemoveUnitMovementFlag(uint32 f) { m_movementInfo.flags &= ~f; } bool HasUnitMovementFlag(uint32 f) const { return (m_movementInfo.flags & f) == f; } uint32 GetUnitMovementFlags() const { return m_movementInfo.flags; } void SetUnitMovementFlags(uint32 f) { m_movementInfo.flags = f; } void ClearMovementData() { m_movementInfo.Alive32 = 0; m_movementInfo.hasFallData = false; m_movementInfo.hasFallDirection = false; } void AddExtraUnitMovementFlag(uint16 f) { m_movementInfo.flags2 |= f; } void RemoveExtraUnitMovementFlag(uint16 f) { m_movementInfo.flags2 &= ~f; } uint16 HasExtraUnitMovementFlag(uint16 f) const { return m_movementInfo.flags2 & f; } uint16 GetExtraUnitMovementFlags() const { return m_movementInfo.flags2; } void SetExtraUnitMovementFlags(uint16 f) { m_movementInfo.flags2 = f; } bool IsSplineEnabled() const; void ReadMovementInfo(WorldPacket& data, MovementInfo* mi, ExtraMovementStatusElement* extras = NULL); void WriteMovementInfo(WorldPacket &data, ExtraMovementStatusElement* extras = NULL) const; float GetPositionZMinusOffset() const { float offset = 0.0f; if (HasUnitMovementFlag(MOVEMENTFLAG_HOVER)) offset = GetFloatValue(UNIT_FIELD_HOVERHEIGHT); return GetPositionZ() - offset; } void SetControlled(bool apply, UnitState state); void SendLossOfControl(AuraApplication const* aurApp, Mechanics mechanic, SpellEffIndex index); void AddComboPointHolder(uint32 lowguid) { m_ComboPointHolders.insert(lowguid); } void RemoveComboPointHolder(uint32 lowguid) { m_ComboPointHolders.erase(lowguid); } void ClearComboPointHolders(); ///----------Pet responses methods----------------- void SendPetCastFail(uint32 spellid, SpellCastResult msg); void SendPetActionFeedback (uint8 msg); void SendPetTalk (uint32 pettalk); void SendPetAIReaction(uint64 guid); ///----------End of Pet responses methods---------- void propagateSpeedChange() { GetMotionMaster()->propagateSpeedChange(); } // reactive attacks void ClearAllReactives(); void StartReactiveTimer(ReactiveType reactive) { m_reactiveTimer[reactive] = REACTIVE_TIMER_START;} void UpdateReactives(uint32 p_time); // group updates void UpdateAuraForGroup(uint8 slot); // proc trigger system bool CanProc(){return !m_procDeep;} void SetCantProc(bool apply) { if (apply) ++m_procDeep; else { ASSERT(m_procDeep); --m_procDeep; } } // pet auras typedef std::set<PetAura const*> PetAuraSet; PetAuraSet m_petAuras; void AddPetAura(PetAura const* petSpell); void RemovePetAura(PetAura const* petSpell); uint32 GetModelForForm(ShapeshiftForm form); uint32 GetModelForTotem(PlayerTotemType totemType); void SetReducedThreatPercent(uint32 pct, uint64 guid) { m_reducedThreatPercent = pct; m_misdirectionTargetGUID = guid; } uint32 GetReducedThreatPercent() { return m_reducedThreatPercent; } Unit* GetMisdirectionTarget() { return m_misdirectionTargetGUID ? GetUnit(*this, m_misdirectionTargetGUID) : NULL; } bool IsAIEnabled, NeedChangeAI; bool CreateVehicleKit(uint32 id, uint32 creatureEntry); void RemoveVehicleKit(bool dismount = false); Vehicle* GetVehicleKit()const { return m_vehicleKit; } Vehicle* GetVehicle() const { return m_vehicle; } bool IsOnVehicle() const { return m_vehicle != NULL; } bool IsOnVehicle(const Unit* vehicle) const { return m_vehicle && m_vehicle == vehicle->GetVehicleKit(); } Unit* GetVehicleBase() const; Creature* GetVehicleCreatureBase() const; float GetTransOffsetX() const { return m_movementInfo.t_pos.GetPositionX(); } float GetTransOffsetY() const { return m_movementInfo.t_pos.GetPositionY(); } float GetTransOffsetZ() const { return m_movementInfo.t_pos.GetPositionZ(); } float GetTransOffsetO() const { return m_movementInfo.t_pos.GetOrientation(); } uint32 GetTransTime() const { return m_movementInfo.t_time; } int8 GetTransSeat() const { return m_movementInfo.t_seat; } uint64 GetTransGUID() const; // Returns the transport this unit is on directly (if on vehicle and transport, return vehicle) TransportBase* GetDirectTransport() const; bool m_ControlledByPlayer; bool HandleSpellClick(Unit* clicker, int8 seatId = -1); void EnterVehicle(Unit* base, int8 seatId = -1, bool fullTriggered = false); void ExitVehicle(Position const* exitPosition = NULL); void ChangeSeat(int8 seatId, bool next = true); // Should only be called by AuraEffect::HandleAuraControlVehicle(AuraApplication const* auraApp, uint8 mode, bool apply) const; void _ExitVehicle(Position const* exitPosition = NULL); void _EnterVehicle(Vehicle* vehicle, int8 seatId, AuraApplication const* aurApp = NULL); void BuildMovementPacket(ByteBuffer *data) const; bool isMoving() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_MASK_MOVING); } void RemoveMovingFlags(){ return m_movementInfo.StopMoving(); } bool isTurning() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_MASK_TURNING); } virtual bool CanFly() const = 0; bool IsFlying() const { return m_movementInfo.HasMovementFlag(MOVEMENTFLAG_FLYING | MOVEMENTFLAG_DISABLE_GRAVITY); } void SetCanFly(bool apply); void RewardRage(uint32 baseRage, bool attacker); virtual float GetFollowAngle() const { return static_cast<float>(M_PI/2); } void OutDebugInfo() const; virtual bool isBeingLoaded() const { return false;} bool IsDuringRemoveFromWorld() const {return m_duringRemoveFromWorld;} Pet* ToPet() { if (isPet()) return reinterpret_cast<Pet*>(this); else return NULL; } Pet const* ToPet() const { if (isPet()) return reinterpret_cast<Pet const*>(this); else return NULL; } Totem* ToTotem() { if (isTotem()) return reinterpret_cast<Totem*>(this); else return NULL; } Totem const* ToTotem() const { if (isTotem()) return reinterpret_cast<Totem const*>(this); else return NULL; } TempSummon* ToTempSummon() { if (isSummon()) return reinterpret_cast<TempSummon*>(this); else return NULL; } TempSummon const* ToTempSummon() const { if (isSummon()) return reinterpret_cast<TempSummon const*>(this); else return NULL; } void SetTarget(uint64 guid) { if (!_focusSpell) SetUInt64Value(UNIT_FIELD_TARGET, guid); } // Handling caster facing during spell cast void FocusTarget(Spell const* focusSpell, uint64 target); void ReleaseFocus(Spell const* focusSpell); int32 GetEclipsePower() { return _eclipsePower; }; void SetEclipsePower(int32 power, bool send = true); void SendEclipse(); uint32 GetHealingDoneInPastSecs(uint32 secs); uint32 GetHealingTakenInPastSecs(uint32 secs); uint32 GetDamageDoneInPastSecs(uint32 secs); uint32 GetDamageTakenInPastSecs(uint32 secs); void AddHealDamageLog(HealDamageLog const& log) { m_healDamage.push_back(log); } // Movement info Movement::MoveSpline * movespline; void OnRelocated(); // helper for dark simulacrum spell Unit* GetSimulacrumTarget(); void setSimulacrumTarget(uint64 guid) { simulacrumTargetGUID = guid; } void removeSimulacrumTarget() { simulacrumTargetGUID = 0; } // for eclipse powers of druid void SetLastEclipsePower(uint32 eclipseSpell) { eclipseSpellId = eclipseSpell; } uint32 GetLastEclipsePower() { return eclipseSpellId; } void RemoveLastEclipsePower() { eclipseSpellId = 0; } // helpers for Icicles spells uint64 GetIciclesTarget() const { return iciclesTargetGUID; } void SetIciclesTarget(uint64 guid) { iciclesTargetGUID = guid; } void DisableHealthRegen() { m_disableHealthRegen = true; } void ReenableHealthRegen() { m_disableHealthRegen = false; } bool HealthRegenIsDisable() const { return m_disableHealthRegen; } void DisableEvadeMode() { m_disableEnterEvadeMode = true; } void ReenableEvadeMode() { m_disableEnterEvadeMode = false; } bool EvadeModeIsDisable() const { return m_disableEnterEvadeMode; } protected: explicit Unit (bool isWorldObject); void BuildValuesUpdate(uint8 updatetype, ByteBuffer* data, Player* target) const; UnitAI* i_AI, *i_disabledAI; void _UpdateSpells(uint32 time); void _DeleteRemovedAuras(); void _UpdateAutoRepeatSpell(); bool m_AutoRepeatFirstCast; uint32 m_attackTimer[MAX_ATTACK]; float m_createStats[MAX_STATS]; AttackerSet m_attackers; Unit* m_attacking; DeathState m_deathState; int32 m_procDeep; typedef std::list<DynamicObject*> DynObjectList; DynObjectList m_dynObj; typedef std::list<AreaTrigger*> AreaTriggerList; AreaTriggerList m_AreaTrigger; typedef std::list<GameObject*> GameObjectList; GameObjectList m_gameObj; bool m_isSorted; uint32 m_transform; Spell* m_currentSpells[CURRENT_MAX_SPELL]; AuraMap m_ownedAuras; AuraApplicationMap m_appliedAuras; AuraList m_removedAuras; AuraMap::iterator m_auraUpdateIterator; uint32 m_removedAurasCount; AuraEffectList m_modAuras[TOTAL_AURAS]; AuraList m_scAuras; // casted singlecast auras AuraApplicationList m_interruptableAuras; // auras which have interrupt mask applied on unit AuraStateAurasMap m_auraStateAuras; // Used for improve performance of aura state checks on aura apply/remove uint32 m_interruptMask; AuraIdList _SoulSwapDOTList; typedef std::list<HealDamageLog> HealDamageLogList; HealDamageLogList m_healDamage; float m_auraModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_END]; float m_weaponDamage[MAX_ATTACK][2]; bool m_canModifyStats; VisibleAuraMap m_visibleAuras; float m_speed_rate[MAX_MOVE_TYPE]; CharmInfo* m_charmInfo; SharedVisionList m_sharedVision; virtual SpellSchoolMask GetMeleeDamageSchoolMask() const; MotionMaster i_motionMaster; uint32 m_reactiveTimer[MAX_REACTIVE]; uint32 m_regenTimer; ThreatManager m_ThreatManager; Vehicle* m_vehicle; Vehicle* m_vehicleKit; uint32 m_unitTypeMask; LiquidTypeEntry const* _lastLiquid; // Zone Skip Update uint32 _skipCount; uint32 _skipDiff; bool m_IsInKillingProcess; bool m_disableHealthRegen; bool m_disableEnterEvadeMode; bool IsAlwaysVisibleFor(WorldObject const* seer) const; bool IsAlwaysDetectableFor(WorldObject const* seer) const; void DisableSpline(); uint32 m_SendTransportMoveTimer; uint32 m_lastRegenTime[MAX_POWERS]; uint32 m_powers[MAX_POWERS]; private: bool IsTriggeredAtSpellProcEvent(Unit* victim, AuraPtr aura, SpellInfo const* procSpell, uint32 procFlag, uint32 procExtra, WeaponAttackType attType, bool isVictim, bool active, SpellProcEventEntry const* & spellProcEvent); bool HandleAuraProcOnPowerAmount(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleHasteAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleModifierAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleSpellCritChanceAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleObsModEnergyAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleModDamagePctTakenAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleAuraProc(Unit* victim, uint32 damage, AuraPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown, bool * handled); bool HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown); bool HandleOverrideClassScriptAuraProc(Unit* victim, uint32 damage, AuraEffectPtr triggeredByAura, SpellInfo const* procSpell, uint32 cooldown); bool HandleAuraRaidProcFromChargeWithValue(AuraEffectPtr triggeredByAura); bool HandleAuraRaidProcFromCharge(AuraEffectPtr triggeredByAura); void UpdateSplineMovement(uint32 t_diff); void UpdateSplinePosition(); // player or player's pet float GetCombatRatingReduction(CombatRating cr) const; uint32 GetCombatRatingDamageReduction(CombatRating cr, float cap, uint32 damage) const; protected: void SendMoveRoot(uint32 value); void SendMoveUnroot(uint32 value); void SetFeared(bool apply); void SetConfused(bool apply); void SetStunned(bool apply); void SetRooted(bool apply); private: class AINotifyTask; class VisibilityUpdateTask; Position m_lastVisibilityUpdPos; bool m_VisibilityUpdScheduled; uint32 m_rootTimes; uint32 m_state; // Even derived shouldn't modify uint32 m_CombatTimer; TimeTrackerSmall m_movesplineTimer; uint64 simulacrumTargetGUID; uint64 iciclesTargetGUID; uint32 eclipseSpellId; Diminishing m_Diminishing; // Manage all Units that are threatened by us HostileRefManager m_HostileRefManager; FollowerRefManager m_FollowingRefManager; ComboPointHolderSet m_ComboPointHolders; uint32 m_reducedThreatPercent; uint64 m_misdirectionTargetGUID; bool m_cleanupDone; // lock made to not add stuff after cleanup before delete bool m_duringRemoveFromWorld; // lock made to not add stuff after beginning removing from world Spell const* _focusSpell; ///> Locks the target during spell cast for proper facing bool _isWalkingBeforeCharm; // Are we walking before we were charmed? int32 _eclipsePower; time_t _lastDamagedTime; }; namespace WoWSource { // Binary predicate for sorting Units based on percent value of a power class PowerPctOrderPred { public: PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) {} bool operator() (const Unit* a, const Unit* b) const { float rA = a->GetMaxPower(m_power) ? float(a->GetPower(m_power)) / float(a->GetMaxPower(m_power)) : 0.0f; float rB = b->GetMaxPower(m_power) ? float(b->GetPower(m_power)) / float(b->GetMaxPower(m_power)) : 0.0f; return m_ascending ? rA < rB : rA > rB; } private: const Powers m_power; const bool m_ascending; }; // Binary predicate for sorting Units based on value of distance of an other Unit class UnitDistanceCompareOrderPred { public: UnitDistanceCompareOrderPred(const Unit* source, bool ascending = true) : m_object(source), m_ascending(ascending) {} bool operator() (const Unit* a, const Unit* b) const { return m_ascending ? a->GetDistance(m_object) < b->GetDistance(m_object) : a->GetDistance(m_object) > b->GetDistance(m_object); } private: const Unit* m_object; const bool m_ascending; }; // Binary predicate for sorting Units based on percent value of health class HealthPctOrderPred { public: HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) {} bool operator() (const Unit* a, const Unit* b) const { float rA = a->GetMaxHealth() ? float(a->GetHealth()) / float(a->GetMaxHealth()) : 0.0f; float rB = b->GetMaxHealth() ? float(b->GetHealth()) / float(b->GetMaxHealth()) : 0.0f; return m_ascending ? rA < rB : rA > rB; } private: const bool m_ascending; }; // Binary predicate for sorting DynamicObjects based on value of duration class AreaTriggerDurationPctOrderPred { public: AreaTriggerDurationPctOrderPred(bool ascending = true) : m_ascending(ascending) {} bool operator() (const AreaTrigger* a, const AreaTrigger* b) const { int32 rA = a->GetDuration() ? float(a->GetDuration()) : 0; int32 rB = b->GetDuration() ? float(b->GetDuration()) : 0; return m_ascending ? rA < rB : rA > rB; } private: const bool m_ascending; }; // Binary predicate for sorting Units based on value of distance of an GameObject class DistanceCompareOrderPred { public: DistanceCompareOrderPred(const WorldObject* object, bool ascending = true) : m_object(object), m_ascending(ascending) {} bool operator() (const WorldObject* a, const WorldObject* b) const { return m_ascending ? a->GetDistance(m_object) < b->GetDistance(m_object) : a->GetDistance(m_object) > b->GetDistance(m_object); } private: const WorldObject* m_object; const bool m_ascending; }; class DistanceOrderPred { public: DistanceOrderPred(Unit* searcher) : _searcher(searcher) { } bool operator() (const Unit* a, const Unit* b) const { float rA = _searcher->GetDistance(a); float rB = _searcher->GetDistance(b); return rA < rB; } private: Unit const* _searcher; }; } #endif
[ "andra778@yahoo.com" ]
andra778@yahoo.com
1aed69121c331bd762b97587fedf2fa5126a38ed
4c7e89787376581ea010293b74d6ddeda6815a11
/2_3/main.cpp
a83bb89a40b809e5ff34293a6919f8a6d56c05b6
[]
no_license
EMIAOZANG/FA_06
1a0154a72eeac0422244009bfc2f7989da4a89c2
36614e0ac769c62d7f7e0e7a7e1f5ff0ef276790
refs/heads/master
2021-01-10T17:08:16.032003
2015-10-29T18:26:52
2015-10-29T18:26:52
45,197,882
0
0
null
null
null
null
UTF-8
C++
false
false
2,259
cpp
#include <iostream> using namespace std; class TreeNode{ public: int val; int even; TreeNode* left; TreeNode* right; TreeNode* parent; TreeNode(int _val, int _even) :val(_val),even(_even),left(NULL),right(NULL),parent(NULL){} }; class BSTree{ public: TreeNode* root; TreeNode* find(int _val){ TreeNode* current = root; while (current != NULL){ if (current->val == _val){ return current; } else if (_val < current->val){ current = current->left; } else{ current = current->right; } } return NULL; } TreeNode* minimum(TreeNode* v){ TreeNode* current = v; while (v->left != NULL){ current = current->left; } return current; } TreeNode* successor(TreeNode* v){ if (v->right != NULL){ return minimum(v); } TreeNode* y = v->parent; while ((y != NULL) && (v == y->left)){ v = v->parent; y = y->parent; } return v; } bool insert(int _val){ TreeNode* v = new TreeNode(_val,0); TreeNode* up = NULL; TreeNode* down = root; while (down != NULL){ up = down; if ((up != NULL) && (_val%2 == 0)){ up->even++; } if (_val < down->val){ down = down->left; } else{ down = down->right; } } v->parent = up; if (up == NULL){ root = v; } else if (v->val < up->val){ up->left = v; } else { up->right = v; } return true; } TreeNode* remove(TreeNode* v){ //Returns the parent of the deleted ndoe y //find y TreeNode* y = NULL; TreeNode* trace_start = NULL; TreeNode* x = NULL; if ((v->right == NULL) || (v->left == NULL)){ y = v; } else { y = successor(root); } trace_start = y->parent; if (y->right != NULL){ x = y->right; } x->parent = y->parent; if (x->parent == NULL){ root = x; } if (y == y->parent->left){ x = y->parent->left; } else { x = y->parent->right; } //delete the point return y->parent; } };
[ "jiayi@drichardsons-iMac.local" ]
jiayi@drichardsons-iMac.local
bd579a11f1fab37385950a1efef4c547c9a0636c
832c45ae5979dbcf4e07bc3b096e076d4d2d83e7
/20130921/MUZICARI_T.cpp
1397f159b697474709ac06615c2775e1049befc2
[]
no_license
personaluser01/Algorithm-problems
9e62da04724a6f4a71c10d0d3f0459bc926da594
9e2ad4571660711cdbed0402969d0cb74d6e4792
refs/heads/master
2021-01-03T12:08:55.749408
2018-10-13T10:59:02
2018-10-13T10:59:02
null
0
0
null
null
null
null
UTF-8
C++
false
false
760
cpp
#include <bits/stdc++.h> using namespace std; bool F[5555][555]; bool ans[5555]; int a[5555]; main(){ F[0][0]=true; int t,n; int M=0; ios_base::sync_with_stdio(false); cin>>t>>n; for(int i=1;i<=n;i++){ F[0][i]=true; cin>>a[i]; for(int j=t;j>=0;j--){ F[j][i]=F[j][i-1]; if(j>=a[i]&&F[j-a[i]][i-1]) F[j][i]=true; if(F[j][i]) M=max(M,j); } } for(int i=n;i>0&&M;i--){ if(F[M][i]&&F[M-a[i]][i-1]){ M-=a[i]; ans[i]=true; } } int cnt1=0; int cnt2=0; for(int i=1;i<=n;i++) if(ans[i]){ printf("%d ",cnt1); cnt1+=a[i]; } else { printf("%d ",cnt2); cnt2+=a[i]; } }
[ "thienbui797@gmail.com" ]
thienbui797@gmail.com
6f5017c22adceb7242cf890772648b189f45dd5b
b607f75d985ac18ac9fc266a0b9cfa410f041ac0
/assignment_8/ant.h
134b2594df91eb24cb9d5ccba91a8d498b8ea202
[]
no_license
austinmajor/oop-cpp
9f7480bf3a1c45f56cc54c51bd2cd456bc73d844
04baa624945836167c5c63dc80c26051ccfe1fb3
refs/heads/master
2020-04-22T12:03:26.493490
2019-05-04T18:38:05
2019-05-04T18:38:05
null
0
0
null
null
null
null
UTF-8
C++
false
false
374
h
#ifndef ANT_H #define ANT_H #include "animal.h" #include "sim.h" class Ant : public Organism { private: void generateOffspring(int whereX, int whereY); public: Ant(World *aWorld, int xcoord, int ycoord); void move(); void breed(); OrganismType getType() const; char representation() const; int size() const; bool in_range(int xx, int yy); }; #endif
[ "mr.austinmajor@gmail.com" ]
mr.austinmajor@gmail.com
49b06dab60e9cfb525b4aad7f848529fa43630aa
beefe0044381aa8f3f17e590c62cf0d20d843406
/usb/device/targets/TARGET_Freescale/USBPhy_Kinetis.cpp
eae9fb3a4ad8af819892ba413b546acde32a20de
[ "Apache-2.0", "BSD-3-Clause", "LicenseRef-scancode-public-domain", "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
boucaron/mbed
2f8d1c4a7577d6b6c53280db3fa5cd08cf4b3a88
7be6f1295adfba72bc52fed2c37cfaa29e82132a
refs/heads/master
2020-12-28T23:04:14.156459
2019-03-15T21:58:28
2019-03-15T21:58:28
45,317,208
0
0
Apache-2.0
2019-03-15T21:58:29
2015-10-31T20:29:13
C
UTF-8
C++
false
false
21,454
cpp
/* mbed Microcontroller Library * Copyright (c) 2018-2018 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #if defined(DEVICE_USBDEVICE) && DEVICE_USBDEVICE && \ (defined(TARGET_KL25Z) | defined(TARGET_KL43Z) | \ defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | \ defined(TARGET_K64F) | defined(TARGET_K22F) | \ defined(TARGET_TEENSY3_1)) #if defined(TARGET_KSDK2_MCUS) #include "fsl_common.h" #endif #include "USBPhyHw.h" #include "USBEndpoints_Kinetis.h" #include "mbed_critical.h" static USBPhyHw *instance; static volatile int epComplete = 0; // Convert physical endpoint number to register bit #define EP(endpoint) (1<<(endpoint)) // Conversion macros #define PHY_TO_LOG(endpoint) ((endpoint)>>1) #define DESC_TO_LOG(endpoint) ((endpoint) & 0xF) #define DESC_TO_PHY(endpoint) ((((endpoint)&0x0F)<<1) | (((endpoint) & 0x80) ? 1:0)) #define PHY_TO_DESC(endpoint) (((endpoint)>>1)|(((endpoint)&1)?0x80:0)) // Get endpoint direction #define DESC_EP_IN(endpoint) ((endpoint) & 0x80U ? true : false) #define DESC_EP_OUT(endpoint) ((endpoint) & 0x80U ? false : true) #define BD_OWN_MASK (1<<7) #define BD_DATA01_MASK (1<<6) #define BD_KEEP_MASK (1<<5) #define BD_NINC_MASK (1<<4) #define BD_DTS_MASK (1<<3) #define BD_STALL_MASK (1<<2) #define TX 1 #define RX 0 #define ODD 0 #define EVEN 1 // this macro waits a physical endpoint number #define EP_BDT_IDX(ep, dir, odd) (((ep * 4) + (2 * dir) + (1 * odd))) #define SETUP_TOKEN 0x0D #define IN_TOKEN 0x09 #define OUT_TOKEN 0x01 #define TOK_PID(idx) ((bdt[idx].info >> 2) & 0x0F) // for each endpt: 8 bytes typedef struct BDT { uint8_t info; // BD[0:7] uint8_t dummy; // RSVD: BD[8:15] uint16_t byte_count; // BD[16:32] uint32_t address; // Addr } BDT; typedef enum { CTRL_XFER_READY, CTRL_XFER_IN, CTRL_XFER_NONE, CTRL_XFER_OUT } ctrl_xfer_t; // there are: // * 4 bidirectionnal endpt -> 8 physical endpt // * as there are ODD and EVEN buffer -> 8*2 bdt MBED_ALIGN(512) BDT bdt[NUMBER_OF_PHYSICAL_ENDPOINTS * 2]; // 512 bytes aligned! uint8_t * endpoint_buffer[NUMBER_OF_PHYSICAL_ENDPOINTS * 2]; uint8_t ep0_buffer[2][MAX_PACKET_SIZE_EP0]; uint8_t ep1_buffer[2][MAX_PACKET_SIZE_EP1]; uint8_t ep2_buffer[2][MAX_PACKET_SIZE_EP2]; uint8_t ep3_buffer[2][MAX_PACKET_SIZE_EP3]; static bool setup_suspend = false; static uint8_t set_addr = 0; static uint8_t addr = 0; static ctrl_xfer_t ctrl_xfer = CTRL_XFER_READY; static uint32_t Data1 = 0x55555555; static uint32_t frameNumber() { return((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF); } USBPhy *get_usb_phy() { static USBPhyHw usbphy; return &usbphy; } USBPhyHw::USBPhyHw(): events(NULL) { } USBPhyHw::~USBPhyHw() { } void USBPhyHw::init(USBPhyEvents *events) { if (this->events == NULL) { sleep_manager_lock_deep_sleep(); } this->events = events; // Disable IRQ NVIC_DisableIRQ(USB0_IRQn); #if (defined(FSL_FEATURE_SOC_MPU_COUNT) && (FSL_FEATURE_SOC_MPU_COUNT > 0U)) MPU->CESR=0; #endif #if (defined(FSL_FEATURE_SOC_SYSMPU_COUNT) && (FSL_FEATURE_SOC_SYSMPU_COUNT > 0U)) SYSMPU->CESR=0; #endif #if defined(TARGET_KL43Z) || defined(TARGET_K22F) || defined(TARGET_K64F) // enable USBFS clock CLOCK_EnableUsbfs0Clock(kCLOCK_UsbSrcIrc48M, 48000000U); #else // choose usb src as PLL SIM->SOPT2 &= ~SIM_SOPT2_PLLFLLSEL_MASK; SIM->SOPT2 |= (SIM_SOPT2_USBSRC_MASK | (1 << SIM_SOPT2_PLLFLLSEL_SHIFT)); // enable OTG clock SIM->SCGC4 |= SIM_SCGC4_USBOTG_MASK; #endif // Attach IRQ instance = this; // USB Module Configuration // Set BDT Base Register USB0->BDTPAGE1 = (uint8_t)((uint32_t)bdt>>8); USB0->BDTPAGE2 = (uint8_t)((uint32_t)bdt>>16); USB0->BDTPAGE3 = (uint8_t)((uint32_t)bdt>>24); // Clear interrupt flag USB0->ISTAT = 0xff; // USB Interrupt Enablers USB0->INTEN |= USB_INTEN_TOKDNEEN_MASK | USB_INTEN_ERROREN_MASK | USB_INTEN_USBRSTEN_MASK; // Disable weak pull downs USB0->USBCTRL &= ~(USB_USBCTRL_PDE_MASK | USB_USBCTRL_SUSP_MASK); USB0->USBTRC0 |= 0x40; /* Allocate control endpoint buffers */ endpoint_buffer[EP_BDT_IDX(0, TX, ODD)] = ep0_buffer[TX]; endpoint_buffer[EP_BDT_IDX(0, RX, ODD)] = ep0_buffer[RX]; endpoint_buffer[EP_BDT_IDX(1, TX, ODD)] = ep1_buffer[TX]; endpoint_buffer[EP_BDT_IDX(1, RX, ODD)] = ep1_buffer[RX]; endpoint_buffer[EP_BDT_IDX(2, TX, ODD)] = ep2_buffer[TX]; endpoint_buffer[EP_BDT_IDX(2, RX, ODD)] = ep2_buffer[RX]; endpoint_buffer[EP_BDT_IDX(3, TX, ODD)] = ep3_buffer[TX]; endpoint_buffer[EP_BDT_IDX(3, RX, ODD)] = ep3_buffer[RX]; NVIC_SetVector(USB0_IRQn, (uint32_t)&_usbisr); NVIC_EnableIRQ(USB0_IRQn); } void USBPhyHw::deinit() { disconnect(); NVIC_DisableIRQ(USB0_IRQn); USB0->INTEN = 0; if (events != NULL) { sleep_manager_unlock_deep_sleep(); } events = NULL; } bool USBPhyHw::powered() { return true; } void USBPhyHw::connect() { // enable USB USB0->CTL |= USB_CTL_USBENSOFEN_MASK; // Pull up enable USB0->CONTROL |= USB_CONTROL_DPPULLUPNONOTG_MASK; } void USBPhyHw::disconnect() { // disable all endpoints to prevent them from nacking when disconnected for(int i = 0; i < 16; i++) { USB0->ENDPOINT[i].ENDPT = 0x00; } // disable USB USB0->CTL &= ~USB_CTL_USBENSOFEN_MASK; // Pull up disable USB0->CONTROL &= ~USB_CONTROL_DPPULLUPNONOTG_MASK; while (USB0->ISTAT) { USB0->ISTAT = 0xFF; } } void USBPhyHw::configure() { // not needed } void USBPhyHw::unconfigure() { // not needed } void USBPhyHw::sof_enable() { USB0->INTEN |= USB_INTEN_SOFTOKEN_MASK; } void USBPhyHw::sof_disable() { USB0->INTEN &= ~USB_INTEN_SOFTOKEN_MASK; } void USBPhyHw::set_address(uint8_t address) { // we don't set the address now otherwise the usb controller does not ack // we set a flag instead // see usbisr when an IN token is received set_addr = 1; addr = address; } void USBPhyHw::remote_wakeup() { // TODO } #define ALLOW_BULK_OR_INT_ENDPOINTS (USB_EP_ATTR_ALLOW_BULK | USB_EP_ATTR_ALLOW_INT) #define ALLOW_NO_ENDPOINTS 0 const usb_ep_table_t* USBPhyHw::endpoint_table() { static const usb_ep_table_t endpoint_table = { 1, // No cost per endpoint - everything allocated up front { {USB_EP_ATTR_ALLOW_CTRL | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_BULK_OR_INT_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_BULK_OR_INT_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {USB_EP_ATTR_ALLOW_ISO | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0}, {ALLOW_NO_ENDPOINTS | USB_EP_ATTR_DIR_IN_AND_OUT, 0, 0} } }; return &endpoint_table; } uint32_t USBPhyHw::ep0_set_max_packet(uint32_t max_packet) { return MAX_PACKET_SIZE_EP0; } // read setup packet void USBPhyHw::ep0_setup_read_result(uint8_t *buffer, uint32_t size) { uint32_t sz; endpoint_read_result_core(EP0OUT, buffer, size, &sz); } void USBPhyHw::ep0_read(uint8_t *data, uint32_t size) { if (ctrl_xfer == CTRL_XFER_READY) { // Transfer is done so ignore call return; } if (ctrl_xfer == CTRL_XFER_IN) { ctrl_xfer = CTRL_XFER_READY; // Control transfer with a data IN stage. // The next packet received will be the status packet - an OUT packet using DATA1 // // PROBLEM: // If a Setup packet is received after status packet of // a Control In transfer has been received in the RX buffer // but before the processor has had a chance the prepare // this buffer for the Setup packet, the Setup packet // will be dropped. // // WORKAROUND: // Set data toggle to DATA0 so if the status stage of a // Control In transfer arrives it will be ACKed by hardware // but will be discarded without filling the RX buffer. // This allows a subsequent SETUP packet to be stored // without any processor intervention. Data1 &= ~1UL; // set DATA0 endpoint_read_core(EP0OUT, MAX_PACKET_SIZE_EP0); } else { endpoint_read(EP0OUT, data, size); } // Clear suspend after the setup stage if (setup_suspend) { USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK; setup_suspend = false; } } uint32_t USBPhyHw::ep0_read_result() { return endpoint_read_result(EP0OUT); } void USBPhyHw::ep0_write(uint8_t *buffer, uint32_t size) { if (ctrl_xfer == CTRL_XFER_READY) { // Transfer is done so ignore call return; } if ((ctrl_xfer == CTRL_XFER_NONE) || (ctrl_xfer == CTRL_XFER_OUT)) { // Prepare for next setup packet endpoint_read_core(EP0OUT, MAX_PACKET_SIZE_EP0); ctrl_xfer = CTRL_XFER_READY; } endpoint_write(EP0IN, buffer, size); // Clear suspend after the setup stage if (setup_suspend) { USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK; setup_suspend = false; } } void USBPhyHw::ep0_stall() { if (ctrl_xfer == CTRL_XFER_READY) { // Transfer is done so ignore call return; } ctrl_xfer = CTRL_XFER_READY; // Clear suspend after the setup stage if (setup_suspend) { USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK; setup_suspend = false; } core_util_critical_section_enter(); endpoint_stall(EP0OUT); // Prepare for next setup packet // Note - time between stalling and setting up the endpoint // must be kept to a minimum to prevent a dropped SETUP // packet. endpoint_read_core(EP0OUT, MAX_PACKET_SIZE_EP0); core_util_critical_section_exit(); } bool USBPhyHw::endpoint_add(usb_ep_t endpoint, uint32_t max_packet, usb_ep_type_t type) { uint32_t handshake_flag = 0; uint8_t * buf; if (DESC_TO_PHY(endpoint) > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) { return false; } uint32_t log_endpoint = DESC_TO_LOG(endpoint); if (type != USB_EP_TYPE_ISO) { handshake_flag = USB_ENDPT_EPHSHK_MASK; } if (DESC_EP_IN(endpoint)) { buf = &endpoint_buffer[EP_BDT_IDX(log_endpoint, TX, ODD)][0]; } else { buf = &endpoint_buffer[EP_BDT_IDX(log_endpoint, RX, ODD)][0]; } // IN endpt -> device to host (TX) if (DESC_EP_IN(endpoint)) { bdt[EP_BDT_IDX(log_endpoint, TX, ODD )].address = (uint32_t) buf; bdt[EP_BDT_IDX(log_endpoint, TX, ODD )].info = 0; bdt[EP_BDT_IDX(log_endpoint, TX, EVEN)].address = 0; USB0->ENDPOINT[log_endpoint].ENDPT |= handshake_flag | // ep handshaking (not if iso endpoint) USB_ENDPT_EPTXEN_MASK; // en TX (IN) tran } // OUT endpt -> host to device (RX) else { bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].byte_count = max_packet; bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].address = (uint32_t) buf; bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].info = BD_DTS_MASK; bdt[EP_BDT_IDX(log_endpoint, RX, EVEN)].info = 0; if (log_endpoint == 0) { // Prepare for setup packet bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].info |= BD_OWN_MASK; } USB0->ENDPOINT[log_endpoint].ENDPT |= handshake_flag | // ep handshaking (not if iso endpoint) USB_ENDPT_EPRXEN_MASK; // en RX (OUT) tran. } // First transfer will be a DATA0 packet Data1 &= ~(1 << DESC_TO_PHY(endpoint)); return true; } void USBPhyHw::endpoint_remove(usb_ep_t endpoint) { USB0->ENDPOINT[DESC_TO_LOG(endpoint)].ENDPT = 0; } void USBPhyHw::endpoint_stall(usb_ep_t endpoint) { USB0->ENDPOINT[DESC_TO_LOG(endpoint)].ENDPT |= USB_ENDPT_EPSTALL_MASK; } void USBPhyHw::endpoint_unstall(usb_ep_t endpoint) { // Next transfer will be a DATA0 packet Data1 &= ~(1 << DESC_TO_PHY(endpoint)); USB0->ENDPOINT[DESC_TO_LOG(endpoint)].ENDPT &= ~USB_ENDPT_EPSTALL_MASK; } bool USBPhyHw::endpoint_read(usb_ep_t endpoint, uint8_t *data, uint32_t size) { uint8_t log = DESC_TO_LOG(endpoint); read_buffers[log] = data; read_sizes[log] = size; return endpoint_read_core(endpoint, size); } bool USBPhyHw::endpoint_read_core(usb_ep_t endpoint, uint32_t max_packet) { uint8_t log_endpoint = DESC_TO_LOG(endpoint); uint32_t idx = EP_BDT_IDX(log_endpoint, RX, 0); bdt[idx].byte_count = max_packet; if ((Data1 >> DESC_TO_PHY(endpoint)) & 1) { bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK | BD_DATA01_MASK; } else { bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK; } Data1 ^= (1 << DESC_TO_PHY(endpoint)); return true; } uint32_t USBPhyHw::endpoint_read_result(usb_ep_t endpoint) { uint8_t log = DESC_TO_LOG(endpoint); uint32_t bytes_read = 0; endpoint_read_result_core(endpoint, read_buffers[log], read_sizes[log], &bytes_read); read_buffers[log] = NULL; read_sizes[log] = 0; return bytes_read; } bool USBPhyHw::endpoint_read_result_core(usb_ep_t endpoint, uint8_t *data, uint32_t size, uint32_t *bytes_read) { uint32_t n, sz, idx, setup = 0; uint8_t not_iso; uint8_t * ep_buf; uint32_t log_endpoint = DESC_TO_LOG(endpoint); if (DESC_TO_PHY(endpoint) > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) { return false; } // if read on a IN endpoint -> error if (DESC_EP_IN(endpoint)) { return false; } idx = EP_BDT_IDX(log_endpoint, RX, 0); sz = bdt[idx].byte_count; not_iso = USB0->ENDPOINT[log_endpoint].ENDPT & USB_ENDPT_EPHSHK_MASK; //for isochronous endpoint, we don't wait an interrupt if ((log_endpoint != 0) && not_iso && !(epComplete & EP(DESC_TO_PHY(endpoint)))) { return false; } if ((log_endpoint == 0) && (TOK_PID(idx) == SETUP_TOKEN)) { setup = 1; } ep_buf = endpoint_buffer[idx]; for (n = 0; n < sz; n++) { data[n] = ep_buf[n]; } if (setup) { // Record the setup type if ((data[6] == 0) && (data[7] == 0)) { ctrl_xfer = CTRL_XFER_NONE; } else { uint8_t in_xfer = (data[0] >> 7) & 1; ctrl_xfer = in_xfer ? CTRL_XFER_IN : CTRL_XFER_OUT; } } *bytes_read = sz; epComplete &= ~EP(DESC_TO_PHY(endpoint)); return true; } bool USBPhyHw::endpoint_write(usb_ep_t endpoint, uint8_t *data, uint32_t size) { uint32_t idx, n; uint8_t * ep_buf; if (DESC_TO_PHY(endpoint) > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) { return false; } // if write on a OUT endpoint -> error if (DESC_EP_OUT(endpoint)) { return false; } idx = EP_BDT_IDX(DESC_TO_LOG(endpoint), TX, 0); bdt[idx].byte_count = size; ep_buf = endpoint_buffer[idx]; for (n = 0; n < size; n++) { ep_buf[n] = data[n]; } if ((Data1 >> DESC_TO_PHY(endpoint)) & 1) { bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK | BD_DATA01_MASK; } else { bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK; } Data1 ^= (1 << DESC_TO_PHY(endpoint)); return true; } void USBPhyHw::endpoint_abort(usb_ep_t endpoint) { uint8_t dir = DESC_EP_IN(endpoint) ? TX : RX; uint32_t idx = EP_BDT_IDX(DESC_TO_LOG(endpoint), dir, 0); bdt[idx].info &= ~BD_OWN_MASK; } void USBPhyHw::process() { uint8_t i; uint8_t istat = USB0->ISTAT & USB0->INTEN; // reset interrupt if (istat & USB_ISTAT_USBRST_MASK) { // disable all endpt for(i = 0; i < 16; i++) { USB0->ENDPOINT[i].ENDPT = 0x00; } // enable control endpoint setup_suspend = false; endpoint_add(EP0OUT, MAX_PACKET_SIZE_EP0, USB_EP_TYPE_CTRL); endpoint_add(EP0IN, MAX_PACKET_SIZE_EP0, USB_EP_TYPE_CTRL); Data1 = 0x55555555; USB0->CTL |= USB_CTL_ODDRST_MASK; USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK; USB0->ISTAT = 0xFF; // clear all interrupt status flags USB0->ERRSTAT = 0xFF; // clear all error flags USB0->ERREN = 0xFF; // enable error interrupt sources USB0->ADDR = 0x00; // set default address memset(read_buffers, 0, sizeof(read_buffers)); memset(read_sizes, 0, sizeof(read_sizes)); // reset bus for USBDevice layer events->reset(); NVIC_ClearPendingIRQ(USB0_IRQn); NVIC_EnableIRQ(USB0_IRQn); return; } // resume interrupt if (istat & USB_ISTAT_RESUME_MASK) { USB0->ISTAT = USB_ISTAT_RESUME_MASK; events->suspend(false); } // SOF interrupt if (istat & USB_ISTAT_SOFTOK_MASK) { USB0->ISTAT = USB_ISTAT_SOFTOK_MASK; // SOF event, read frame number events->sof(frameNumber()); } // stall interrupt if (istat & 1<<7) { if (USB0->ENDPOINT[0].ENDPT & USB_ENDPT_EPSTALL_MASK) USB0->ENDPOINT[0].ENDPT &= ~USB_ENDPT_EPSTALL_MASK; USB0->ISTAT = USB_ISTAT_STALL_MASK; } // token interrupt if (istat & USB_ISTAT_TOKDNE_MASK) { uint32_t num = (USB0->STAT >> 4) & 0x0F; uint32_t dir = (USB0->STAT >> 3) & 0x01; uint32_t ev_odd = (USB0->STAT >> 2) & 0x01; int phy_ep = (num << 1) | dir; bool tx_en = (USB0->ENDPOINT[PHY_TO_LOG(phy_ep)].ENDPT & USB_ENDPT_EPTXEN_MASK) ? true : false; bool rx_en = (USB0->ENDPOINT[PHY_TO_LOG(phy_ep)].ENDPT & USB_ENDPT_EPRXEN_MASK) ? true : false; // setup packet if (tx_en && (num == 0) && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == SETUP_TOKEN)) { setup_suspend = true; Data1 |= 0x02 | 0x01; // set DATA1 for TX and RX bdt[EP_BDT_IDX(0, TX, EVEN)].info &= ~BD_OWN_MASK; bdt[EP_BDT_IDX(0, TX, ODD)].info &= ~BD_OWN_MASK; // EP0 SETUP event (SETUP data received) events->ep0_setup(); } else { // OUT packet if (rx_en && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == OUT_TOKEN)) { if (num == 0) events->ep0_out(); else { epComplete |= EP(phy_ep); events->out(PHY_TO_DESC(phy_ep)); } } // IN packet if (tx_en && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == IN_TOKEN)) { if (num == 0) { events->ep0_in(); if (set_addr == 1) { USB0->ADDR = addr & 0x7F; set_addr = 0; } } else { epComplete |= EP(phy_ep); events->in(PHY_TO_DESC(phy_ep)); } } } USB0->ISTAT = USB_ISTAT_TOKDNE_MASK; } // sleep interrupt if (istat & 1<<4) { USB0->ISTAT = USB_ISTAT_SLEEP_MASK; events->suspend(true); } // error interrupt if (istat & USB_ISTAT_ERROR_MASK) { USB0->ERRSTAT = 0xFF; USB0->ISTAT = USB_ISTAT_ERROR_MASK; } // Check if the suspend condition should be removed here // 1. Don't attempt to clear USB_CTL_TXSUSPENDTOKENBUSY_MASK if it isn't set. This // is to avoid potential race conditions. // 2. If a setup packet is being processed then remove suspend on the next control transfer rather than here // 3. Process all pending packets before removing suspend bool suspended = (USB0->CTL & USB_CTL_TXSUSPENDTOKENBUSY_MASK) != 0; if (suspended && !setup_suspend && ((USB0->ISTAT & USB_ISTAT_TOKDNE_MASK) == 0)) { USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK; } NVIC_ClearPendingIRQ(USB0_IRQn); NVIC_EnableIRQ(USB0_IRQn); } void USBPhyHw::_usbisr(void) { NVIC_DisableIRQ(USB0_IRQn); instance->events->start_process(); } #endif
[ "russ.butler@arm.com" ]
russ.butler@arm.com
9b48bb7cad235baa245a4175c347816df89d9c47
c456b05cf1fe1b74c9ac16fad776cd174e566e66
/src/engine/EngineManager.cpp
4b3f6ca196acc580e7ae78d751bc931ff9e5a9a2
[]
no_license
Nedusat/MurderEngine
d4a50d7768e12dcdaa2335a0ae24fc1dd268050e
f8d5ddbac21e9e4af93c2539963bcb219d355220
refs/heads/master
2021-05-17T15:53:58.949585
2020-03-28T16:38:51
2020-03-28T16:38:51
null
0
0
null
null
null
null
UTF-8
C++
false
false
1,439
cpp
#include <vector> #include "EngineManager.h" extern std::string RENDER_API; namespace me { static std::vector<me::image*> images; static std::vector<me::material*> materials; static std::vector<me::mesh*> meshes; static std::vector<me::light*> lights; static std::vector<me::camera*> cameras; static std::vector<me::shader*> shaders; me::image* getImage(unsigned int id) { return images[id-1]; } me::material* getMaterial(unsigned int id) { return materials[id-1]; } me::mesh* getMesh(unsigned int id) { return meshes[id-1]; } me::light* getLight(unsigned int id) { return lights[id-1]; } me::camera* getCamera(unsigned int id) { return cameras[id-1]; } me::shader* getShader(unsigned int id) { return shaders[id-1]; } unsigned int registerImage(me::image* image) { images.push_back(image); return images.size(); } unsigned int registerMaterial(me::material* material) { materials.push_back(material); return materials.size(); } unsigned int registerMesh(me::mesh* mesh) { meshes.push_back(mesh); return meshes.size(); } unsigned int registerLight(me::light* light) { lights.push_back(light); return lights.size(); } unsigned int registerCamera(me::camera* camera) { cameras.push_back(camera); return cameras.size(); } unsigned int registerShader(me::shader* shader) { shaders.push_back(shader); return shaders.size(); } };
[ "spelfanta2@gmail.com" ]
spelfanta2@gmail.com
9b1e2a8441e2f12c2826252117697e3ceed2d2a2
e0ca77619bea4e7fce2be7027b1a6b7715b27b81
/Physics Engine 3.0/Spring.cpp
68ad05fe2a928d2ef234be1b178c2d781d15be16
[]
no_license
kntzn/physics3
5187e3c96a7f78190e13348cfcd28274d6152f6f
629b4f069beff795d9bd9804c3d961c01a224db9
refs/heads/master
2020-04-10T18:35:33.194112
2018-12-28T16:01:28
2018-12-28T16:01:28
161,207,935
0
1
null
2018-12-30T09:44:08
2018-12-10T16:59:30
C++
UTF-8
C++
false
false
1,044
cpp
#include "Spring.h" Spring::Spring (Vectord pos0, Vectord pos1, PHYSENG_DATA_TYPE k) : right (pos0), left (pos1), hardness (k) { init_dist = curr_dist = max_dist = min_dist = (pos0 - pos1).length (); delta_dist = 0; } Spring::~Spring () { } Vectord Spring::getForceBegin () { return force; } Vectord Spring::getForceEnd () { return -force; } void Spring::update (Vectord begin, Vectord end) { Vectord deltaPos = end - begin; curr_dist = deltaPos.length (); //( dx ) = ( x ) - ( x0 ) delta_dist = curr_dist - init_dist; //(F) = ( dx ) * ( k ) force = (deltaPos.dir () * delta_dist) * hardness; // Min/Max distance stats: if (max_dist < curr_dist) max_dist = curr_dist; if (min_dist > curr_dist) min_dist = curr_dist; } PHYSENG_DATA_TYPE Spring::getPotEnergy () { // E = ( k ) * ( dx^2 ) / 2 return hardness * delta_dist * delta_dist / 2.0; }
[ "kntznart@gmail.com" ]
kntznart@gmail.com
b78203c7df92aaf5af13ad4733973a33004166ed
cc0f5e36bdfbc7c2192213d2df0be62382324129
/HW2/HW2_PortfolioAnalysis/HW2_PortfolioAnalysis/HW2_PortfolioAnalysis.cpp
d842d022dfa2f78367806b45df48b74e0f3fde76
[ "Apache-2.0" ]
permissive
marioharper182/Portfolio
a5c1d39e1c3e8f2e8de75cb4bdbc97c905e9119d
042002743c7a98aaa5a8e54194e42b713ddc7c7d
refs/heads/master
2020-06-06T15:31:02.574039
2015-03-03T18:09:33
2015-03-03T18:09:33
30,231,753
0
0
null
null
null
null
UTF-8
C++
false
false
4,349
cpp
// HW2_PortfolioAnalysis.cpp : Defines the entry point for the application. // #include "stdafx.h" #include "HW2_PortfolioAnalysis.h" #define MAX_LOADSTRING 100 // Global Variables: HINSTANCE hInst; // current instance TCHAR szTitle[MAX_LOADSTRING]; // The title bar text TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name // Forward declarations of functions included in this code module: ATOM MyRegisterClass(HINSTANCE hInstance); BOOL InitInstance(HINSTANCE, int); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPTSTR lpCmdLine, _In_ int nCmdShow) { UNREFERENCED_PARAMETER(hPrevInstance); UNREFERENCED_PARAMETER(lpCmdLine); // TODO: Place code here. MSG msg; HACCEL hAccelTable; // Initialize global strings LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING); LoadString(hInstance, IDC_HW2_PORTFOLIOANALYSIS, szWindowClass, MAX_LOADSTRING); MyRegisterClass(hInstance); // Perform application initialization: if (!InitInstance (hInstance, nCmdShow)) { return FALSE; } hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_HW2_PORTFOLIOANALYSIS)); // Main message loop: while (GetMessage(&msg, NULL, 0, 0)) { if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } return (int) msg.wParam; } // // FUNCTION: MyRegisterClass() // // PURPOSE: Registers the window class. // ATOM MyRegisterClass(HINSTANCE hInstance) { WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = CS_HREDRAW | CS_VREDRAW; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInstance; wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HW2_PORTFOLIOANALYSIS)); wcex.hCursor = LoadCursor(NULL, IDC_ARROW); wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wcex.lpszMenuName = MAKEINTRESOURCE(IDC_HW2_PORTFOLIOANALYSIS); wcex.lpszClassName = szWindowClass; wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); return RegisterClassEx(&wcex); } // // FUNCTION: InitInstance(HINSTANCE, int) // // PURPOSE: Saves instance handle and creates main window // // COMMENTS: // // In this function, we save the instance handle in a global variable and // create and display the main program window. // BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) { HWND hWnd; hInst = hInstance; // Store instance handle in our global variable hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); if (!hWnd) { return FALSE; } ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); return TRUE; } // // FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM) // // PURPOSE: Processes messages for the main window. // // WM_COMMAND - process the application menu // WM_PAINT - Paint the main window // WM_DESTROY - post a quit message and return // // LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { int wmId, wmEvent; PAINTSTRUCT ps; HDC hdc; switch (message) { case WM_COMMAND: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); // Parse the menu selections: switch (wmId) { case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } break; case WM_PAINT: hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code here... EndPaint(hWnd, &ps); break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; } // Message handler for about box. INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: return (INT_PTR)TRUE; case WM_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { EndDialog(hDlg, LOWORD(wParam)); return (INT_PTR)TRUE; } break; } return (INT_PTR)FALSE; }
[ "marioharper182@gmail.com" ]
marioharper182@gmail.com
699bd25b8433cbdbd98ea24ad726ee20f167a7fd
4d41dd85dfdc35f4e0b401190b8502e11ba3f061
/chat/newingroup.h
d47d47162b8e99598eb04b9d6e8111bbc7e7be33
[ "MIT" ]
permissive
Snowball-Di/cs2021_qt_chat
07f1533ac43a8fd4667b3210fe1429e84724b5c8
3a3c61e409683df61c31f55c5e360917c3356772
refs/heads/main
2023-07-31T15:06:56.733223
2021-09-02T07:09:41
2021-09-02T07:09:41
399,018,103
1
0
null
null
null
null
UTF-8
C++
false
false
403
h
#ifndef NEWINGROUP_H #define NEWINGROUP_H #include <QDialog> namespace Ui { class newinGroup; } class newinGroup : public QDialog { Q_OBJECT public: explicit newinGroup(QWidget *parent = nullptr); ~newinGroup(); void setinfo(QString groupid, QString groupname, QString newid, QString newname); void on_know_clicked(); private: Ui::newinGroup *ui; }; #endif // NEWINGROUP_H
[ "sn0wballdidi@gmail.com" ]
sn0wballdidi@gmail.com
853f6dd7b064bf341b5cc4eaa9a84aa138a366ce
5d83739af703fb400857cecc69aadaf02e07f8d1
/Archive2/08/14bee2c2716a1f/main.cpp
46b060bcb143f3220f00af0c513edb8854a7a293
[]
no_license
WhiZTiM/coliru
3a6c4c0bdac566d1aa1c21818118ba70479b0f40
2c72c048846c082f943e6c7f9fa8d94aee76979f
refs/heads/master
2021-01-01T05:10:33.812560
2015-08-24T19:09:22
2015-08-24T19:09:22
56,789,706
3
0
null
null
null
null
UTF-8
C++
false
false
1,730
cpp
#include <map> #include <iostream> #include <functional> #include <tuple> #include <iomanip> #include <utility> #include <unordered_map> #include <vector> using namespace std; template <typename T> class TD; struct NullType {}; template <int N> struct Disk { const int value{N}; }; template <typename H, typename T> struct Stack; template <typename T, int N> struct Stack<Disk<N>, T> { typedef Disk<N> Head; typedef T Tail; }; #define STACK_0() NullType #define STACK_1(D1) Stack<D1, NullType> #define STACK_2(D1, D2) Stack<D1, STACK_1(D2)> #define STACK_3(D1, D2, D3) Stack<D1, STACK_2(D2, D3)> #define STACK_4(D1, D2, D3, D4) Stack<D1, STACK_3(D2, D3, D4)> template <typename T> struct Pop; template <int N, typename T1> struct Pop<Stack<Disk<N>, T1>> { typedef Stack<Disk<N>, typename Pop<T1>::result> result; }; template<int N> struct Pop<Stack<Disk<N>, NullType>> { typedef NullType result; }; template <typename T, int M> struct Push; template <int N, typename T1, int M> struct Push<Stack<Disk<N>, T1>, M> { typedef Stack<Disk<N>, typename Push<T1, M>::result> result; }; template <int N, int M> struct Push<Stack<Disk<N>, NullType>, M> { typedef Stack<Disk<N>, Stack<Disk<M>, NullType>> result; }; template <typename S1, typename S2, typename S3> struct Hanoi { typedef S1 Stack1; typedef S2 Stack2; typedef S3 Stack3; }; int main() { TD<STACK_4(Disk<4>, Disk<3>, Disk<2>, Disk<1>)> td1; TD<Pop<STACK_4(Disk<4>, Disk<3>, Disk<2>, Disk<1>)>::result> td2; TD<Push<Pop<STACK_4(Disk<4>, Disk<3>, Disk<2>, Disk<1>)>::result, 5>::result> td3; //Hanoi<STACK_4(Disk<4>, Disk<3>, Disk<2>, Disk<1>), STACK_0(), STACK_0()>::solution s; //TD<decltype(s)> td; }
[ "francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df" ]
francis.rammeloo@36614edc-3e3a-acb8-9062-c8ae0e4185df
6155f56ddbba6d2924a959f8ddf213416b7908c2
9767141fee45e92ffb7b02ba30647c8d84be8daa
/src/governance-vote.cpp
111f798338b1e13839bd0505c0e60265f602ded2
[ "MIT" ]
permissive
CHN-portal/CHN-Portal
3fb4c7b037dbf1d52ec0cb264a81d9d730cd7ae1
74c2a20f99add8fb45ce0722d1674496a3d28e7e
refs/heads/master
2020-09-15T13:39:34.399755
2020-05-16T16:06:23
2020-05-16T16:06:23
223,462,363
1
0
null
null
null
null
UTF-8
C++
false
false
11,096
cpp
// Copyright (c) 2014-2019 The Dash Core developers // Copyright (c) 2019 The CbdHealthNetwork Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "governance-vote.h" #include "governance-object.h" #include "masternode-sync.h" #include "messagesigner.h" #include "spork.h" #include "util.h" #include "evo/deterministicmns.h" std::string CGovernanceVoting::ConvertOutcomeToString(vote_outcome_enum_t nOutcome) { static const std::map<vote_outcome_enum_t, std::string> mapOutcomeString = { { VOTE_OUTCOME_NONE, "none" }, { VOTE_OUTCOME_YES, "yes" }, { VOTE_OUTCOME_NO, "no" }, { VOTE_OUTCOME_ABSTAIN, "abstain" } }; const auto& it = mapOutcomeString.find(nOutcome); if (it == mapOutcomeString.end()) { LogPrintf("CGovernanceVoting::%s -- ERROR: Unknown outcome %d\n", __func__, nOutcome); return "error"; } return it->second; } std::string CGovernanceVoting::ConvertSignalToString(vote_signal_enum_t nSignal) { static const std::map<vote_signal_enum_t, std::string> mapSignalsString = { { VOTE_SIGNAL_FUNDING, "funding" }, { VOTE_SIGNAL_VALID, "valid" }, { VOTE_SIGNAL_DELETE, "delete" }, { VOTE_SIGNAL_ENDORSED, "endorsed" } }; const auto& it = mapSignalsString.find(nSignal); if (it == mapSignalsString.end()) { LogPrintf("CGovernanceVoting::%s -- ERROR: Unknown signal %d\n", __func__, nSignal); return "none"; } return it->second; } vote_outcome_enum_t CGovernanceVoting::ConvertVoteOutcome(const std::string& strVoteOutcome) { static const std::map<std::string, vote_outcome_enum_t> mapStringOutcome = { { "none", VOTE_OUTCOME_NONE }, { "yes", VOTE_OUTCOME_YES }, { "no", VOTE_OUTCOME_NO }, { "abstain", VOTE_OUTCOME_ABSTAIN } }; const auto& it = mapStringOutcome.find(strVoteOutcome); if (it == mapStringOutcome.end()) { LogPrintf("CGovernanceVoting::%s -- ERROR: Unknown outcome %s\n", __func__, strVoteOutcome); return VOTE_OUTCOME_NONE; } return it->second; } vote_signal_enum_t CGovernanceVoting::ConvertVoteSignal(const std::string& strVoteSignal) { static const std::map<std::string, vote_signal_enum_t> mapStrVoteSignals = { {"funding", VOTE_SIGNAL_FUNDING}, {"valid", VOTE_SIGNAL_VALID}, {"delete", VOTE_SIGNAL_DELETE}, {"endorsed", VOTE_SIGNAL_ENDORSED}}; const auto& it = mapStrVoteSignals.find(strVoteSignal); if (it == mapStrVoteSignals.end()) { LogPrintf("CGovernanceVoting::%s -- ERROR: Unknown signal %s\n", __func__, strVoteSignal); return VOTE_SIGNAL_NONE; } return it->second; } CGovernanceVote::CGovernanceVote() : fValid(true), fSynced(false), nVoteSignal(int(VOTE_SIGNAL_NONE)), masternodeOutpoint(), nParentHash(), nVoteOutcome(int(VOTE_OUTCOME_NONE)), nTime(0), vchSig() { } CGovernanceVote::CGovernanceVote(const COutPoint& outpointMasternodeIn, const uint256& nParentHashIn, vote_signal_enum_t eVoteSignalIn, vote_outcome_enum_t eVoteOutcomeIn) : fValid(true), fSynced(false), nVoteSignal(eVoteSignalIn), masternodeOutpoint(outpointMasternodeIn), nParentHash(nParentHashIn), nVoteOutcome(eVoteOutcomeIn), nTime(GetAdjustedTime()), vchSig() { UpdateHash(); } std::string CGovernanceVote::ToString() const { std::ostringstream ostr; ostr << masternodeOutpoint.ToStringShort() << ":" << nTime << ":" << CGovernanceVoting::ConvertOutcomeToString(GetOutcome()) << ":" << CGovernanceVoting::ConvertSignalToString(GetSignal()); return ostr.str(); } void CGovernanceVote::Relay(CConnman& connman) const { // Do not relay until fully synced if (!masternodeSync.IsSynced()) { LogPrint("gobject", "CGovernanceVote::Relay -- won't relay until fully synced\n"); return; } auto mnList = deterministicMNManager->GetListAtChainTip(); auto dmn = mnList.GetMNByCollateral(masternodeOutpoint); if (!dmn) { return; } // When this vote is from non-valid (PoSe banned) MN, we should only announce it to v0.14.0.1 nodes as older nodes // will ban us otherwise. int minVersion = MIN_GOVERNANCE_PEER_PROTO_VERSION; if (!mnList.IsMNValid(dmn)) { minVersion = GOVERNANCE_POSE_BANNED_VOTES_VERSION; } CInv inv(MSG_GOVERNANCE_OBJECT_VOTE, GetHash()); connman.RelayInv(inv, minVersion); } void CGovernanceVote::UpdateHash() const { // Note: doesn't match serialization CHashWriter ss(SER_GETHASH, PROTOCOL_VERSION); ss << masternodeOutpoint << uint8_t{} << 0xffffffff; // adding dummy values here to match old hashing format ss << nParentHash; ss << nVoteSignal; ss << nVoteOutcome; ss << nTime; *const_cast<uint256*>(&hash) = ss.GetHash(); } uint256 CGovernanceVote::GetHash() const { return hash; } uint256 CGovernanceVote::GetSignatureHash() const { return SerializeHash(*this); } bool CGovernanceVote::Sign(const CKey& key, const CKeyID& keyID) { std::string strError; if (sporkManager.IsSporkActive(SPORK_6_NEW_SIGS)) { uint256 hash = GetSignatureHash(); if (!CHashSigner::SignHash(hash, key, vchSig)) { LogPrintf("CGovernanceVote::Sign -- SignHash() failed\n"); return false; } if (!CHashSigner::VerifyHash(hash, keyID, vchSig, strError)) { LogPrintf("CGovernanceVote::Sign -- VerifyHash() failed, error: %s\n", strError); return false; } } else { std::string strMessage = masternodeOutpoint.ToStringShort() + "|" + nParentHash.ToString() + "|" + std::to_string(nVoteSignal) + "|" + std::to_string(nVoteOutcome) + "|" + std::to_string(nTime); if (!CMessageSigner::SignMessage(strMessage, vchSig, key)) { LogPrintf("CGovernanceVote::Sign -- SignMessage() failed\n"); return false; } if (!CMessageSigner::VerifyMessage(keyID, vchSig, strMessage, strError)) { LogPrintf("CGovernanceVote::Sign -- VerifyMessage() failed, error: %s\n", strError); return false; } } return true; } bool CGovernanceVote::CheckSignature(const CKeyID& keyID) const { std::string strError; if (sporkManager.IsSporkActive(SPORK_6_NEW_SIGS)) { uint256 hash = GetSignatureHash(); if (!CHashSigner::VerifyHash(hash, keyID, vchSig, strError)) { // could be a signature in old format std::string strMessage = masternodeOutpoint.ToStringShort() + "|" + nParentHash.ToString() + "|" + std::to_string(nVoteSignal) + "|" + std::to_string(nVoteOutcome) + "|" + std::to_string(nTime); if (!CMessageSigner::VerifyMessage(keyID, vchSig, strMessage, strError)) { // nope, not in old format either LogPrint("gobject", "CGovernanceVote::IsValid -- VerifyMessage() failed, error: %s\n", strError); return false; } } } else { std::string strMessage = masternodeOutpoint.ToStringShort() + "|" + nParentHash.ToString() + "|" + std::to_string(nVoteSignal) + "|" + std::to_string(nVoteOutcome) + "|" + std::to_string(nTime); if (!CMessageSigner::VerifyMessage(keyID, vchSig, strMessage, strError)) { LogPrint("gobject", "CGovernanceVote::IsValid -- VerifyMessage() failed, error: %s\n", strError); return false; } } return true; } bool CGovernanceVote::Sign(const CBLSSecretKey& key) { uint256 hash = GetSignatureHash(); CBLSSignature sig = key.Sign(hash); if (!sig.IsValid()) { return false; } sig.GetBuf(vchSig); return true; } bool CGovernanceVote::CheckSignature(const CBLSPublicKey& pubKey) const { uint256 hash = GetSignatureHash(); CBLSSignature sig; sig.SetBuf(vchSig); if (!sig.VerifyInsecure(pubKey, hash)) { LogPrintf("CGovernanceVote::CheckSignature -- VerifyInsecure() failed\n"); return false; } return true; } bool CGovernanceVote::IsValid(bool useVotingKey) const { if (nTime > GetAdjustedTime() + (60 * 60)) { LogPrint("gobject", "CGovernanceVote::IsValid -- vote is too far ahead of current time - %s - nTime %lli - Max Time %lli\n", GetHash().ToString(), nTime, GetAdjustedTime() + (60 * 60)); return false; } // support up to MAX_SUPPORTED_VOTE_SIGNAL, can be extended if (nVoteSignal > MAX_SUPPORTED_VOTE_SIGNAL) { LogPrint("gobject", "CGovernanceVote::IsValid -- Client attempted to vote on invalid signal(%d) - %s\n", nVoteSignal, GetHash().ToString()); return false; } // 0=none, 1=yes, 2=no, 3=abstain. Beyond that reject votes if (nVoteOutcome > 3) { LogPrint("gobject", "CGovernanceVote::IsValid -- Client attempted to vote on invalid outcome(%d) - %s\n", nVoteSignal, GetHash().ToString()); return false; } auto dmn = deterministicMNManager->GetListAtChainTip().GetMNByCollateral(masternodeOutpoint); if (!dmn) { LogPrint("gobject", "CGovernanceVote::IsValid -- Unknown Masternode - %s\n", masternodeOutpoint.ToStringShort()); return false; } if (useVotingKey) { return CheckSignature(dmn->pdmnState->keyIDVoting); } else { return CheckSignature(dmn->pdmnState->pubKeyOperator.Get()); } } bool operator==(const CGovernanceVote& vote1, const CGovernanceVote& vote2) { bool fResult = ((vote1.masternodeOutpoint == vote2.masternodeOutpoint) && (vote1.nParentHash == vote2.nParentHash) && (vote1.nVoteOutcome == vote2.nVoteOutcome) && (vote1.nVoteSignal == vote2.nVoteSignal) && (vote1.nTime == vote2.nTime)); return fResult; } bool operator<(const CGovernanceVote& vote1, const CGovernanceVote& vote2) { bool fResult = (vote1.masternodeOutpoint < vote2.masternodeOutpoint); if (!fResult) { return false; } fResult = (vote1.masternodeOutpoint == vote2.masternodeOutpoint); fResult = fResult && (vote1.nParentHash < vote2.nParentHash); if (!fResult) { return false; } fResult = fResult && (vote1.nParentHash == vote2.nParentHash); fResult = fResult && (vote1.nVoteOutcome < vote2.nVoteOutcome); if (!fResult) { return false; } fResult = fResult && (vote1.nVoteOutcome == vote2.nVoteOutcome); fResult = fResult && (vote1.nVoteSignal == vote2.nVoteSignal); if (!fResult) { return false; } fResult = fResult && (vote1.nVoteSignal == vote2.nVoteSignal); fResult = fResult && (vote1.nTime < vote2.nTime); return fResult; }
[ "58087242+CHN-portal@users.noreply.github.com" ]
58087242+CHN-portal@users.noreply.github.com
dddac3511efe00222d7b1116b5f03727abc71919
b7fdcdfa28c43800620edd296d2dade512db8550
/ultrasonicARduino.ino
5a8880746b125949417652457683e459638cd7e8
[]
no_license
mentablack/XCOS-SerialREAD-Block
bdde1276d115782280eb5939048119c43870839b
8273334bb0479fef9540f48f6decc4ec7f97ed63
refs/heads/master
2020-04-27T15:03:04.252144
2019-03-08T00:09:38
2019-03-08T00:09:38
174,430,305
0
0
null
null
null
null
UTF-8
C++
false
false
991
ino
int trigPin = 7; // Trigger int echoPin = 6; // Echo long duration, cm, inches; int data; unsigned long time; void setup() { //Serial Port begin Serial.begin (9600); //Define inputs and outputs pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); } void loop() { // The sensor is triggered by a HIGH pulse of 10 or more microseconds. // Give a short LOW pulse beforehand to ensure a clean HIGH pulse: digitalWrite(trigPin, LOW); delayMicroseconds(5); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); // Read the signal from the sensor: a HIGH pulse whose // duration is the time (in microseconds) from the sending // of the ping to the reception of its echo off of an object. pinMode(echoPin, INPUT); duration = pulseIn(echoPin, HIGH); // Convert the time into a distance cm = (duration/2) / 29.1; // Divide by 29.1 or multiply by 0.0343 time = millis(); Serial.println(cm); delay(10); }
[ "noreply@github.com" ]
noreply@github.com
953855d3e57befa9e50101496185bc701eb2ba13
6aab4199ab2cab0b15d9af390a251f37802366ab
/pc/test/fake_audio_capture_module_unittest.cc
8dd252a733a888c06ae23d6ec1e1e0b7c97c4139
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "LicenseRef-scancode-google-patent-license-webrtc", "LicenseRef-scancode-google-patent-license-webm" ]
permissive
adwpc/webrtc
f288a600332e5883b2ca44492e02bea81e45b4fa
a30eb44013b8472ea6a042d7ed2909eb7346f9a8
refs/heads/master
2021-05-24T13:18:44.227242
2021-02-01T14:54:12
2021-02-01T14:54:12
174,692,051
0
0
MIT
2019-03-09T12:32:13
2019-03-09T12:32:13
null
UTF-8
C++
false
false
7,045
cc
/* * Copyright 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "pc/test/fake_audio_capture_module.h" #include <string.h> #include <algorithm> #include "api/scoped_refptr.h" #include "rtc_base/critical_section.h" #include "rtc_base/gunit.h" #include "test/gtest.h" class FakeAdmTest : public ::testing::Test, public webrtc::AudioTransport { protected: static const int kMsInSecond = 1000; FakeAdmTest() : push_iterations_(0), pull_iterations_(0), rec_buffer_bytes_(0) { memset(rec_buffer_, 0, sizeof(rec_buffer_)); } void SetUp() override { fake_audio_capture_module_ = FakeAudioCaptureModule::Create(); EXPECT_TRUE(fake_audio_capture_module_.get() != NULL); } // Callbacks inherited from webrtc::AudioTransport. // ADM is pushing data. int32_t RecordedDataIsAvailable(const void* audioSamples, const size_t nSamples, const size_t nBytesPerSample, const size_t nChannels, const uint32_t samplesPerSec, const uint32_t totalDelayMS, const int32_t clockDrift, const uint32_t currentMicLevel, const bool keyPressed, uint32_t& newMicLevel) override { rtc::CritScope cs(&crit_); rec_buffer_bytes_ = nSamples * nBytesPerSample; if ((rec_buffer_bytes_ == 0) || (rec_buffer_bytes_ > FakeAudioCaptureModule::kNumberSamples * FakeAudioCaptureModule::kNumberBytesPerSample)) { ADD_FAILURE(); return -1; } memcpy(rec_buffer_, audioSamples, rec_buffer_bytes_); ++push_iterations_; newMicLevel = currentMicLevel; return 0; } void PullRenderData(int bits_per_sample, int sample_rate, size_t number_of_channels, size_t number_of_frames, void* audio_data, int64_t* elapsed_time_ms, int64_t* ntp_time_ms) override {} // ADM is pulling data. int32_t NeedMorePlayData(const size_t nSamples, const size_t nBytesPerSample, const size_t nChannels, const uint32_t samplesPerSec, void* audioSamples, size_t& nSamplesOut, int64_t* elapsed_time_ms, int64_t* ntp_time_ms) override { rtc::CritScope cs(&crit_); ++pull_iterations_; const size_t audio_buffer_size = nSamples * nBytesPerSample; const size_t bytes_out = RecordedDataReceived() ? CopyFromRecBuffer(audioSamples, audio_buffer_size) : GenerateZeroBuffer(audioSamples, audio_buffer_size); nSamplesOut = bytes_out / nBytesPerSample; *elapsed_time_ms = 0; *ntp_time_ms = 0; return 0; } int push_iterations() const { rtc::CritScope cs(&crit_); return push_iterations_; } int pull_iterations() const { rtc::CritScope cs(&crit_); return pull_iterations_; } rtc::scoped_refptr<FakeAudioCaptureModule> fake_audio_capture_module_; private: bool RecordedDataReceived() const { return rec_buffer_bytes_ != 0; } size_t GenerateZeroBuffer(void* audio_buffer, size_t audio_buffer_size) { memset(audio_buffer, 0, audio_buffer_size); return audio_buffer_size; } size_t CopyFromRecBuffer(void* audio_buffer, size_t audio_buffer_size) { EXPECT_EQ(audio_buffer_size, rec_buffer_bytes_); const size_t min_buffer_size = std::min(audio_buffer_size, rec_buffer_bytes_); memcpy(audio_buffer, rec_buffer_, min_buffer_size); return min_buffer_size; } rtc::CriticalSection crit_; int push_iterations_; int pull_iterations_; char rec_buffer_[FakeAudioCaptureModule::kNumberSamples * FakeAudioCaptureModule::kNumberBytesPerSample]; size_t rec_buffer_bytes_; }; TEST_F(FakeAdmTest, PlayoutTest) { EXPECT_EQ(0, fake_audio_capture_module_->RegisterAudioCallback(this)); bool stereo_available = false; EXPECT_EQ(0, fake_audio_capture_module_->StereoPlayoutIsAvailable( &stereo_available)); EXPECT_TRUE(stereo_available); EXPECT_NE(0, fake_audio_capture_module_->StartPlayout()); EXPECT_FALSE(fake_audio_capture_module_->PlayoutIsInitialized()); EXPECT_FALSE(fake_audio_capture_module_->Playing()); EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); EXPECT_EQ(0, fake_audio_capture_module_->InitPlayout()); EXPECT_TRUE(fake_audio_capture_module_->PlayoutIsInitialized()); EXPECT_FALSE(fake_audio_capture_module_->Playing()); EXPECT_EQ(0, fake_audio_capture_module_->StartPlayout()); EXPECT_TRUE(fake_audio_capture_module_->Playing()); uint16_t delay_ms = 10; EXPECT_EQ(0, fake_audio_capture_module_->PlayoutDelay(&delay_ms)); EXPECT_EQ(0, delay_ms); EXPECT_TRUE_WAIT(pull_iterations() > 0, kMsInSecond); EXPECT_GE(0, push_iterations()); EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); EXPECT_FALSE(fake_audio_capture_module_->Playing()); } TEST_F(FakeAdmTest, RecordTest) { EXPECT_EQ(0, fake_audio_capture_module_->RegisterAudioCallback(this)); bool stereo_available = false; EXPECT_EQ(0, fake_audio_capture_module_->StereoRecordingIsAvailable( &stereo_available)); EXPECT_FALSE(stereo_available); EXPECT_NE(0, fake_audio_capture_module_->StartRecording()); EXPECT_FALSE(fake_audio_capture_module_->Recording()); EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); EXPECT_EQ(0, fake_audio_capture_module_->InitRecording()); EXPECT_EQ(0, fake_audio_capture_module_->StartRecording()); EXPECT_TRUE(fake_audio_capture_module_->Recording()); EXPECT_TRUE_WAIT(push_iterations() > 0, kMsInSecond); EXPECT_GE(0, pull_iterations()); EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); EXPECT_FALSE(fake_audio_capture_module_->Recording()); } TEST_F(FakeAdmTest, DuplexTest) { EXPECT_EQ(0, fake_audio_capture_module_->RegisterAudioCallback(this)); EXPECT_EQ(0, fake_audio_capture_module_->InitPlayout()); EXPECT_EQ(0, fake_audio_capture_module_->StartPlayout()); EXPECT_EQ(0, fake_audio_capture_module_->InitRecording()); EXPECT_EQ(0, fake_audio_capture_module_->StartRecording()); EXPECT_TRUE_WAIT(push_iterations() > 0, kMsInSecond); EXPECT_TRUE_WAIT(pull_iterations() > 0, kMsInSecond); EXPECT_EQ(0, fake_audio_capture_module_->StopPlayout()); EXPECT_EQ(0, fake_audio_capture_module_->StopRecording()); }
[ "adwpc@hotmail.com" ]
adwpc@hotmail.com
096ce318fcda6500c1ceba0d6ac2b594f6d125d6
ea3251683b8e108964903d1ca4610db1135fc140
/sw/testDriver/ctestdriver.cpp
edc135be5b43e554f86c240d5a0f8d08f40054cf
[]
no_license
b4ckup/dhbw_uav_indoor_navigation
aa52de7a6beb220170c9e1cd625fe7d576cad2d1
f82a1669531b2bc5f10259aee222a053ebeff466
refs/heads/master
2021-01-19T06:09:50.049731
2016-07-04T21:05:39
2016-07-04T21:05:39
61,422,782
1
0
null
null
null
null
UTF-8
C++
false
false
6,555
cpp
#include "ctestdriver.h" tBeaconResources beaconResources[] = { /*MAC LATITUDE LONGITUDE HEIGHT referenceDistance referencePower*/ //for wifi card (laptop) // {WIFI_BEACON1_MAC, 4.1, 1.6, 1, 1, -25}, // {WIFI_BEACON2_MAC, 10, 4.2, 0, 1, -25}, // {WIFI_BEACON3_MAC, 4.6, 15, -1, 1, -25}, // {WIFI_UAVHOST_MAC, 3.1, 1.1, 0, 1, -22}, // {TESTMAC1, -1, 1, 1, 1, -20}, {TESTMAC2, -3, 3, -3, 1, -20}, {TESTMAC3, 8, -8, -5, 1, -20}, {TESTMAC4, 8, 4, 0, 1, -20}, }; uint beaconResourceNum = sizeof(beaconResources)/sizeof(tBeaconResources); cTestDriver::cTestDriver(int interval_msecs, QString trajectory_file, double sigma) { trajectoryLogFile = NULL; trajectoryLogStream = NULL; timer.setInterval(interval_msecs); QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(on_timer_timeout())); this->variance = sigma * sigma; //open trajectory file trajFile = new QFile(trajectory_file); if(!trajFile->open(QIODevice::ReadOnly)) { cout<<"-> ERROR <- cTestDriver(): Cannot open trajectory file : "<<trajFile->errorString().toStdString()<<endl; trajFile = NULL; trajStream = NULL; } else { trajStream = new QTextStream(trajFile); } //open noise file noiseFile = new QFile(GAUSSIAN_NOISE_FILE); if(!noiseFile->open(QIODevice::ReadOnly)) { cout<<"-> ERROR <- cTestDriver(): Cannot open gaussian noise file : "<<noiseFile->errorString().toStdString()<<endl; noiseFile = NULL; noiseStream = NULL; } else { noiseStream = new QTextStream(noiseFile); } //open trajectoryLogFile if(ENABLE_TRAJECTORY_LOG == true) { trajectoryLogFile = new QFile(QString(LOGDIR) + QString(TRAJECTORY_LOG_FILENAME)); if(!trajectoryLogFile->open(QIODevice::WriteOnly | QIODevice::Append)) { cout<<"-> ERROR <- cTestDriver(): Cannot open trajectory log file noise file : "<<trajectoryLogFile->errorString().toStdString()<<endl; trajectoryLogFile = NULL; trajectoryLogStream = NULL; } else { trajectoryLogStream = new QTextStream(trajectoryLogFile); *trajectoryLogStream<<"\n ################################################### \n LOG from "<<QDateTime::currentDateTime().toString("dd.MM.yy HH:mm")<<"\n"; } } } cTestDriver::cTestDriver(int interval_msecs, double pos_x, double pos_y, double pos_z, double sigma) { trajectoryLogFile = NULL; trajectoryLogStream = NULL; position(0) = pos_x; position(1) = pos_y; position(2) = pos_z; trajFile = NULL; trajStream = NULL; timer.setInterval(interval_msecs); QObject::connect(&timer, SIGNAL(timeout()), this, SLOT(on_timer_timeout())); this->variance = sigma * sigma; //open noise file noiseFile = new QFile(GAUSSIAN_NOISE_FILE); if(!noiseFile->open(QIODevice::ReadOnly)) { cout<<"-> ERROR <- cTestDriver(): Cannot open gaussian noise file : "<<noiseFile->errorString().toStdString()<<endl; } else { noiseStream = new QTextStream(noiseFile); } //open trajectoryLogFile if(ENABLE_TRAJECTORY_LOG == true) { trajectoryLogFile = new QFile(QString(LOGDIR) + QString(TRAJECTORY_LOG_FILENAME)); if(!trajectoryLogFile->open(QIODevice::WriteOnly | QIODevice::Append)) { cout<<"-> ERROR <- cTestDriver(): Cannot open trajectory log file noise file : "<<trajectoryLogFile->errorString().toStdString()<<endl; trajectoryLogFile = NULL; trajectoryLogStream = NULL; } else { trajectoryLogStream = new QTextStream(trajectoryLogFile); } } } cTestDriver::~cTestDriver() { if(noiseFile != NULL) { noiseFile->close(); delete noiseFile; } if(noiseStream != NULL) { delete noiseStream; } if(trajFile != NULL) { trajFile->close(); delete trajFile; } if(trajStream != NULL) { delete trajStream; } } void cTestDriver::start() { timer.start(); } void cTestDriver::on_timer_timeout() { QString tmp; double factor; double wgn; double power; Eigen::Matrix<double, 3,1> beaconPos; Eigen::Matrix<double, 3, 1> vecToBeacon; if(trajStream != NULL) { if(trajStream->atEnd()) { trajStream->seek(0); //rewind if at End } tmp = trajStream->readLine(); position(0) = tmp.section(",",0,0).toDouble(); position(1) = tmp.section(",",1,1).toDouble(); position(2) = tmp.section(",",2,2).toDouble(); if(trajectoryLogStream != NULL) { *trajectoryLogStream<<QDateTime::currentMSecsSinceEpoch()<<";"<<position(0)<<";"<<position(1)<<";"<<position(2)<<"\n"; trajectoryLogStream->flush(); } } for(uint i=0; i<beaconResourceNum; i++) { beaconPos(0) = beaconResources[i].latitude; beaconPos(1) = beaconResources[i].longitude; beaconPos(2) = beaconResources[i].height; vecToBeacon = beaconPos - position; if(noiseStream->atEnd()) { noiseStream->seek(0); } tmp = noiseStream->readLine(); wgn = tmp.toDouble(); factor = sqrt(variance / GAUSSIAN_NOISE_VARIANCE); wgn = wgn * factor; power = beaconResources[i].referencePower - 10* PROPAGATION_CONSTANT * log10(vecToBeacon.norm() / beaconResources[i].referenceDistance); int p = rint(power+wgn); tmp = QString::number(p); cout<<"dbm "<<beaconResources[i].MAC.toStdString()<<" "<<tmp.toStdString()<<endl; } }
[ "uli@plabst.org" ]
uli@plabst.org
c05ebd411f59a74f16aab6e6ede55ccdeadd05a2
9575379a9696c87288252da7e9c3e8597bcfe206
/include/mumble/TLSConnection.h
a1d824bc1ed24a48f38d9e833e34b948ecfd752e
[]
no_license
dafoxia/libmumble
f434d8beced59600dc5a0158f756e73599282e6e
f1836133cd87a92f02bf134b83b05c98116023a4
refs/heads/master
2021-01-22T14:15:02.367987
2016-01-10T15:45:27
2016-01-10T15:45:27
49,373,429
0
1
null
2016-01-10T15:49:36
2016-01-10T15:49:36
null
UTF-8
C++
false
false
6,218
h
// Copyright (c) 2012 The libmumble Developers // The use of this source code is goverened by a BSD-style // license that can be found in the LICENSE-file. #ifndef MUMBLE_TLSCONNECTION_H_ #define MUMBLE_TLSCONNECTION_H_ #include <memory> #include <string> #include <vector> #include <queue> #include <functional> #include <mumble/ByteArray.h> #include <mumble/X509Certificate.h> #include <mumble/Error.h> namespace mumble { class TLSConnectionPrivate; /// TLSConnectionOptions specifies options for a TLSConnections. struct TLSConnectionOptions { /// tcp_no_delay determines whether Nagle's algorithm /// should be disabled. bool tcp_no_delay; }; /// TLSConnectionChainVerifyHandler is a handler in TLSConnection that overrides /// the TLSConnection's default X.509 verification mechanism. /// /// @parm chain The certificate chain the TLSConnectionChainVerifyHandler /// should attempt to verify. /// /// @ return The TLSConnectionChainVerifyHandler should return true if the certificate chain /// was deemed valid for the TLSConnection's purpose. In all other cases, it should /// return false. typedef std::function<bool (const std::vector<X509Certificate> &chain)> TLSConnectionChainVerifyHandler; /// TLSConnectionEstablishedHandler is a handler in TLSConnection that is called /// when a TLS connection has been fully established, signalling that the /// TLSConnection can be used to send and receive data. typedef std::function<void ()> TLSConnectionEstablishedHandler; /// TLSConnectionReadHandler is a handler in TLSConnection that is called whenever /// new data is received from the remote side of the TLSConnection. typedef std::function<void (const ByteArray &buf)> TLSConnectionReadHandler; /// TLSConnectionErrorHandler is a handler in TLSConnection that is called whenever /// an error occurs in the TLSconnection. When the handler is called, the TLSConnection /// is guaranteed to be fully disconnected. typedef std::function<void (const Error &err)> TLSConnectionErrorHandler; /// TLSConnectionDisconntHandler is a handler in TLSConnection that is called when either /// side of the TLSConnection closes the connection. /// /// @param local Local determines whether it was the local side that closed /// the connection. typedef std::function<void (bool local)> TLSConnectionDisconnectHandler; /// TLSConnection implements a TLS client connection. class TLSConnection { public: /// Constructs a new TLSConnection. TLSConnection(); /// Destroys a TLSConnection. ~TLSConnection(); /// Connect initializes a connection to a remote host. /// /// @param ipaddr The IP adress to connect to. /// @param port The port number to connect to. /// @param opts Options for the TLS connection. May be null, /// in which case the default options are used. /// /// @return Returns an Error object representing whether /// or not an Error happened during connection /// initialization. Error Connect(const std::string &ipaddr, int port, TLSConnectionOptions *opts); /// Disconnect forces the connection to shut down. void Disconnect(); /// Write writes the contents of the ByteArray to the TLS connection. /// /// @param buf The ByteArray to write to the TLSConnection. void Write(const ByteArray &buf); /// SetChainVerifyHandler sets an override handler for the TLSConnection's /// certificate chain verification mechanism. By default, TLSConnection will /// invoke the system's own X.509 certificate chain verifier, but if this /// handler is registered, the verification can be entirely custom. /// /// One use of this handler is to allow clients to store fingerprints of /// certificates for servers they frequently visit, if these server's chains /// are self-signed. This allows implementors to not be forced to show /// warnings messages for self-signed chains, and instead implement a more /// friendly flow for self-signed certificates. /// /// @param fn The TLSConnectionChainVerifyHandler to register. /// /// @return Returns a reference to the TLSConnection that this method /// was called on. This makes it possible to chain calls to /// the various handler setters. TLSConnection& SetChainVerifyHandler(TLSConnectionChainVerifyHandler fn); /// SetEstablishedHandler sets the TLSConnection's *established handler* /// which will be called once the connection is ready to be read from and written /// to. /// /// @param fn The TLSConnectionEstablishedHandler to register. /// /// @return Returns a reference to the TLSConnection that this method /// was called on. This makes it possible to chain calls to /// the various handler setters. TLSConnection& SetEstablishedHandler(TLSConnectionEstablishedHandler fn); /// SetReadHandler sets the TLSConnection's *read handler* which will be /// called once the TLSConnection has new data for the client. /// /// @param fn The TLSConnectionReadHandler to register. /// /// @return Returns a reference to the TLSConnection that this method /// was called on. This makes it possible to chain calls to /// the various handler setters. TLSConnection& SetReadHandler(TLSConnectionReadHandler fn); /// SetErrorHandler sets the TLSConnection's *error handler* which will be /// called if an error happens in the TLSConnection. Whenever this function /// is invoked, the connection is also guaranteed to be disconnected. That is, /// it is valid to call Connect on it again to attempt to re-establish the /// connection. TLSConnection& SetErrorHandler(TLSConnectionErrorHandler fn); /// SetDisconnectHandler sets the TLSConnection's *disconnect handler* which /// will be called if either the local or remote side of the TLSConnection /// close the connection. TLSConnection& SetDisconnectHandler(TLSConnectionDisconnectHandler fn); private: friend class TLSConnectionPrivate; std::unique_ptr<TLSConnectionPrivate> priv_; }; } #endif
[ "mikkel@krautz.dk" ]
mikkel@krautz.dk
b03cab5f3acea01a7de321c25483aa0180b5fc7c
0e538d58825dc3862556b5c68227a32b01db6ebf
/cpp/datastruct/linkedlist.cpp
8eda443fcffb0d1b0a3f5489125904f82867de4a
[]
no_license
nghiattran/playground
ac6f1e724153df4b84b7e1221765dd60638478fd
6dfa0b9660ece8d51d439d26afc9d338b1547823
refs/heads/master
2021-01-12T09:21:03.068081
2017-08-06T22:36:29
2017-08-06T22:36:29
76,141,798
0
0
null
null
null
null
UTF-8
C++
false
false
2,198
cpp
#include <stdio.h> struct Node { Node* next; int value; Node(int value) { this->value = value; } }; struct LinkedList { Node* head; LinkedList() {} LinkedList(Node* node) { this->head = node; } ~LinkedList() { if (!this->head) { return; } Node* tmp = this->head; Node* previousNode = this->head; while(tmp) { previousNode = tmp; tmp = tmp->next; printf("delete %d\n", previousNode->value); delete previousNode; } } void addNode(Node* node) { if (!this->head) { this->head = node; return; } Node* tmp = this->head; if (node->value < tmp->value) { node->next = tmp; this->head = node; } else { while(tmp->next && tmp->next->value < node->value) { tmp = tmp->next; } if (tmp->next) { node->next = tmp->next; } tmp->next = node; } } void deleteNode(Node* node) { if (!this->head) { return; } Node* tmp = this->head; if (node->value == tmp->value) { this->head = this->head->next; } else { while(tmp->next) { if (tmp->next->value == node->value) { Node* foundNode = tmp->next; tmp->next = tmp->next->next; delete foundNode; return; } tmp = tmp->next; } } } void print() { Node* tmp = this->head; printf("Print LinkedList\n"); while(tmp) { printf("%d\n", tmp->value); tmp = tmp->next; } printf("\n"); } }; int main(int argc, char const *argv[]) { LinkedList* list = new LinkedList(); Node* node1 = new Node(4); Node* node2 = new Node(5); Node* node3 = new Node(1); Node* node4 = new Node(26); Node* node5 = new Node(15); Node* node6 = new Node(65); Node* node7 = new Node(8); Node* node8 = new Node(102); list->addNode(node1); list->addNode(node2); list->addNode(node3); list->addNode(node4); list->addNode(node5); list->addNode(node6); list->addNode(node7); list->addNode(node8); list->print(); list->deleteNode(node3); list->deleteNode(node6); list->print(); delete list; return 0; }
[ "nghiattran3@gmail.com" ]
nghiattran3@gmail.com
a4ce5ad3ca2ce702ef1e1d84f144f2eac64fdeb3
d904b281243ac638ee7c7df7f358e0061b51a617
/include/obj/BSNiAlphaPropertyTestRefController.h
bf234c7732850e664f3e6b4a55f0c4843e4f929a
[]
no_license
Alecu100/niflib
4a74ea6863c2983e851445061e617129d774f2e0
968af5a2de5e4136037cd798bc754d75d923688d
refs/heads/master
2020-12-26T03:11:56.896553
2017-05-07T13:29:28
2017-05-07T13:29:28
63,884,929
0
1
null
2016-07-21T16:23:52
2016-07-21T16:23:50
null
UTF-8
C++
false
false
3,177
h
/* Copyright (c) 2006, NIF File Format Library and Tools All rights reserved. Please see niflib.h for license. */ //-----------------------------------NOTICE----------------------------------// // Some of this file is automatically filled in by a Python script. Only // // add custom code in the designated areas or it will be overwritten during // // the next update. // //-----------------------------------NOTICE----------------------------------// #ifndef _BSNIALPHAPROPERTYTESTREFCONTROLLER_H_ #define _BSNIALPHAPROPERTYTESTREFCONTROLLER_H_ //--BEGIN FILE HEAD CUSTOM CODE--// //--END CUSTOM CODE--// #include "NiAlphaController.h" namespace Niflib { class BSNiAlphaPropertyTestRefController; typedef Ref<BSNiAlphaPropertyTestRefController> BSNiAlphaPropertyTestRefControllerRef; /*! Unkown */ class BSNiAlphaPropertyTestRefController : public NiAlphaController { public: /*! Constructor */ NIFLIB_API BSNiAlphaPropertyTestRefController(); /*! Destructor */ NIFLIB_API virtual ~BSNiAlphaPropertyTestRefController(); /*! * A constant value which uniquly identifies objects of this type. */ NIFLIB_API static const Type TYPE; /*! * A factory function used during file reading to create an instance of this type of object. * \return A pointer to a newly allocated instance of this type of object. */ NIFLIB_API static NiObject * Create(); /*! * Summarizes the information contained in this object in English. * \param[in] verbose Determines whether or not detailed information about large areas of data will be printed out. * \return A string containing a summary of the information within the object in English. This is the function that Niflyze calls to generate its analysis, so the output is the same. */ NIFLIB_API virtual string asString( bool verbose = false ) const; /*! * Used to determine the type of a particular instance of this object. * \return The type constant for the actual type of the object. */ NIFLIB_API virtual const Type & GetType() const; //--This object has no eligable attributes. No example implementation generated--// //--BEGIN MISC CUSTOM CODE--// //--END CUSTOM CODE--// public: /*! NIFLIB_HIDDEN function. For internal use only. */ NIFLIB_HIDDEN virtual void Read( istream& in, list<unsigned int> & link_stack, const NifInfo & info ); /*! NIFLIB_HIDDEN function. For internal use only. */ NIFLIB_HIDDEN virtual void Write( ostream& out, const map<NiObjectRef,unsigned int> & link_map, list<NiObject *> & missing_link_stack, const NifInfo & info ) const; /*! NIFLIB_HIDDEN function. For internal use only. */ NIFLIB_HIDDEN virtual void FixLinks( const map<unsigned int,NiObjectRef> & objects, list<unsigned int> & link_stack, list<NiObjectRef> & missing_link_stack, const NifInfo & info ); /*! NIFLIB_HIDDEN function. For internal use only. */ NIFLIB_HIDDEN virtual list<NiObjectRef> GetRefs() const; /*! NIFLIB_HIDDEN function. For internal use only. */ NIFLIB_HIDDEN virtual list<NiObject *> GetPtrs() const; }; //--BEGIN FILE FOOT CUSTOM CODE--// //--END CUSTOM CODE--// } //End Niflib namespace #endif
[ "TheHologramMan@hotmail.com" ]
TheHologramMan@hotmail.com
1f7e40054c7e8abb3233e040474e6704501be22a
a1a0518781ec8bb41acb853850e115005bdc7c8c
/LeetCode/1167. Minimum Cost to Connect Sticks.cpp
b4f9bb67c7e26cfa9f6bdcfd5ae75ce083f3bf3a
[]
no_license
JJungs-lee/problem-solving
e71ccbcab58b6c2444a4b343a138a3082ed09c0c
aa61f2311a7a93fbcb87d2356d15188ea729ee7c
refs/heads/master
2023-09-03T16:48:31.640762
2023-08-31T09:05:39
2023-08-31T09:05:39
106,645,163
3
0
null
null
null
null
UTF-8
C++
false
false
360
cpp
class Solution { public: int connectSticks(vector<int>& sticks) { priority_queue<int, vector<int>, greater<int>> pq; for (int n : sticks) pq.push(n); int res = 0; while (pq.size() > 1) { int first = pq.top(); pq.pop(); int second = pq.top(); pq.pop(); res += (first + second); pq.push(first + second); } return res; } };
[ "loveljhs2@gmail.com" ]
loveljhs2@gmail.com