0a9750ef9f
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r60603 | russell | 2007-04-06 15:58:43 -0500 (Fri, 06 Apr 2007) | 13 lines To be able to achieve the things that we would like to achieve with the Asterisk GUI project, we need a fully functional HTTP interface with access to the Asterisk manager interface. One of the things that was intended to be a part of this system, but was never actually implemented, was the ability for the GUI to be able to upload files to Asterisk. So, this commit adds this in the most minimally invasive way that we could come up with. A lot of work on minimime was done by Steve Murphy. He fixed a lot of bugs in the parser, and updated it to be thread-safe. The ability to check permissions of active manager sessions was added by Dwayne Hubbard. Then, hacking this all together and do doing the modifications necessary to the HTTP interface was done by me. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@60604 65c4cc65-6c06-0410-ace0-fbb531ad65f3
68 lines
1.2 KiB
C
68 lines
1.2 KiB
C
#ifndef _MIMEPARSER_H_INCLUDED
|
|
#define _MIMEPARSER_H_INCLUDED
|
|
|
|
#include "mm.h"
|
|
|
|
struct s_position
|
|
{
|
|
size_t opaque_start;
|
|
size_t start;
|
|
size_t end;
|
|
};
|
|
|
|
struct lexer_state
|
|
{
|
|
int header_state;
|
|
int lineno;
|
|
size_t current_pos;
|
|
int condition;
|
|
|
|
int is_envelope;
|
|
|
|
size_t message_len;
|
|
size_t buffer_length;
|
|
|
|
/* temporary marker variables */
|
|
size_t body_opaque_start;
|
|
size_t body_start;
|
|
size_t body_end;
|
|
size_t preamble_start;
|
|
size_t preamble_end;
|
|
size_t postamble_start;
|
|
size_t postamble_end;
|
|
|
|
char *boundary_string;
|
|
char *endboundary_string;
|
|
char *message_buffer;
|
|
};
|
|
|
|
|
|
struct parser_state
|
|
{
|
|
MM_CTX *ctx;
|
|
struct mm_mimepart *envelope;
|
|
struct mm_mimepart *temppart;
|
|
struct mm_mimepart *current_mimepart;
|
|
struct mm_content *ctype;
|
|
int parsemode;
|
|
int have_contenttype;
|
|
int debug;
|
|
int mime_parts;
|
|
struct lexer_state lstate;
|
|
};
|
|
|
|
|
|
#include "mimeparser.tab.h"
|
|
|
|
/**
|
|
* Prototypes for functions used by the parser routines
|
|
*/
|
|
int count_lines(char *);
|
|
int dprintf2(struct parser_state *, const char *, ...);
|
|
int mimeparser_yyparse(struct parser_state *, void *);
|
|
int mimeparser_yylex(YYSTYPE *, void *);
|
|
int mimeparser_yyerror(struct parser_state *, void *, const char *);
|
|
|
|
|
|
#endif /* ! _MIMEPARSER_H_INCLUDED */
|