Package javax.bluetooth

Examples of javax.bluetooth.DataElement.addElement()


            if (services.contains(psmKey)) { //return false; 
            }
            services.put(psmKey, channelFactory);
            Long serviceHandle = new Long(serviceHandleCounter++);
            DataElement serviceRecordElement = new DataElement(DataElement.DATSEQ);
            serviceRecordElement.addElement(new DataElement(DataElement.U_INT_2, 0));
            serviceRecordElement.addElement(new DataElement(DataElement.U_INT_4, serviceHandle.longValue()));
            DataElement recordElements = new DataElement(serviceRecord);
            Enumeration elements = (Enumeration)recordElements.getValue();
            while (elements.hasMoreElements()) {
                DataElement element = (DataElement)elements.nextElement();
View Full Code Here


            }
            services.put(psmKey, channelFactory);
            Long serviceHandle = new Long(serviceHandleCounter++);
            DataElement serviceRecordElement = new DataElement(DataElement.DATSEQ);
            serviceRecordElement.addElement(new DataElement(DataElement.U_INT_2, 0));
            serviceRecordElement.addElement(new DataElement(DataElement.U_INT_4, serviceHandle.longValue()));
            DataElement recordElements = new DataElement(serviceRecord);
            Enumeration elements = (Enumeration)recordElements.getValue();
            while (elements.hasMoreElements()) {
                DataElement element = (DataElement)elements.nextElement();
                serviceRecordElement.addElement(element);
View Full Code Here

    public SDPLocalServiceRecord(short serviceClassID) {
        this.attributes = new Hashtable();
        DataElement serviceClassIDList = new DataElement(DataElement.DATSEQ);
        UUID serviceClassUUID = new UUID(serviceClassID);
        serviceClassIDList.addElement(new DataElement(DataElement.UUID, new UUID(0x1111)));
        attributes.put(new Integer(1), serviceClassIDList);
        DataElement protocolDescriptorList = new DataElement(DataElement.DATSEQ);
        DataElement l2capDescriptor = new DataElement(DataElement.DATSEQ);
        l2capDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0100)));
        protocolDescriptorList.addElement(l2capDescriptor);
View Full Code Here

        UUID serviceClassUUID = new UUID(serviceClassID);
        serviceClassIDList.addElement(new DataElement(DataElement.UUID, new UUID(0x1111)));
        attributes.put(new Integer(1), serviceClassIDList);
        DataElement protocolDescriptorList = new DataElement(DataElement.DATSEQ);
        DataElement l2capDescriptor = new DataElement(DataElement.DATSEQ);
        l2capDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0100)));
        protocolDescriptorList.addElement(l2capDescriptor);
        DataElement rfcommDescriptor = new DataElement(DataElement.DATSEQ);
        rfcommDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0003)));
        rfcommDescriptor.addElement(new DataElement(DataElement.U_INT_1, 1));
        protocolDescriptorList.addElement(rfcommDescriptor);
View Full Code Here

        DataElement protocolDescriptorList = new DataElement(DataElement.DATSEQ);
        DataElement l2capDescriptor = new DataElement(DataElement.DATSEQ);
        l2capDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0100)));
        protocolDescriptorList.addElement(l2capDescriptor);
        DataElement rfcommDescriptor = new DataElement(DataElement.DATSEQ);
        rfcommDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0003)));
        rfcommDescriptor.addElement(new DataElement(DataElement.U_INT_1, 1));
        protocolDescriptorList.addElement(rfcommDescriptor);
        attributes.put(new Integer(4), protocolDescriptorList);
        DataElement browseClassIDList = new DataElement(DataElement.DATSEQ);
        UUID browseClassUUID = new UUID(0x1002);
View Full Code Here

        DataElement l2capDescriptor = new DataElement(DataElement.DATSEQ);
        l2capDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0100)));
        protocolDescriptorList.addElement(l2capDescriptor);
        DataElement rfcommDescriptor = new DataElement(DataElement.DATSEQ);
        rfcommDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x0003)));
        rfcommDescriptor.addElement(new DataElement(DataElement.U_INT_1, 1));
        protocolDescriptorList.addElement(rfcommDescriptor);
        attributes.put(new Integer(4), protocolDescriptorList);
        DataElement browseClassIDList = new DataElement(DataElement.DATSEQ);
        UUID browseClassUUID = new UUID(0x1002);
        browseClassIDList.addElement(new DataElement(DataElement.UUID, browseClassUUID));
View Full Code Here

        rfcommDescriptor.addElement(new DataElement(DataElement.U_INT_1, 1));
        protocolDescriptorList.addElement(rfcommDescriptor);
        attributes.put(new Integer(4), protocolDescriptorList);
        DataElement browseClassIDList = new DataElement(DataElement.DATSEQ);
        UUID browseClassUUID = new UUID(0x1002);
        browseClassIDList.addElement(new DataElement(DataElement.UUID, browseClassUUID));
        attributes.put(new Integer(5), browseClassIDList);
        DataElement languageBaseAttributeIDList = new DataElement(DataElement.DATSEQ);
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 25966));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 106));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 256));
View Full Code Here

        DataElement browseClassIDList = new DataElement(DataElement.DATSEQ);
        UUID browseClassUUID = new UUID(0x1002);
        browseClassIDList.addElement(new DataElement(DataElement.UUID, browseClassUUID));
        attributes.put(new Integer(5), browseClassIDList);
        DataElement languageBaseAttributeIDList = new DataElement(DataElement.DATSEQ);
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 25966));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 106));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 256));
        attributes.put(new Integer(6), languageBaseAttributeIDList);
        DataElement profileDescriptorList = new DataElement(DataElement.DATSEQ);
        DataElement profileDescriptor = new DataElement(DataElement.DATSEQ);
View Full Code Here

        UUID browseClassUUID = new UUID(0x1002);
        browseClassIDList.addElement(new DataElement(DataElement.UUID, browseClassUUID));
        attributes.put(new Integer(5), browseClassIDList);
        DataElement languageBaseAttributeIDList = new DataElement(DataElement.DATSEQ);
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 25966));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 106));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 256));
        attributes.put(new Integer(6), languageBaseAttributeIDList);
        DataElement profileDescriptorList = new DataElement(DataElement.DATSEQ);
        DataElement profileDescriptor = new DataElement(DataElement.DATSEQ);
        profileDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x1111)));
View Full Code Here

        browseClassIDList.addElement(new DataElement(DataElement.UUID, browseClassUUID));
        attributes.put(new Integer(5), browseClassIDList);
        DataElement languageBaseAttributeIDList = new DataElement(DataElement.DATSEQ);
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 25966));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 106));
        languageBaseAttributeIDList.addElement(new DataElement(DataElement.U_INT_2, 256));
        attributes.put(new Integer(6), languageBaseAttributeIDList);
        DataElement profileDescriptorList = new DataElement(DataElement.DATSEQ);
        DataElement profileDescriptor = new DataElement(DataElement.DATSEQ);
        profileDescriptor.addElement(new DataElement(DataElement.UUID, new UUID(0x1111)));
        profileDescriptor.addElement(new DataElement(DataElement.U_INT_2, 256));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.