/*
* ImapProxy - a caching IMAP proxy daemon
* Copyright (C) 2002 Steven Van Acker
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* 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, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __PARSED_MESSAGE_H__
#define __PARSED_MESSAGE_H__
#include <database.h>
#define PARSED_MESSAGE_UNKNOWNL_STRING 0x00000000
#define PARSED_MESSAGE_NORMAL_STRING 0x00000001
#define PARSED_MESSAGE_QUOTED_STRING 0x00000002
#define PARSED_MESSAGE_LITERAL_STRING 0x00000003
typedef struct parsed_message_t
{
char **args; /* pointer to the arguments */
int *argsdesc; /* pointer to the description of the arguments */
int numargs; /* number of arguments */
} Parsed_message;
extern int init_parsed_message(Parsed_message *);
extern int make_parsed_message(struct message_t *,Parsed_message *);
extern int delete_parsed_message(Parsed_message *);
extern int parsed_message_count_args(Parsed_message *);
extern char *parsed_message_get_idtag(Parsed_message *);
extern char *parsed_message_get_command(Parsed_message *);
extern char *parsed_message_get_arg(Parsed_message *,int);
extern int parsed_message_get_idtag_description(Parsed_message *);
extern int parsed_message_get_command_description(Parsed_message *);
extern int parsed_message_get_arg_description(Parsed_message *,int);
extern int parsed_message_add_arg(Parsed_message *,char *,char *,int);
extern int string_quote(char *, char *, int);
extern int string_unquote(char *, char *, int);
extern void print_parsed_message(Parsed_message *);
#endif /* __PARSED_MESSAGE_H__ */
syntax highlighted by Code2HTML, v. 0.9.1