mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-24 22:43:35 +00:00
tried to set Bluetooth Status Bar Icon from command daemon, but does not work - deferred for now
This commit is contained in:
parent
3a4b7e1270
commit
5390b7fce0
12
TODO.txt
12
TODO.txt
@ -3,18 +3,20 @@
|
||||
Last milestone reached: Restart client app without restarting BTdaemon possible
|
||||
|
||||
NEXT:
|
||||
- iPhone status icon support
|
||||
- set BTstack SpringBoard icon
|
||||
- client/server part using unix domain sockets (faster than TCP/IP)
|
||||
- autostart by launchd
|
||||
- Unix Socket example Mac: http://lists.apple.com/archives/Macnetworkprog/2007/Oct/msg00078.html
|
||||
- Mac OS X book: 472-485
|
||||
- check with launchd, too?
|
||||
- launch.h exists in 3.0 SDK, but also in inofficial headers before
|
||||
- launch.h exists in 3.0 SDK, but also in inofficial headers before
|
||||
- socket handling using kevent
|
||||
- exists too.
|
||||
- too complicated
|
||||
- exists too.
|
||||
- too complicated
|
||||
- stop BTdaemon after X minutes idle
|
||||
- iPhone status icon support
|
||||
- set BTstack SpringBoard icon from background deamon
|
||||
- possible without MobileSubstrate
|
||||
- MobileSubstrate used by veency
|
||||
- extend hci_logger to write to /var/hci_dump.txt as text
|
||||
- better deal with Apple stack
|
||||
- detect that it is running
|
||||
|
13
configure.in
13
configure.in
@ -72,14 +72,15 @@ if test "x$target" = xiphone; then
|
||||
echo "Cross-compiling for iPhone/iPod touch using Apple's iPhone SDK"
|
||||
echo "iPhone IP for install-iphone target: $IPHONE_IP"
|
||||
CC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin9-gcc-$GCC_VERSION"
|
||||
OBJC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin9-gcc-$GCC_VERSION"
|
||||
OBJC="$DEVELOPER_PATH/usr/bin/arm-apple-darwin9-g++-$GCC_VERSION"
|
||||
CFLAGS="$CFLAGS -g"
|
||||
CFLAGS="$CFLAGS -I$SDK_PATH/usr/include"
|
||||
CFLAGS="$CFLAGS -I$SDK_PATH/usr/lib/gcc/arm-apple-darwin9/$GCC_VERSION/include"
|
||||
CFLAGS="$CFLAGS -F$SDK_PATH/System/Library/Frameworks"
|
||||
LDFLAGS="$LDFLAGS -L$SDK_PATH/usr/lib -framework CoreFoundation"
|
||||
CPPFLAGS="$CPPFLAGS -I$SDK_PATH/usr/include"
|
||||
CPPFLAGS="$CPPFLAGS -I$SDK_PATH/usr/lib/gcc/arm-apple-darwin9/$GCC_VERSION/include"
|
||||
CPPFLAGS="$CPPFLAGS -F$SDK_PATH/System/Library/Frameworks"
|
||||
LDFLAGS="$LDFLAGS -F$SDK_PATH/System/Library/Frameworks"
|
||||
LDFLAGS="$LDFLAGS -L$SDK_PATH/usr/lib -framework CoreFoundation -framework UIKit"
|
||||
LDFLAGS="$LDFLAGS -L$SDK_PATH/System/Library/Frameworks/IOKit.framework/Versions/A"
|
||||
LDFLAGS="$LDFLAGS -lIOkit"
|
||||
LDFLAGS="$LDFLAGS -lIOkit -lobjc"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(Don't know how to compile without Apple's iPhone SDK, sorry.)
|
||||
|
@ -63,6 +63,10 @@
|
||||
9C46FC380FA906F700ABEF05 /* hci_transport.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = hci_transport.h; path = src/hci_transport.h; sourceTree = "<group>"; };
|
||||
9C6459DE1037554B0081A00B /* platform_iphone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform_iphone.h; path = src/platform_iphone.h; sourceTree = "<group>"; };
|
||||
9C6459DF1037554B0081A00B /* platform_iphone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = platform_iphone.m; path = src/platform_iphone.m; sourceTree = "<group>"; };
|
||||
9C78A04A103C6734003B2950 /* Default_BTstack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default_BTstack.png; path = resources/Default_BTstack.png; sourceTree = "<group>"; };
|
||||
9C78A04B103C6734003B2950 /* Default_BTstackActive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default_BTstackActive.png; path = resources/Default_BTstackActive.png; sourceTree = "<group>"; };
|
||||
9C78A04C103C6734003B2950 /* FSO_BTstack.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FSO_BTstack.png; path = resources/FSO_BTstack.png; sourceTree = "<group>"; };
|
||||
9C78A04D103C6734003B2950 /* FSO_BTstackActive.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = FSO_BTstackActive.png; path = resources/FSO_BTstackActive.png; sourceTree = "<group>"; };
|
||||
9C7B5ABE100BD3340065D87E /* linked_list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = linked_list.h; path = src/linked_list.h; sourceTree = "<group>"; };
|
||||
9C7B5ABF100BD3340065D87E /* linked_list.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = linked_list.c; path = src/linked_list.c; sourceTree = "<group>"; };
|
||||
9C7B5B7E100D04450065D87E /* test.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = test.c; path = example/test.c; sourceTree = "<group>"; };
|
||||
@ -103,6 +107,7 @@
|
||||
08FB7794FE84155DC02AAC07 /* project */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9C78A049103C671D003B2950 /* Resources */,
|
||||
9C7B5B81100D04520065D87E /* Example */,
|
||||
08FB7795FE84155DC02AAC07 /* Source */,
|
||||
C6A0FF2B0290797F04C91782 /* Documentation */,
|
||||
@ -161,6 +166,17 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9C78A049103C671D003B2950 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9C78A04A103C6734003B2950 /* Default_BTstack.png */,
|
||||
9C78A04B103C6734003B2950 /* Default_BTstackActive.png */,
|
||||
9C78A04C103C6734003B2950 /* FSO_BTstack.png */,
|
||||
9C78A04D103C6734003B2950 /* FSO_BTstackActive.png */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9C7B5B81100D04520065D87E /* Example */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
|
@ -14,7 +14,7 @@ BTdaemon_SOURCES = \
|
||||
$(usb_support) \
|
||||
l2cap.c \
|
||||
l2cap_signaling.c \
|
||||
platform_iphone \
|
||||
platform_iphone.m \
|
||||
linked_list.c \
|
||||
run_loop.c \
|
||||
socket_connection.c \
|
||||
|
@ -203,6 +203,8 @@ int main (int argc, const char * argv[]){
|
||||
|
||||
// handle CTRL-c
|
||||
signal(SIGINT, daemon_sigint_handler);
|
||||
|
||||
bluetooth_status_handler(BLUETOOTH_ACTIVE);
|
||||
|
||||
// go!
|
||||
run_loop_execute();
|
||||
|
@ -6,8 +6,26 @@
|
||||
|
||||
#import "platform_iphone.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
#endif
|
||||
|
||||
@interface UIApplication (privateStatusBarIconAPI)
|
||||
- (void)addStatusBarImageNamed:(id)fp8 removeOnAbnormalExit:(BOOL)fp12;
|
||||
- (void)addStatusBarImageNamed:(id)fp8;
|
||||
- (void)removeStatusBarImageNamed:(id)fp8;
|
||||
// iPhoneOS >= 2.2
|
||||
- (void)addStatusBarImageNamed:(id)fp8 removeOnExit:(BOOL)fp12;
|
||||
@end
|
||||
|
||||
// update SpringBoard icon
|
||||
void platform_iphone_status_handler(BLUETOOTH_STATE state){
|
||||
printf("iphone state %u\n", state);
|
||||
UIApplication *theApp = [UIApplication sharedApplication];
|
||||
printf("the app %u\n", (int) theApp);
|
||||
[theApp addStatusBarImageNamed:@"BluetoothActive"];
|
||||
|
||||
switch (state) {
|
||||
case BLUETOOTH_OFF:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user