Return-Path: From: Dimitry Andric Message-ID: <1598723318.20050407211922@andric.com> To: Marcel Holtmann Subject: Re: [Bluez-devel] [PATCH] Add sdptool option for browsing with L2CAP_UUID In-Reply-To: <1112881490.9047.73.camel@pegasus> References: <381006269.20050404171656@andric.com> <1112714837.12406.51.camel@notepaq> <1542380074.20050407140838@andric.com> <1112881490.9047.73.camel@pegasus> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----------8E1D28E2B42F15" Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Thu, 7 Apr 2005 21:19:22 +0200 ------------8E1D28E2B42F15 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On 2005-04-07 at 15:44:50 Marcel Holtmann wrote: > Maybe we should add somekind of short name to UUID translation function, > because the numeric values are hard to remember. Here's an easy hack: I reused the existing uuid16_names array for looking up (partial) matches. You can also get a list of recognized names. If you think it would be nicer to add a separate name list (i.e. made from the names in sdp.h), let me know. ------------8E1D28E2B42F15 Content-Type: text/plain; name="bluez-utils-2.15-sdpbrowse-uuid2.patch" Content-transfer-encoding: base64 Content-Disposition: attachment; filename="bluez-utils-2.15-sdpbrowse-uuid2.patch" IyBibHVlei11dGlscy0yLjE1LXNkcGJyb3dzZS11dWlkMi5wYXRjaAojCiMgRXh0ZW5kIHRo ZSAtLXV1aWQgb3B0aW9uIG9mIHNkcHRvb2wgYnJvd3NlLCB0byBhZGRpdGlvbmFsbHkgcmVj b2duaXplIHV1aWQncwojIGJ5IG5hbWUgaW5zdGVhZCBvZiBudW1iZXIuICBUaGUgZXhpc3Rp bmcgdXVpZDE2X25hbWVzIGFycmF5IGlzIHVzZWQgZm9yIHRoaXMKIyBwdXJwb3NlLiAgWW91 IGRvbid0IGhhdmUgdG8gc3BlY2lmeSB0aGUgZnVsbCBuYW1lLCBhcyB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Qlmb3IgKGkgPSAwOyBp IDwgdXVpZDE2X21heDsgKytpKSB7CisJCQkJCWlmICghc3RybmNhc2VjbXAob3B0YXJnLCB1 dWlkMTZfbmFtZXNbaV0ubmFtZSwgbGVuKSkgeworCQkJCQkJaWYgKG1hdGNoID49IDApIHsK KwkJCQkJCQlwcmludGYoIkFtYmlndW91cyB1dWlkICVzXG4iLCBvcHRhcmcpOworCQkJCQkJ CXJldHVybiAtMTsKKwkJCQkJCX0KKwkJCQkJCW1hdGNoID0gaTsKKwkJCQkJfQorCQkJCX0K KwkJCQlpZiAobWF0Y2ggPCAwKSB7CisJCQkJCXByaW50ZigiSW52YWxpZCB1dWlkICVzXG4i LCBvcHRhcmcpOworCQkJCQlyZXR1cm4gLTE7CisJCQkJfQorCQkJCXNkcF91dWlkMTZfY3Jl YXRlKCZjb250ZXh0Lmdyb3VwLCB1dWlkMTZfbmFtZXNbbWF0Y2hdLm51bSk7CiAJCQl9Ci0J CQlzZHBfdXVpZDE2X2NyZWF0ZSgmY29udGV4dC5ncm91cCwgbnVtKTsKIAkJCWJyZWFrOwog CQljYXNlICdsJzoKIAkJCXNkcF91dWlkMTZfY3JlYXRlKCZjb250ZXh0Lmdyb3VwLCBMMkNB UF9VVUlEKTsK ------------8E1D28E2B42F15-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel