Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/inferno/module/mime.m

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.



make_boundary : fn() :  string;

Mime : module
{
	PATH: con "/dis/lib/mime.dis";


	Keyval : adt {
		key : string;
		value : string;
		to_string : fn(k : self ref Keyval) : string;
	};

	Disposition : adt {
		d_type : string;
		attributes : list of ref Keyval;
		to_string : fn(d : self ref Disposition) : string;
	};

	Document : adt {
		boundary : string;
		parts : list of array of byte;
		payload_size : int;
		add_part: fn(m : self ref Document, disposition : ref Disposition, mime_type : string, content : array of byte);
		bytes: fn(m : self ref Document) : array of byte;
	};

	new_document: fn() : ref Document;
};


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.