linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 01/12] android/handsfree: Define proper type for device structure
@ 2014-10-08 10:15 Szymon Janc
  2014-10-08 10:15 ` [PATCH v2 02/12] android/handsfree: Make init, cleanup and state functions static less Szymon Janc
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Szymon Janc @ 2014-10-08 10:15 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Szymon Janc

---
 android/handsfree.c | 36 +++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/android/handsfree.c b/android/handsfree.c
index a815d3b..0b82223 100644
--- a/android/handsfree.c
+++ b/android/handsfree.c
@@ -110,22 +110,7 @@ struct hfp_codec {
 	bool remote_supported;
 };
 
-static const struct indicator inds_defaults[] = {
-		{ "service",   0, 1, 0, false, true },
-		{ "call",      0, 1, 0, true, true },
-		{ "callsetup", 0, 3, 0, true, true },
-		{ "callheld",  0, 2, 0, true, true },
-		{ "signal",    0, 5, 0, false, true },
-		{ "roam",      0, 1, 0, false, true },
-		{ "battchg",   0, 5, 0, false, true },
-};
-
-static const struct hfp_codec codecs_defaults[] = {
-	{ CODEC_ID_CVSD, true, false},
-	{ CODEC_ID_MSBC, false, false},
-};
-
-static struct {
+struct hf_device {
 	bdaddr_t bdaddr;
 	uint8_t state;
 	uint8_t audio_state;
@@ -152,7 +137,24 @@ static struct {
 
 	GIOChannel *sco;
 	guint sco_watch;
-} device;
+};
+
+static const struct indicator inds_defaults[] = {
+		{ "service",   0, 1, 0, false, true },
+		{ "call",      0, 1, 0, true, true },
+		{ "callsetup", 0, 3, 0, true, true },
+		{ "callheld",  0, 2, 0, true, true },
+		{ "signal",    0, 5, 0, false, true },
+		{ "roam",      0, 1, 0, false, true },
+		{ "battchg",   0, 5, 0, false, true },
+};
+
+static const struct hfp_codec codecs_defaults[] = {
+	{ CODEC_ID_CVSD, true, false},
+	{ CODEC_ID_MSBC, false, false},
+};
+
+static struct hf_device device;
 
 static uint32_t hfp_ag_features = 0;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-10-10  7:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08 10:15 [PATCH v2 01/12] android/handsfree: Define proper type for device structure Szymon Janc
2014-10-08 10:15 ` [PATCH v2 02/12] android/handsfree: Make init, cleanup and state functions static less Szymon Janc
2014-10-08 10:15 ` [PATCH v2 03/12] android/handsfree: Pass device as user data to AT handlers Szymon Janc
2014-10-08 10:15 ` [PATCH v2 04/12] android/handsfree: Pass device to connection handling functions Szymon Janc
2014-10-08 10:15 ` [PATCH v2 05/12] android/handsfree: Pass device pointer when registering AT commands Szymon Janc
2014-10-08 10:15 ` [PATCH v2 06/12] android/handsfree: Pass device pointer to codec handling functions Szymon Janc
2014-10-08 10:15 ` [PATCH v2 07/12] android/handsfree: Pass device to SCO " Szymon Janc
2014-10-08 10:15 ` [PATCH v2 08/12] android/handsfree: Move clip into device structure Szymon Janc
2014-10-08 10:15 ` [PATCH v2 09/12] android/handsfree: Pass device object to disconnect watch Szymon Janc
2014-10-08 10:15 ` [PATCH v2 10/12] android/handsfree: Pass device to phone state and indicators functions Szymon Janc
2014-10-08 10:15 ` [PATCH v2 11/12] android/handsfree: Add helper for getting device Szymon Janc
2014-10-08 10:15 ` [PATCH v2 12/12] android/handsfree: Make remote device non-static Szymon Janc
2014-10-10  7:49 ` [PATCH v2 01/12] android/handsfree: Define proper type for device structure Szymon Janc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).