definition module pdObjectToMem;

import DLState;

generate_options_file :: !*DLClientState !*DLServerState !*Files -> *(*(!String,*DLClientState,*DLServerState),*Files);

// Client <-> Server communication
class SendAddressToClient a
where {
	SendAddressToClient :: !ProcessSerialNumber a !(IOState *s) -> !(IOState *s)
};

//1.3
instance SendAddressToClient !Int;
instance SendAddressToClient !{#Char};
//3.1
/*2.0
instance SendAddressToClient Int;
instance SendAddressToClient {#Char};
0.2*/
instance SendAddressToClient [Int];
instance SendAddressToClient (Int,[Int]);
instance SendAddressToClient ({#Char},Int,[Int]);
instance SendAddressToClient ({#Char},{#Char},Int,[Int]);

class EncodeClientMessage a
where {
	EncodeClientMessage :: a -> !String
};

instance EncodeClientMessage [Int];

//write_image :: !*State !*Files -> !(!*State,!*Files);
//write_image :: !*State !*Files -> !(!Int,!*State,!*Files);
//write_image :: !*State (!*IOState s) -> !(!Int,!*State,!*IOState s);
:: WriteImageInfo
	= {
		wii_code_start	:: !Int
	,	wii_code_end	:: !Int
	,	wii_data_start	:: !Int
	,	wii_data_end	:: !Int
	};
default_write_image_info :: WriteImageInfo;

write_image :: !*State (!*IOState s) -> !(!Int,WriteImageInfo,!*State,!*IOState s);

