2006-08-23 06:44:55 +02:00
|
|
|
/* -*-mode: C; fill-column: 77; c-basic-offset: 4; -*- */
|
|
|
|
/*
|
|
|
|
* Copyright 2006 by Eric House (xwords@eehouse.org). All rights reserved.
|
|
|
|
*
|
|
|
|
* 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, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _PALMBT_H_
|
|
|
|
#define _PALMBT_H_
|
|
|
|
|
2006-08-26 23:12:10 +02:00
|
|
|
#ifdef XWFEATURE_BLUETOOTH
|
2006-08-23 06:44:55 +02:00
|
|
|
|
|
|
|
#include "comms.h"
|
|
|
|
#include "palmmain.h"
|
|
|
|
|
2006-09-08 09:06:21 +02:00
|
|
|
/**
|
|
|
|
* palm_bt_appendWaitTicks
|
|
|
|
* reduce waitTicks if have work to do
|
|
|
|
*/
|
|
|
|
void palm_bt_amendWaitTicks( PalmAppGlobals* globals, Int32* result );
|
|
|
|
XP_Bool palm_bt_doWork( PalmAppGlobals* globals );
|
|
|
|
|
2006-08-23 06:44:55 +02:00
|
|
|
typedef void (*DataCb)( PalmAppGlobals* globals,
|
2006-09-14 03:38:09 +02:00
|
|
|
const CommsAddrRec* fromAddr,
|
2006-08-23 06:44:55 +02:00
|
|
|
const XP_U8* data, XP_U16 len );
|
|
|
|
|
2006-09-08 09:06:21 +02:00
|
|
|
Err palm_bt_init( PalmAppGlobals* globals, DataCb cb );
|
2006-08-23 06:44:55 +02:00
|
|
|
void palm_bt_close( PalmAppGlobals* globals );
|
|
|
|
|
2006-09-08 09:06:21 +02:00
|
|
|
void palm_bt_addrString( PalmAppGlobals* globals, XP_BtAddr* btAddr,
|
|
|
|
XP_BtAddrStr* str );
|
|
|
|
|
2006-08-26 23:12:10 +02:00
|
|
|
XP_S16 palm_bt_send( const XP_U8* buf, XP_U16 len, const CommsAddrRec* addr,
|
2006-09-08 09:06:21 +02:00
|
|
|
DataCb cb, PalmAppGlobals* globals );
|
2006-08-26 23:12:10 +02:00
|
|
|
|
|
|
|
XP_Bool palm_bt_browse_device( PalmAppGlobals* globals, XP_BtAddr* btAddr,
|
|
|
|
XP_UCHAR* out,XP_U16 len );
|
|
|
|
|
|
|
|
#endif /* XWFEATURE_BLUETOOTH */
|
2006-08-23 06:44:55 +02:00
|
|
|
#endif
|