Back to index

citadel  8.12
Functions
imap_store.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void imap_store (int num_parms, ConstStr *Params)
void imap_uidstore (int num_parms, ConstStr *Params)

Function Documentation

void imap_store ( int  num_parms,
ConstStr *  Params 
)

Definition at line 212 of file imap_store.c.

                                                 {
       citimap_command Cmd;
       int num_items;

       if (num_parms < 3) {
              IReply("BAD invalid parameters");
              return;
       }

       if (imap_is_message_set(Params[2].Key)) {
              imap_pick_range(Params[2].Key, 0);
       }
       else {
              IReply("BAD invalid parameters");
              return;
       }

       memset(&Cmd, 0, sizeof(citimap_command));
       Cmd.CmdBuf = NewStrBufPlain(NULL, StrLength(IMAP->Cmd.CmdBuf));
       MakeStringOf(Cmd.CmdBuf, 3);

       num_items = imap_extract_data_items(&Cmd);
       if (num_items < 1) {
              IReply("BAD invalid data item list");
              FreeStrBuf(&Cmd.CmdBuf);
              free(Cmd.Params);
              return;
       }

       imap_do_store(&Cmd);
       IReply("OK STORE completed");
       FreeStrBuf(&Cmd.CmdBuf);
       free(Cmd.Params);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void imap_uidstore ( int  num_parms,
ConstStr *  Params 
)

Definition at line 250 of file imap_store.c.

                                                    {
       citimap_command Cmd;
       int num_items;

       if (num_parms < 4) {
              IReply("BAD invalid parameters");
              return;
       }

       if (imap_is_message_set(Params[3].Key)) {
              imap_pick_range(Params[3].Key, 1);
       }
       else {
              IReply("BAD invalid parameters");
              return;
       }

       memset(&Cmd, 0, sizeof(citimap_command));
       Cmd.CmdBuf = NewStrBufPlain(NULL, StrLength(IMAP->Cmd.CmdBuf));
       MakeStringOf(Cmd.CmdBuf, 4);

       num_items = imap_extract_data_items(&Cmd);
       if (num_items < 1) {
              IReply("BAD invalid data item list");
              FreeStrBuf(&Cmd.CmdBuf);
              free(Cmd.Params);
              return;
       }

       imap_do_store(&Cmd);
       IReply("OK UID STORE completed");
       FreeStrBuf(&Cmd.CmdBuf);
       free(Cmd.Params);
}

Here is the call graph for this function:

Here is the caller graph for this function: