• 大小: 169KB
    文件类型: .zip
    金币: 2
    下载: 0 次
    发布日期: 2024-02-01
  • 语言: C/C++
  • 标签:

资源简介

BlueSoleil_SDK_2.0.5.zip C++实现的蓝牙应用程序框架

资源截图

代码片段和文件信息

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*
* Copyright (c) 1999-2005 IVT Corporation
*
* All rights reserved.
*
---------------------------------------------------------------------------*/
 
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Module Name:
    av_tst.c
Abstract:
                                     
Revision History:
2007-3-20   Huyi Created

---------------------------------------------------------------------------*/
#include “sdk_tst.h“
#include “profiles_tst.h“

/* current remote audio device handle */
static BTDEVHDL s_currAudioRmtDevHdl = BTSDK_INVALID_HANDLE;
/* current remote audio device AV service handle */
static BTSHCHDL s_currAudioSvcHdl = BTSDK_INVALID_HANDLE;
/* current remote audio device connection handle */
static BTCONNHDL s_currAudioConnHdl = BTSDK_INVALID_HANDLE;

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Description:
This function is to select expected remote device. 
Arguments:
Return:
void 
---------------------------------------------------------------------------*/
void TestSelectRmtAudioDev()
{
//s_currAudioRmtDevHdl = SelectRemoteDevice(BTSDK_DEVCLS_MASK(BTSDK_AV_HEADSET));
s_currAudioRmtDevHdl = SelectRemoteDevice(0);
if (BTSDK_INVALID_HANDLE == s_currAudioRmtDevHdl)
{
printf(“Please make sure that the expected device is in discoverable state and search again.\n“);
}
else
{
printf(“Select remote audio device successfully.\n“);
}
}

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Description:
This function is to get service handle according to given device handle. 
Arguments:
Return:
void 
---------------------------------------------------------------------------*/
void TestSelectAudioSvc()
{
s_currAudioSvcHdl = SelectRemoteService(s_currAudioRmtDevHdl);
if (BTSDK_INVALID_HANDLE == s_currAudioSvcHdl)
{
printf(“Can‘t get expected service handle.\n“);
}
else
{
printf(“Select remote audio device‘s service successfully.\n“);
}
}

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Description:
This function is to connect specified device‘s service with it‘s service handle.
Arguments:
Return:
void 
---------------------------------------------------------------------------*/
void TestConnectAudioSvc()
{
BTINT32 ulRet = BTSDK_FALSE;
ulRet = Btsdk_Connect(s_currAudioSvcHdl 0 &s_currAudioConnHdl);
if (BTSDK_OK != ulRet)
{
printf(“Please make sure that the expected device is powered on and connectable.\n“);
return;
}
if (BTSDK_INVALID_HANDLE != s_currAudioConnHdl)
{
GetConnectionInfo(s_currAudioRmtDevHdl);
}
return;
}

/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Description:
This function is a callback function for AVRCP events
Arguments:
event: [in] AVRCP event
param: [in] profil

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2009-12-12 07:48  BlueSoleil_SDK_2.0.5\
     目录           0  2009-12-12 07:47  BlueSoleil_SDK_2.0.5\Bin\
     文件      113326  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\Bin\BsSDK.lib
     目录           0  2009-12-12 07:47  BlueSoleil_SDK_2.0.5\SDKheaders\
     目录           0  2009-12-12 07:47  BlueSoleil_SDK_2.0.5\SDKheaders\include\
     文件       17847  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKheaders\include\Btsdk_API.h
     文件       43848  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKheaders\include\Btsdk_Macro.h
     文件       13552  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKheaders\include\Btsdk_Stru.h
     文件         715  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKheaders\include\Btsdk_ui.h
     目录           0  2009-12-12 07:47  BlueSoleil_SDK_2.0.5\SDKSample\
     文件        7678  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\av_tst.c
     文件        3369  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\baseTSD.H
     文件       22484  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\ftpopp_tst.c
     文件       26522  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\hfp_tst.c
     文件        5990  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\hid_tst.c
     文件        8701  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\loc_dev_tst.c
     文件        5189  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\pan_tst.c
     文件        3954  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\profiles_tst.c
     文件        1763  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\profiles_tst.h
     文件        6923  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\report.c
     文件       22348  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\rmt_dev_tst.c
     文件        5027  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\rmt_svc_tst.c
     文件        5356  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\sdksample.dsp
     文件         672  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\sdksample.dsw
     文件        7067  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\sdk_tst.c
     文件        2126  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\sdk_tst.h
     文件        5448  2009-12-09 10:06  BlueSoleil_SDK_2.0.5\SDKSample\spp_tst.c
     文件      133411  2009-12-09 10:17  BlueSoleil_SDK_2.0.5\SDKsample_Instruction.pdf

评论

共有 条评论

相关资源