1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
21 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
22 #error "Only <camel/camel.h> can be included directly."
25 #ifndef CAMEL_MSGPORT_H
26 #define CAMEL_MSGPORT_H
38 typedef struct _CamelMsg CamelMsg;
39 typedef struct _CamelMsgPort CamelMsgPort;
47 CamelMsgPort *reply_port;
51 CamelMsgPort * camel_msgport_new (void);
52 void camel_msgport_destroy (CamelMsgPort *msgport);
53 gint camel_msgport_fd (CamelMsgPort *msgport);
54 void camel_msgport_push (CamelMsgPort *msgport,
56 CamelMsg * camel_msgport_pop (CamelMsgPort *msgport);
57 CamelMsg * camel_msgport_try_pop (CamelMsgPort *msgport);
58 CamelMsg * camel_msgport_timeout_pop (CamelMsgPort *msgport,
60 void camel_msgport_reply (CamelMsg *msg);
62 struct PRFileDesc * camel_msgport_prfd (CamelMsgPort *msgport);
66 #endif /* CAMEL_MSGPORT_H */