Plan 9 from Bell Labs’s /usr/web/sources/contrib/maht/limbo/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 "/appl/lib/mime.dis";


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

	Disposition : adt {
		d_type, content_type : string;
		attributes : list of ref Keyval;
		data : array of byte;
		header : 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);
		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.