Attachment helper functions. More...
#include "config.h"
#include <stdbool.h>
#include <stddef.h>
#include "mutt/lib.h"
#include "email/lib.h"
Go to the source code of this file.
Functions | |
int | attach_body_count (struct Body *body, bool recurse) |
Count bodies. | |
bool | attach_body_parent (struct Body *start, struct Body *start_parent, struct Body *body, struct Body **body_parent) |
Find the parent of a body. | |
struct Body * | attach_body_ancestor (struct Body *start, struct Body *body, const char *subtype) |
Find the ancestor of a body with specified subtype. | |
bool | attach_body_previous (struct Body *start, struct Body *body, struct Body **previous) |
Find the previous body of a body. | |
Attachment helper functions.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file lib.c.
int attach_body_count | ( | struct Body * | body, |
bool | recurse | ||
) |
Count bodies.
body | Body to start counting from |
recurse | Whether to recurse into groups or not |
num | Number of bodies |
-1 | Failure |
Definition at line 42 of file lib.c.
bool attach_body_parent | ( | struct Body * | start, |
struct Body * | start_parent, | ||
struct Body * | body, | ||
struct Body ** | body_parent | ||
) |
Find the parent of a body.
[in] | start | Body to start search from |
[in] | start_parent | Parent of start Body pointer (or NULL if none) |
[in] | body | Body to find parent of |
[out] | body_parent | Body Parent if found |
true | Parent body found |
false | Parent body not found |
Definition at line 71 of file lib.c.
struct Body * attach_body_ancestor | ( | struct Body * | start, |
struct Body * | body, | ||
const char * | subtype | ||
) |
Find the ancestor of a body with specified subtype.
[in] | start | Body to start search from |
[in] | body | Body to find ancestor of |
[in] | subtype | Mime subtype of ancestor to find |
ptr | Body ancestor if found |
NULL | If ancestor body not found |
Definition at line 116 of file lib.c.
Find the previous body of a body.
[in] | start | Body to start search from |
[in] | body | Body to find previous body of |
[out] | previous | Previous Body if found |
true | Previous body found |
false | Previous body not found |
Definition at line 142 of file lib.c.