TTMEDIA_DEPOSIT(3)
π ttmedia_Deposit(library call) β send a Deposit request to checkpoint a document π
okay so welcome to the ttmedia_Deposit(library call) page, bestie β¨ this is the one about sending a Deposit request to checkpoint a document. no cap, it's giving βeditor sends the new contents backβ energy. π«Ά
πΈ NAME πΈ
ttmedia_Deposit β send a Deposit request to checkpoint a document. that's the whole vibe: checkpoint save request, sent via the ToolTalk service π
β¨ SYNOPSIS β¨
#include &<Tt/tttk.h>
Tt_status ttmedia_Deposit(
Tt_message load_contract,
const char *buffer_id,
const char *media_type,
const unsigned char *new_contents,
int new_len,
const char *pathname,
XtAppContext app2run,
int ms_timeout);
π DESCRIPTION π
okay so here's the tea: ttmedia_Deposit does a checkpoint save on a document that was the subject of a Media Exchange load_contract request β think Edit, Compose, or Open. to actually carry out that checkpoint save, the editor has to send the new document contents back to whoever sent load_contract. π
the function creates and sends a Deposit request, then returns the success or failure of that request. load_contract is the request that caused this editor to load the document. buffer_id is the identifier of the buffer this editor created if the document was loaded via an Open request. π
if buffer_id is NULL, the ToolTalk service gives the Deposit request a Tt_address of TT_HANDLER and sends it directly to the tt_message_sender of load_contract. otherwise, the ToolTalk service will address it as a TT_PROCEDURE and insert buffer_id into the request to match the pattern registered by the sender of the load_contract. π¦
ttmedia_Deposit uses media_type as the vtype of the contents argument of the sent request, and new_contents plus new_len as its value. those latter two must be zero if pathname is used to name a temporary file into which the editor will place the checkpointed document. the editor is free to remove that temporary file after the reply to the Deposit request is received β that is, after ttmedia_Deposit has returned. π
after the request is sent, ttmedia_Deposit passes app2run and ms_timeout to tttk_block_while(3) to wait for the reply. literally that's the flow π
π RETURN VALUE π
upon successful completion, ttmedia_Deposit returns the status of the operation as one of these Tt_status values:
TT_OKβ the operation completed successfully. πTT_DESKTOP_ETIMEDOUTβ no reply was received withinms_timeoutmilliseconds. β°TT_ERR_NOMEMβ there is insufficient memory available to perform the function. πTT_ERR_NOMPβ thettsession(1)process is not running and the ToolTalk service cannot restart it. πTT_ERR_OVERFLOWβ the ToolTalk service has more active messages than it can handle. (the maximum number of active messages is implementation specific, but is at least 2000.) π₯TT_ERR_POINTERβ thepathnameargument wasNULLor was a ToolTalk error pointer. πTT_ERR_PROCIDβ the specified process identifier is out of date or invalid. π«
π¦ SEE ALSO π¦
go check these out, bestie: Tt/tttk.h - Tttttk(5), ttmedia_load(3), ttmedia_load_reply(3), ttmedia_ptype_declare(3), ttdt_Save(3), tttk_block_while(3). iykyk π
xoxo, bestie π β the footer says ttmedia_Deposit(library call) and no date was printed with it, so that's the cute source/version sign-off; imaginary timestamp: sparkle o'clock πβ¨
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms