]>
git.saurik.com Git - veency.git/blob - SpringBoardAccess.h
2 * Copyright (C) 2009 by Matthias Ringwald
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the copyright holders nor the names of
14 * contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY MATTHIAS RINGWALD AND CONTRIBUTORS
18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
20 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
21 * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
24 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
25 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
27 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 * Allows to add and remove images to/from status bar
37 * The images must be installed in:
38 * /System/Library/CoreServices/SpringBoard.app/
40 * Only the base name is required, e.g., Bluetooth instead of Default_Bluetooth.png
41 * Created by Matthias Ringwald on 9/20/09.
46 #define SBA_MessagePortName "SpringBoardAccess"
49 #define SBAC_addStatusBarImage 1
50 #define SBAC_removeStatusBarImage 2
51 #define SBAC_getBluetoothEnabled 3
52 #define SBAC_setBluetoothEnabled 4
55 * Enables named status bar icon in Springboard
56 * @returns CFMessagePortSendRequest error: 0 = ok
58 int SBA_addStatusBarImage(char *name
);
61 * Disables named status bar icon in Springboard
62 * @returns CFMessagePortSendRequest error: 0 = ok
64 int SBA_removeStatusBarImage(char *name
);
67 * Get Bluetoot enabled property
68 * @returns < 0 error: 0 = OFF, 1 = ON
70 int SBA_getBluetoothEnabled();
73 * Set Bluetooth enable property: 0 for OFF, otherwise on
74 * @returns CFMessagePortSendRequest error: 0 = ok
76 int SBA_setBluetoothEnabled(int on
);
79 * Tests if SpringBoardAccess server is available