view lib-src/pop.h @ 12251:f2519a110e5f

The RCS status is now found by reading the master file directly, instead of using rlog. The properties retrieved from the master file are kept separately. The two main properties, `vc-workfile-version' and `vc-locking-user', are inferred from those master file properties if the information cannot be found elsehow. All properties are consistently cached now. (vc-master-info, vc-log-info, vc-fetch-properties): functions removed. Their job is now done by `vc-fetch-master-properties' and `vc-insert-file'. (vc-fetch-master-properties): new function, replaces vc-fetch-properties. Retrieves all the properties that can be found in the master file, for all three backends (calls `cvs status' in the CVS case). (vc-insert-file): new function. Inserts an arbitrary file into the current buffer, optionally chunkwise, until a certain regexp shows up. (vc-parse-locks): new function. Translates SCCS or RCS lock lists, as found in the master files, into lisp lists. Sets the new property `vc-master-locks'. (vc-locked-version): property removed. Was unnecessary, and only referenced in vc-hooks.el. (vc-head-version, vc-default-branch, vc-master-locks): new properties. (vc-top-version): new name for the old property `vc-branch-version'. ("top-version" is better because it might also be the RCS "head" if there is no default branch.) (vc-master-locking-user): replaces `vc-true-locking-user'. Scans the new `vc-master-locks' property, yielding the master file's idea of who is locking the current workfile version. (vc-locking-user): slightly changed to use the new properties. Changed the actual property value for an unlocked file to 'none. This is to distinguish it from an unknown locking state, which is represented by nil. The function vc-locking-user returns nil if the property is 'none, to make it compatible with the rest of VC. (vc-consult-rcs-headers, vc-master-locking-user): adpated to the new 'none-value of vc-locking-user. (vc-consult-rcs-headers): fixed bug that prevented (not vc-consult-headers) from working (vc-file-not-found-hook): set the default-directory of the new buffer before check-out. (Otherwise, setting vc-keep-workfiles to nil doesn't work.) (vc-occurences, vc-branch-p): functions removed (no longer needed) Reordered some defuns so they are grouped in a logical way.
author Richard M. Stallman <rms@gnu.org>
date Thu, 15 Jun 1995 23:06:45 +0000
parents 939488de5d3f
children ee40177f6c68
line wrap: on
line source

/* pop.h: Header file for the "pop.c" client POP3 protocol.
   Copyright (c) 1991,1993 Free Software Foundation, Inc.
   Written by Jonathan Kamens, jik@security.ov.com.

This file is part of GNU Emacs.

GNU Emacs 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, or (at your option)
any later version.

GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */

#include <stdio.h>

#define GETLINE_MIN 1024	/* the getline buffer starts out this */
				/* size */
#define GETLINE_INCR 1024	/* the getline buffer is grown by this */
				/* size when it needs to grow */

extern char pop_error[];
extern int pop_debug;

struct _popserver
{
  int file, data;
  char *buffer;
  int buffer_size, buffer_index;
  int in_multi;
};

typedef struct _popserver *popserver;

/*
 * Valid flags for the pop_open function.
 */

#define POP_NO_KERBEROS	(1<<0)
#define POP_NO_HESIOD	(1<<1)
#define POP_NO_GETPASS 	(1<<2)

#ifdef __STDC__
#define _ARGS(a) a
#else
#define _ARGS(a) ()
#endif

extern popserver pop_open _ARGS((char *host, char *username, char *password,
				 int flags));
extern int pop_stat _ARGS((popserver server, int *count, int *size));
extern int pop_list _ARGS((popserver server, int message, int **IDs,
			   int **size));
extern char *pop_retrieve _ARGS((popserver server, int message, int markfrom));
extern int pop_retrieve_first _ARGS((popserver server, int message,
				     char **response));
extern int pop_retrieve_next _ARGS((popserver server, char **line));
extern int pop_retrieve_flush _ARGS((popserver server));
extern int pop_top_first _ARGS((popserver server, int message, int lines,
				char **response));
extern int pop_top_next _ARGS((popserver server, char **line));
extern int pop_top_flush _ARGS((popserver server));
extern int pop_multi_first _ARGS((popserver server, char *command,
				  char **response));
extern int pop_multi_next _ARGS((popserver server, char **line));
extern int pop_multi_flush _ARGS((popserver server));
extern int pop_delete _ARGS((popserver server, int message));
extern int pop_noop _ARGS((popserver server));
extern int pop_last _ARGS((popserver server));
extern int pop_reset _ARGS((popserver server));
extern int pop_quit _ARGS((popserver server));
extern void pop_close _ARGS((popserver));

#undef _ARGS