mail::account::saveFolderIndexInfo — Update message status
        
        
        #include <libmail/mail.H>
        
        
        class myCallback : public mail::callback {
        public:
            void success(std::string msg);
            void fail(std::string msg);
        };
        mail::account *account;
| account->saveFolderIndexInfo( | size_t messageNum, | 
| const messageInfo &msgInfo, | |
| myCallback &callback ); | 
mail::account::saveFolderIndexInfo changes
      the status of a message. messageNum must be between zero
      and one less than the return code from mail::account::getFolderIndexSize(3x).
      msgInfo contains the
      new status flags for this message. See mail::account::getFolderIndexInfo(3x)
      for a description of message status flags.
The uid field
        in msgInfo is
        ignored. The message is specified by messageNum, and unique IDs of
        existing messages cannot be changed.
The application must wait until callback's success or fail method is invoked. The success method is invoked when this request
      is succesfully processed. The fail method is invoked if this request
      cannot be processed. The application must not destroy
      callback until either
      the success or fail method is invoked.
callback's
        fail method may be invoked
        even after other callback methods were invoked. This
        indicates that the request was partially completed before
        the error was encountered.
The application is notified about when a message's
        status changes by by invoking the messageChanged callback method of the
        currently opened folder's mail::folderCallback object. Depending
        on the mail server, the messageChanged method may be invoked as
        part of processing this request, or some time later after
        this request is completed, and callback's success method was invoked.
Multiple applications may have the same account and
        folder opened at the same time. It is possible that a
        message referenced by this request was already deleted by
        another application. Depending on the underlying server
        implementation this will result in either a failed request,
        invoking callback.fail, or
        the request completing (callback.success invoked) but without
        invoking any callback function that refer to the
        message.