Esempio n. 1
0
string t_hdr_referred_by::encode_value(void) const {
	string s;

	if (!populated) return s;

	if (display.size() > 0) {
		s += '"';
		s += escape(display, '"');
		s += '"';
		s += ' ';
	}

	s += '<';
	s += uri.encode();
	s += '>';

	if (cid.size() > 0) {
		s += ";cid=";
		s += cid;
	}

	s += param_list2str(params);

	return s;
}
Esempio n. 2
0
string t_info_param::encode(void) const {
	string s;

	s = '<' + uri.encode() + '>';
	s += param_list2str(parameter_list);

	return s;
}
Esempio n. 3
0
string t_hdr_refer_sub::encode_value(void) const {
	string s;

	if (!populated) return s;
	
	s = (create_refer_sub ? "true" : "false");
	s += param_list2str(extensions);
	
	return s;
}
Esempio n. 4
0
string t_hdr_event::encode_value(void) const {
	string s;

	if (!populated) return s;

	s += event_type;

	if (id.size() > 0) {
		s += ";id=";
		s += id;
	}

	s += param_list2str(event_params);

	return s;
}
string t_hdr_content_disp::encode_value(void) const {
	string s;

	if (!populated) return s;

	s = type;
	
	if (!filename.empty()) {
		s += ";filename=\"";
		s += filename;
		s += "\"";
	}
	
	s += param_list2str(params);

	return s;
}
Esempio n. 6
0
string t_hdr_replaces::encode_value(void) const {
	string s;

	if (!populated) return s;
	
	s += call_id;
	s += ";to-tag=";
	s += to_tag;
	s += ";from-tag=";
	s += from_tag;
	
	if (early_only) {
		s += ";early-only";
	}
	
	s += param_list2str(params);
	
	return s;
}
Esempio n. 7
0
string t_hdr_retry_after::encode_value(void) const {
	string s;

	if (!populated) return s;

	s = ulong2str(time);

	if (comment.size() > 0) {
		s += " (";
		s += comment;
		s += ')';
	}

	if (duration > 0) {
		s += ";duration=";
		s += ulong2str(duration);
	}

	s += param_list2str(params);

	return s;
}