mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
192 lines
4.4 KiB
C
192 lines
4.4 KiB
C
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
*
|
|
* The contents of this file are subject to the Netscape Public
|
|
* License Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License. You may obtain a copy of
|
|
* the License at http://www.mozilla.org/NPL/
|
|
*
|
|
* Software distributed under the License is distributed on an "AS
|
|
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
* implied. See the License for the specific language governing
|
|
* rights and limitations under the License.
|
|
*
|
|
* The Original Code is mozilla.org code.
|
|
*
|
|
* The Initial Developer of the Original Code is Netscape
|
|
* Communications Corporation. Portions created by Netscape are
|
|
* Copyright (C) 1998 Netscape Communications Corporation. All
|
|
* Rights Reserved.
|
|
*
|
|
* Contributor(s):
|
|
*/
|
|
|
|
/*
|
|
addrbk.h --- X-specific headers for the front end.
|
|
Created: Tao Cheng <tao@netscape.com>, 10-nov-96.
|
|
*/
|
|
#ifndef _ADDRBK_H_
|
|
#define _ADDRBK_H_
|
|
|
|
#include "addrbook.h"
|
|
#include "abcom.h"
|
|
#include "xfe.h"
|
|
|
|
#define AB_MAX_ENTRIES 175000
|
|
#define AB_MAX_STRLEN 1024
|
|
|
|
#if !defined(EMPTY_STRVAL)
|
|
#define EMPTY_STRVAL(value) \
|
|
(!(value) || !((value)->u.string) || !XP_STRLEN(((value)->u.string)))
|
|
|
|
#endif
|
|
|
|
#ifndef IS_AB_PANE_CMD
|
|
#define IS_AB_PANE_CMD(command) \
|
|
((command == xfeCmdComposeMessage) || \
|
|
(command == xfeCmdComposeMessagePlain) || \
|
|
(command == xfeCmdComposeMessageHTML) || \
|
|
\
|
|
(command == xfeCmdImport) || \
|
|
(command == xfeCmdSaveAs) || \
|
|
\
|
|
(command == xfeCmdClose) || \
|
|
\
|
|
(command == xfeCmdUndo) || \
|
|
(command == xfeCmdRedo) || \
|
|
\
|
|
(command == xfeCmdABDeleteAllEntries) || \
|
|
\
|
|
(command == xfeCmdABByType) || \
|
|
(command == xfeCmdABByName) || \
|
|
(command == xfeCmdABByEmailAddress) || \
|
|
(command == xfeCmdABByNickName) || \
|
|
(command == xfeCmdABByCompany) || \
|
|
(command == xfeCmdABByLocality) || \
|
|
\
|
|
(command == xfeCmdSortAscending) || \
|
|
(command == xfeCmdSortDescending) || \
|
|
\
|
|
(command == xfeCmdAddToAddressBook) || \
|
|
(command == xfeCmdABNewList) || \
|
|
\
|
|
(command == xfeCmdABCall) \
|
|
)
|
|
|
|
#endif /* IS_AB_PANE_CMD */
|
|
|
|
#ifndef IS_CONTAINER_PANE_CMD
|
|
#define IS_CONTAINER_PANE_CMD(command) \
|
|
((command == xfeCmdABNewPAB) || \
|
|
(command == xfeCmdABNewLDAPDirectory)\
|
|
)
|
|
#endif /* IS_CONTAINER_PANE_CMD */
|
|
|
|
#ifndef IS_2_PANE_CMD
|
|
#define IS_2_PANE_CMD(command) \
|
|
((command == xfeCmdShowPopup) || \
|
|
(command == xfeCmdABDeleteEntry) || \
|
|
(command == xfeCmdABEditEntry) ||\
|
|
(command == xfeCmdViewProperties)\
|
|
)
|
|
#endif /* IS_2_PANE_CMD */
|
|
|
|
typedef struct fe_addrbk_data
|
|
{
|
|
|
|
ABPane *abpane;
|
|
ABID editUID;
|
|
ABID editLID;
|
|
|
|
feABtype type;
|
|
|
|
Widget mcwin;
|
|
Widget outline;
|
|
Widget edituser; /* Edit user container widget */
|
|
|
|
/* Personal Folder */
|
|
Widget edituser_p;
|
|
Widget edituser_p_fn;
|
|
Widget edituser_p_mi;
|
|
Widget edituser_p_ln;
|
|
Widget edituser_p_org;
|
|
Widget edituser_p_desp;
|
|
Widget edituser_p_locality;
|
|
Widget edituser_p_region;
|
|
Widget edituser_p_nickname;
|
|
Widget edituser_p_em;
|
|
|
|
/* Security Folder */
|
|
Widget edituser_b;
|
|
Widget edituser_b_text;
|
|
|
|
/* Edit list stuff */
|
|
Widget editlist;
|
|
Widget editlist_m;
|
|
Widget editlist_m_nickname;
|
|
Widget editlist_m_name;
|
|
Widget editlist_m_desp;
|
|
Widget editlist_m_members;
|
|
|
|
/* General window */
|
|
Widget title;
|
|
Widget nickname;
|
|
Widget name;
|
|
Widget lname;
|
|
Widget mname;
|
|
|
|
/* tool bar stuff */
|
|
Widget queryText;
|
|
Widget helpBar;
|
|
|
|
/* find stuff */
|
|
Widget findshell;
|
|
Widget findtext;
|
|
Widget findnicknameT;
|
|
Widget findnameT;
|
|
Widget findlocationT;
|
|
Widget finddescriptionT;
|
|
Widget findcaseT;
|
|
Widget findwordT;
|
|
|
|
Widget popup; /* addrbook popup menu */
|
|
} fe_addrbk_data;
|
|
|
|
/* define callback proc and struc
|
|
*/
|
|
|
|
typedef enum {
|
|
TO = 0,
|
|
CC,
|
|
BCC,
|
|
REPLYTO,
|
|
FOLLOWUPTO,
|
|
NEWSGROUP
|
|
} SEND_STATUS;
|
|
|
|
typedef struct {
|
|
SEND_STATUS status;
|
|
DIR_Server *dir;
|
|
ABID id;
|
|
char *emailAddr;
|
|
char *dplyStr;
|
|
ABID type;
|
|
} StatusID_t;
|
|
|
|
typedef struct {
|
|
StatusID_t** m_pairs;
|
|
int m_count;
|
|
} ABAddrMsgCBProcStruc;
|
|
|
|
typedef void (*ABAddrMsgCBProc)(ABAddrMsgCBProcStruc* clientData,
|
|
void* callData);
|
|
|
|
XP_BEGIN_PROTOS
|
|
|
|
void
|
|
fe_showAddrMSGDlg(Widget toplevel,
|
|
ABAddrMsgCBProc proc, void* callData, MWContext *context);
|
|
|
|
XP_END_PROTOS
|
|
|
|
#endif /* _ADDRBK_H_ */
|