linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bluez-devel] more sdp patches
@ 2005-12-02  7:40 Collin R. Mulliner
  2005-12-02 19:47 ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Collin R. Mulliner @ 2005-12-02  7:40 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

Hi Marcel,

here is another patch for bluez-libs for sdp. I added:

int sdp_set_access_protos_attr(sdp_record_t *rec, const sdp_list_t
*proto, const uint16_t attr);

this is to add stuff like SDP_ATTR_ADD_PROTO_DESC_LIST, actually I
modified sdp_set_access_protos to take another parameter and made
sdp_set_access_protos do a call to sdp_set_access_protos_attr to keep
backward compatibility


... Collin

--
Collin R. Mulliner <collin@betaversion.net>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger collin@betaversion.net
USS Enterprise Bumperstricker: Our other starship separates into 3
pieces!

[-- Attachment #2: bluez_libs_add_access_inc --]
[-- Type: text/plain, Size: 488 bytes --]

--- bluez-libs-2.22/include/sdp_lib.h	2005-10-29 16:04:28.000000000 -0700
+++ bluez-libs-2.22_new/include/sdp_lib.h	2005-12-01 22:54:36.000000000 -0800
@@ -172,6 +174,7 @@
  * Set the access protocols of the record to those specified in proto
  */
 int sdp_set_access_protos(sdp_record_t *rec, const sdp_list_t *proto);
+int sdp_set_access_protos_attr(sdp_record_t *rec, const sdp_list_t *proto, const uint16_t attr);
 
 /*
  * Get protocol port (i.e. PSM for L2CAP, Channel for RFCOMM) 

[-- Attachment #3: bluez_libs_add_access_src --]
[-- Type: text/plain, Size: 709 bytes --]

--- bluez-libs-2.22/src/sdp.c	2005-10-29 16:04:28.000000000 -0700
+++ bluez-libs-2.22_new/src/sdp.c	2005-12-01 22:55:27.000000000 -0800
@@ -1742,6 +1772,11 @@
  */
 int sdp_set_access_protos(sdp_record_t *rec, const sdp_list_t *ap)
 {
+	return(sdp_set_access_protos_attr(rec, ap, SDP_ATTR_PROTO_DESC_LIST));
+}
+
+int sdp_set_access_protos_attr(sdp_record_t *rec, const sdp_list_t *ap, const uint16_t attr)
+{
 	const sdp_list_t *p;
 	sdp_data_t *protos = 0;
 
@@ -1749,7 +1784,7 @@
 		sdp_data_t *seq = access_proto_to_dataseq(rec, (sdp_list_t *)p->data);
 		protos = sdp_seq_append(protos, seq);
 	}
-	sdp_attr_add(rec, SDP_ATTR_PROTO_DESC_LIST, protos);
+	sdp_attr_add(rec, attr, protos);
 	return 0;
 }
 

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

* Re: [Bluez-devel] more sdp patches
  2005-12-02  7:40 [Bluez-devel] more sdp patches Collin R. Mulliner
@ 2005-12-02 19:47 ` Marcel Holtmann
  2005-12-02 23:07   ` Collin R. Mulliner
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2005-12-02 19:47 UTC (permalink / raw)
  To: bluez-devel

Hi Collin,

> here is another patch for bluez-libs for sdp. I added:
> 
> int sdp_set_access_protos_attr(sdp_record_t *rec, const sdp_list_t
> *proto, const uint16_t attr);
> 
> this is to add stuff like SDP_ATTR_ADD_PROTO_DESC_LIST, actually I
> modified sdp_set_access_protos to take another parameter and made
> sdp_set_access_protos do a call to sdp_set_access_protos_attr to keep
> backward compatibility

this won't work, because the additional protocol descriptor list is a
sequence of sequence of sequence. Compare this from my HCRP capable
printer:

Attribute 0x0004 - ProtocolDescriptorList
        Sequence
                Sequence
                        UUID16 0x0100 - L2CAP
                        UINT16 0x1003
                Sequence
                       UUID16 0x0012 - HardcopyControlChannel

Attribute 0x000d - AdditionalProtocolDescriptorLists
        Sequence
                Sequence
                        Sequence
                                UUID16 0x0100 - L2CAP
                                UINT16 0x1001
                        Sequence
                                UUID16 0x0014 - HardcopyDataChannel


Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] more sdp patches
  2005-12-02 19:47 ` Marcel Holtmann
@ 2005-12-02 23:07   ` Collin R. Mulliner
  2005-12-03  5:15     ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Collin R. Mulliner @ 2005-12-02 23:07 UTC (permalink / raw)
  To: bluez-devel

Marcel,

Quoting Marcel Holtmann <marcel@holtmann.org>:
> this won't work, because the additional protocol descriptor list is a
> sequence of sequence of sequence. Compare this from my HCRP capable
> printer:

ah mmmh the code I send in works for me, so maybe it's just unclean :-(

About the "leng" issue, I thought you would tweak my patch anyway so I didn't
bothered making it nice ... sorry!


... Collin




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] more sdp patches
  2005-12-02 23:07   ` Collin R. Mulliner
@ 2005-12-03  5:15     ` Marcel Holtmann
  2005-12-04  7:53       ` Collin R. Mulliner
  0 siblings, 1 reply; 6+ messages in thread
From: Marcel Holtmann @ 2005-12-03  5:15 UTC (permalink / raw)
  To: bluez-devel

Hi Collin,

> > this won't work, because the additional protocol descriptor list is a
> > sequence of sequence of sequence. Compare this from my HCRP capable
> > printer:
> 
> ah mmmh the code I send in works for me, so maybe it's just unclean :-(

show me how you use it.

> About the "leng" issue, I thought you would tweak my patch anyway so I didn't
> bothered making it nice ... sorry!

Make it looks nice and re-send it. I like nice looking patches ;)

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] more sdp patches
  2005-12-03  5:15     ` Marcel Holtmann
@ 2005-12-04  7:53       ` Collin R. Mulliner
  2005-12-04  8:08         ` Marcel Holtmann
  0 siblings, 1 reply; 6+ messages in thread
From: Collin R. Mulliner @ 2005-12-04  7:53 UTC (permalink / raw)
  To: bluez-devel

Hi Marcel,


On Sat, 2005-12-03 at 06:15 +0100, Marcel Holtmann wrote:
> Hi Collin,
> 
> > > this won't work, because the additional protocol descriptor list is a
> > > sequence of sequence of sequence. Compare this from my HCRP capable
> > > printer:
> > 
> > ah mmmh the code I send in works for me, so maybe it's just unclean :-(
> 
> show me how you use it.

you were right, it doesn't work. sdptool browse just did somehow display
it, but of course the third sequence did not exist ... 

*remember: Marcel is always right when talking about BlueZ stuff*

so I guess I have to write my own function to do
SDP_ATTR_ADD_PROTO_DESC_LIST?

> > About the "leng" issue, I thought you would tweak my patch anyway so I didn't
> > bothered making it nice ... sorry!
> 
> Make it looks nice and re-send it. I like nice looking patches ;)

I will, I just need to finish some other stuff now


... Collin

--
Collin R. Mulliner <collin@betaversion.net>
BETAVERSiON Systems [www.betaversion.net]
info/pgp: finger collin@betaversion.net
AAAAA - American Association Against Acronym Abuse



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

* Re: [Bluez-devel] more sdp patches
  2005-12-04  7:53       ` Collin R. Mulliner
@ 2005-12-04  8:08         ` Marcel Holtmann
  0 siblings, 0 replies; 6+ messages in thread
From: Marcel Holtmann @ 2005-12-04  8:08 UTC (permalink / raw)
  To: bluez-devel

Hi Collin,

> > > > this won't work, because the additional protocol descriptor list is a
> > > > sequence of sequence of sequence. Compare this from my HCRP capable
> > > > printer:
> > > 
> > > ah mmmh the code I send in works for me, so maybe it's just unclean :-(
> > 
> > show me how you use it.
> 
> you were right, it doesn't work. sdptool browse just did somehow display
> it, but of course the third sequence did not exist ... 
> 
> *remember: Marcel is always right when talking about BlueZ stuff*

not always, but I already ran into this problem when I wrote the CUPS
backend with HCRP support some time ago. And actually HID is the same.

> so I guess I have to write my own function to do
> SDP_ATTR_ADD_PROTO_DESC_LIST?

Please do so.

> > > About the "leng" issue, I thought you would tweak my patch anyway so I didn't
> > > bothered making it nice ... sorry!
> > 
> > Make it looks nice and re-send it. I like nice looking patches ;)
> 
> I will, I just need to finish some other stuff now

My plan was to do another release this weekend, but it got postponed due
some timing issues. However I will do a new release early next week and
I actually like to see this patches included.

Regards

Marcel




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

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

end of thread, other threads:[~2005-12-04  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-02  7:40 [Bluez-devel] more sdp patches Collin R. Mulliner
2005-12-02 19:47 ` Marcel Holtmann
2005-12-02 23:07   ` Collin R. Mulliner
2005-12-03  5:15     ` Marcel Holtmann
2005-12-04  7:53       ` Collin R. Mulliner
2005-12-04  8:08         ` Marcel Holtmann

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).