⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ipc-protocol.h

📁 一个功能全面的电子邮件客户端
💻 H
字号:
/* TradeClient <http://tradeclient.sourceforge.net> * $Id: ipc-protocol.h,v 1.7 2001/03/20 20:12:34 ttabner Exp $ * * Copyright (C) 1999-2000 Bynari Inc. * Copyright (C) 2001 Project TradeClient * * LGPL * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Library 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 Library * General Public License for more details. * * You should have received a copy of the GNU Library 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 _IPC_PROTOCOL_H#define _IPC_PROTOCOL_H#include <time.h>/* Base class of messages [24 - 31 bits] */#define MSG_IOCTL             (1 << 24)#define MSG_DATA              (1 << 25)/* Specific messages within the IOCTL class [0 - 23 bits] */#define MSG_MANAGE_PID        (MSG_IOCTL + 1)#define MSG_MANAGE_DONE       (MSG_IOCTL + 2)#define MSG_ACCOUNT_LOCK      (MSG_IOCTL + 3)#define MSG_ACCOUNT_UNLOCK    (MSG_IOCTL + 4)#define MSG_TOTAL_MESSAGES    (MSG_IOCTL + 5)#define MSG_NEW_MESSAGES      (MSG_IOCTL + 6)#define MSG_WAIT              (MSG_IOCTL + 7)#define MSG_MANAGE_WAIT       (MSG_IOCTL + 8)#define MSG_CANCEL            (MSG_IOCTL + 9)#define MSG_NEXT              (MSG_IOCTL + 10)#define MSG_TEXT_ERROR        (MSG_IOCTL + 11)#define MSG_TEXT_WARN         (MSG_IOCTL + 12)#define MSG_TEXT_INFO         (MSG_IOCTL + 13)/* Specific messages within the DATA class */#define MSG_MSG_BLOCK         (MSG_DATA + 1)#define MSG_MSG_LAST_BLOCK    (MSG_DATA + 2)/* Types used to target specific destinations */#define MSGQ_PARENT           (1 << 0)#define MSGQ_CHILD            (1 << 1)#define MSGQ_GRANDCHILD       (1 << 2)/* Should it be sync or async */#define MSGQ_MODE_ASYNC       0#define MSGQ_MODE_SYNC        1/* * Define the data structure that will be passed aroun. * As a reminder, the structure will be pickeled as: *    (int)MsgCode, (int)length, (unsigned char *)payload * It is understood that length must include null for strings. */typedef struct _qmsg{  /* This is the value used for picking a recipient  */  int msgQ ;  int msgType ;  int msgCode ;  union  {    int iValue ;    unsigned char *cValue ;  } data ;  enum {iValue = 0xF1, cValue = 0x8E} datType ;  int mode ;            /* Async/Sync mode flag */  int length ;} qMsg ;/* * This structure is used to pass data attributes through the message * queue.  This strcture will preceed any actual payload data.  This way * we can easily carry context data as well as generic payload specific * attributes with each packet. */typedef struct _qpayload{  int msgCode ;  pid_t pid ;  long psize ;    /* part size */  long tsize ;    /* total size */  long sequence ;  time_t timed ;  long magic ;} qPayload ;/* This structure is realy a container class for a collection * of q messages.  It's sole purpose is to reconstruct a stream * from smaller messages. */typedef struct _qstream{  struct _qstream *prev ;  struct _qstream *next ;  struct _qpayload *payload ;  struct _qmsg *msg ;} qStream ;#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -