Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp File Reference

(87d6241b9927eabd9118ef20ace3553d48cab0cc)

#include <QtCore/QByteArray>
#include <QtCore/QDebug>
#include <QtCore/QUrl>
#include <stdio.h>
#include <string>
#include <bluetooth/bluetooth.h>
#include <bluetooth/sdp.h>
#include <bluetooth/sdp_lib.h>
+ Include dependency graph for main.cpp:

Go to the source code of this file.

Macros

#define RETURN_SUCCESS   0
 
#define RETURN_USAGE   1
 
#define RETURN_INVALPARAM   2
 
#define RETURN_SDP_ERROR   3
 
#define BUFFER_SIZE   1024
 

Functions

void usage ()
 
static void parseAttributeValues (sdp_data_t *data, int indentation, QByteArray &xmlOutput)
 
static void parseAttribute (void *value, void *extraData)
 
QByteArray parseSdpRecord (sdp_record_t *record)
 
int main (int argc, char **argv)
 [0]
 

Macro Definition Documentation

◆ BUFFER_SIZE

#define BUFFER_SIZE   1024

Definition at line 31 of file main.cpp.

Referenced by parseAttribute(), and parseAttributeValues().

◆ RETURN_INVALPARAM

#define RETURN_INVALPARAM   2

Definition at line 15 of file main.cpp.

Referenced by main().

◆ RETURN_SDP_ERROR

#define RETURN_SDP_ERROR   3

Definition at line 16 of file main.cpp.

Referenced by main().

◆ RETURN_SUCCESS

#define RETURN_SUCCESS   0

Definition at line 13 of file main.cpp.

Referenced by main().

◆ RETURN_USAGE

#define RETURN_USAGE   1

Definition at line 14 of file main.cpp.

Referenced by main().

Function Documentation

◆ main()

int main ( int argc,
char ** argv )

[0]

[0]

[0]

[6]

[0]

[0]

[1]

[1]

[2]

[2]

[3]

[3]

[0]

[0]

[1]

[1]

[0]

[0]

[0]

[0]

Definition at line 231 of file main.cpp.

References QByteArray::constData(), i, QByteArray::isEmpty(), iter, parseSdpRecord(), record(), RETURN_INVALPARAM, RETURN_SDP_ERROR, RETURN_SUCCESS, RETURN_USAGE, QByteArray::toBase64(), usage(), and xml.

+ Here is the call graph for this function:

◆ parseAttribute()

static void parseAttribute ( void * value,
void * extraData )
static

Definition at line 199 of file main.cpp.

References BUFFER_SIZE, parseAttributeValues(), and qsnprintf().

Referenced by parseSdpRecord().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseAttributeValues()

static void parseAttributeValues ( sdp_data_t * data,
int indentation,
QByteArray & xmlOutput )
static

Definition at line 33 of file main.cpp.

References QString::append(), BUFFER_SIZE, QUrl::fromEncoded(), QByteArray::fromRawData(), i, QString::indexOf(), parseAttributeValues(), qsnprintf(), qstrnlen(), QString::replace(), QByteArray::replace(), QString::resize(), QString::size(), text, QUrl::toEncoded(), and url.

Referenced by parseAttribute(), and parseAttributeValues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseSdpRecord()

QByteArray parseSdpRecord ( sdp_record_t * record)

Definition at line 215 of file main.cpp.

References QByteArray::append(), parseAttribute(), QByteArray(), and record().

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ usage()

void usage ( )

Definition at line 18 of file main.cpp.

Referenced by main().

+ Here is the caller graph for this function: