예제 #1
0
		std::string to_string() const {
			std::stringstream ss;
			ss << "host: " << get_endpoint_string();
			ss << ", buffer_length: " << buffer_length;
			ss << ", time_delta: " << time_delta;
			ss << ", password: "******", hostname: " << sender_hostname;
			ss << ", encoding: " << encoding;
			ss << ", ssl: " << ssl.to_string();
			return ss.str();
		}
예제 #2
0
파일: endpoint.c 프로젝트: MarkTseng/lsusb
struct usb_endpoint *create_usb_endpoint(struct udev_device *device, const char *endpoint_name)
{
	struct usb_endpoint *ep;
	char filename[PATH_MAX];

	ep = new_usb_endpoint();

#define get_endpoint_string(string)					\
	sprintf(filename, "%s/"__stringify(string), endpoint_name);	\
	ep->string = get_dev_string(device, filename);

	get_endpoint_string(bEndpointAddress);
	get_endpoint_string(bInterval);
	get_endpoint_string(bLength);
	get_endpoint_string(bmAttributes);
	get_endpoint_string(direction);
	get_endpoint_string(type);
	get_endpoint_string(wMaxPacketSize);

	return ep;
}