📄 main.h
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Limited 2006-2009
Part of BlueLab 4.1-Release
DESCRIPTION
FILE
main.h
*/
#ifndef APPLICATION_MAIN_H
#define APPLICATION_MAIN_H
#include <message.h>
#include <source.h>
#include <pbaps.h>
#include <pbap_common.h>
#include <file.h>
#include <stream.h>
#include <source.h>
#include "state.h"
/* Minimum buffer size to allow */
#define PBAPS_MIN_BUFFER_SIZE 60
/* Buffer size to try and allocate first */
#define PBAPS_BUFFER_START_SIZE 0x6c
/* PBAP Server State */
typedef struct
{
/* PBAP Server Library instance */
PBAPS *pbaps;
/* Maximum packet size */
uint16 pktSize;
} pbapStateData;
/* Folder state data */
typedef struct
{
/* Current folder */
pbap_phone_book current;
/* Supported Phonebooks bit field */
unsigned int supBooks:6;
/* Send current entry. Used when there is not enough space for the current entry in the data packet */
unsigned int sentCurrent:1;
/* Got all entries, but footer not sent yet */
unsigned int sendFooter:1;
/* Amount of the vCard Listing header still to send */
uint16 listLeft;
} folderStateData;
/* Phonebook access state data */
typedef struct
{
/* Is there an open phonebook? */
unsigned int open:1;
/* Examined and used the first entry */
unsigned int usedFirst:1;
/* Source of the open phonebook */
Source bookSrc;
/* Current Entry */
uint16 entry;
} phonebookStateData;
/* Phonebook search Data */
typedef struct
{
pbap_search_values srchAttr;
uint8 *srchVal;
uint16 maxList;
} phonebookSearchData;
/* Buffer structure */
typedef struct
{
uint8 *buffer;
uint16 sizeBuffer;
uint16 freeSpace;
uint16 nextPos;
uint16 used;
} phonebookBuffer;
/* vCard Generation data */
typedef struct
{
pbap_format_values format;
uint16 maxList;
unsigned int sentHeader:1;
unsigned int sentFooter:1;
unsigned int sentName:1;
unsigned int sentPhone:1;
unsigned int sentMobile:1;
unsigned int sentBusiness:1;
} phonebookvCardGenData;
/* Main task structure */
typedef struct
{
TaskData task;
app_states appState;
pbapStateData pbapData;
folderStateData folderData;
phonebookStateData phonebookData;
phonebookBuffer buffer;
phonebookSearchData srchData;
phonebookvCardGenData vCardData;
} applicationTaskData;
#endif /* APPLICATION_MAIN_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -