summaryrefslogtreecommitdiffstats
path: root/README.md
blob: 5d72482cd312b0fda294c7a917166df41d531733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# Bluetooth PBAP Service

## Overview

Bluetooth PBAP service reports respective vCard phonebook data from BlueZ via communication with PBAP profile

## Verbs

| Name        | Description                               | JSON Response                                      |
|-------------|-------------------------------------------|----------------------------------------------------|
| subscribe   | subscribe to Bluetooth PBAP events        | *Request:* {"value": "status"}                     |
| unsubscribe | unsubscribe to Bluetooth PBAP events      | *Request:* {"value": "status"}                     |
| contacts    | return all contacts from connected device | see **contacts verb section**                      |
| entry       | return vCard data from handle             | see **entry verb section**                         |
| history     | return call history list                  | see **history verb section**                       |
| search      | search for respective vCard handle        | see **search verb section**                        |
| status      | current device connection status          | same response as noted in **status event section** |

### contacts Verb

Returns all vCards that are accessible from respective connected device in concatenated output:

<pre>

"response": {
    "vcards": [
     {
        "fn": "Art McGee",
        "photo": {
            "mimetype": "image/jpeg",
            "data": 'BASE64 IMAGE BLOB HERE'
        },
        "telephone": [
          {
            "CELL": "+13305551212"
          }
        ]
     },
     ...
  ]
}
</pre>

### search Verb

Example of a request for vCard search using **number** parameter (i.e. *{"number":"+15035551212"}*) results:

<pre>
"response": {
    "results": [
       {
          "handle": "27e.vcf",
          "name": "Art McGee"
       }
    ]
}                                       },
</pre>

### entry Verb

Client must pass one of the following values to the **list** parameter in request:

| Value         | Description                                      |
|---------------|--------------------------------------------------|
| ich           | Incoming calls                                   |
| och           | Outgoing calls                                   |
| mch           | Missed calls                                     |
| cch           | Combined calls (e.g. incoming, outgoing, missed) |
| pb            | Phonebook (typically selected)                   |

Also there is a **handle** parameter that must be in form of vCard path (e.g. 27e.vcf).

Response is the same as noted in the **contacts** verb

### history Verb

Client must pass one of the following values to the list parameter in request:

| Value         | Description                                      |
|---------------|--------------------------------------------------|
| ich           | Incoming calls                                   |
| och           | Outgoing calls                                   |
| mch           | Missed calls                                     |
| cch           | Combined calls (e.g. incoming, outgoing, missed) |

Sample request for a combined list (i.e. *{"list":"cch"}*) and its respective response:

<pre>
"response": {
    "vcards": [
      {
        "fn": "Art McGee"
        "type": "DIALED",
        "timestamp": "20190509T193422",
        "telephone": "+13305551212"
      },
      {
        "fn": "UNKNOWN CALLER",
        "type": "MISSED",
        "timestamp": "20190426T014109",
        "telephone": "+15035551212"
      },
      {
        "fn": "Satoshi Nakamoto"
        "type": "RECEIVED",
        "timestamp": "20190421T090123",
        "telephone": "+13605551212"
      }
   ]
}
</pre>

## Events

Respective binding only outputs one event that signals if an PBAP capable device is connected

### status Event

Sample of a Bluetooth PBAP status event:

<pre>
{
  "connected": true
}
</pre>