Plug-ins no longer need to include src/mailer.h

This commit is contained in:
Pierre Pronchery 2010-10-05 20:20:06 +00:00
parent 68ea731a78
commit cf975474af
9 changed files with 39 additions and 40 deletions

View File

@ -44,9 +44,9 @@ dist:
$(PACKAGE)-$(VERSION)/src/mailer.h \
$(PACKAGE)-$(VERSION)/src/gtkassistant.c \
$(PACKAGE)-$(VERSION)/src/project.conf \
$(PACKAGE)-$(VERSION)/src/account/imap4.c \
$(PACKAGE)-$(VERSION)/src/account/mbox.c \
$(PACKAGE)-$(VERSION)/src/account/pop3.c \
$(PACKAGE)-$(VERSION)/src/account/imap4.c \
$(PACKAGE)-$(VERSION)/src/account/nntp.c \
$(PACKAGE)-$(VERSION)/src/account/rss.c \
$(PACKAGE)-$(VERSION)/src/account/Makefile \

View File

@ -22,6 +22,7 @@
/* Mailer */
/* types */
typedef struct _Mailer Mailer;
@ -100,4 +101,23 @@ typedef struct _AccountPlugin
void * priv;
} AccountPlugin;
/* constants */
enum
{
MF_COL_ACCOUNT = 0, MF_COL_ENABLED, MF_COL_DELETE, MF_COL_FOLDER,
MF_COL_ICON, MF_COL_NAME
};
# define MF_COL_LAST MF_COL_NAME
# define MF_COL_COUNT (MF_COL_LAST + 1)
enum
{
MH_COL_ACCOUNT = 0, MH_COL_FOLDER, MH_COL_MESSAGE, MH_COL_PIXBUF,
MH_COL_SUBJECT, MH_COL_FROM, MH_COL_TO, MH_COL_DATE,
MH_COL_DATE_DISPLAY, MH_COL_READ
};
# define MH_COL_LAST MH_COL_READ
# define MH_COL_COUNT (MH_COL_LAST + 1)
#endif /* !MAILER_MAILER_H */

View File

@ -1,4 +1,4 @@
TARGETS = mbox.so pop3.so imap4.so nntp.so rss.so
TARGETS = imap4.so mbox.so pop3.so nntp.so rss.so
PREFIX = /usr/local
DESTDIR =
LIBDIR = $(PREFIX)/lib
@ -18,6 +18,13 @@ INSTALL = install
all: $(TARGETS)
imap4_OBJS = imap4.o
imap4_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
imap4_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
imap4.so: $(imap4_OBJS)
$(LD) -o imap4.so $(imap4_OBJS)
mbox_OBJS = mbox.o
mbox_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
mbox_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
@ -32,13 +39,6 @@ pop3_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
pop3.so: $(pop3_OBJS)
$(LD) -o pop3.so $(pop3_OBJS)
imap4_OBJS = imap4.o
imap4_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
imap4_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
imap4.so: $(imap4_OBJS)
$(LD) -o imap4.so $(imap4_OBJS)
nntp_OBJS = nntp.o
nntp_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
nntp_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
@ -53,15 +53,15 @@ rss_LDFLAGS = $(LDFLAGSF) $(LDFLAGS)
rss.so: $(rss_OBJS)
$(LD) -o rss.so $(rss_OBJS)
imap4.o: imap4.c account.h
$(CC) $(imap4_CFLAGS) -c imap4.c
mbox.o: mbox.c account.h
$(CC) $(mbox_CFLAGS) -c mbox.c
pop3.o: pop3.c account.h
$(CC) $(pop3_CFLAGS) -c pop3.c
imap4.o: imap4.c account.h
$(CC) $(imap4_CFLAGS) -c imap4.c
nntp.o: nntp.c account.h
$(CC) $(nntp_CFLAGS) -c nntp.c
@ -69,7 +69,7 @@ rss.o: rss.c account.h
$(CC) $(rss_CFLAGS) -c rss.c
clean:
$(RM) -- $(mbox_OBJS) $(pop3_OBJS) $(imap4_OBJS) $(nntp_OBJS) $(rss_OBJS)
$(RM) -- $(imap4_OBJS) $(mbox_OBJS) $(pop3_OBJS) $(nntp_OBJS) $(rss_OBJS)
distclean: clean
$(RM) -- $(TARGETS)

View File

@ -16,7 +16,7 @@
#include <stdlib.h>
#include "account.h"
#include "Mailer.h"
/* variables */

View File

@ -23,9 +23,7 @@
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include "account.h"
/* FIXME remove this */
#include "../mailer.h"
#include "Mailer.h"
#define min(a, b) ((a) < (b) ? (a) : (b))

View File

@ -16,7 +16,7 @@
#include <stdlib.h>
#include "account.h"
#include "Mailer.h"
/* variables */

View File

@ -1,4 +1,4 @@
targets=mbox,pop3,imap4,nntp,rss
targets=imap4,mbox,pop3,nntp,rss
cppflags_force=-I ../../include -I $(PREFIX)/include
cflags_force=-W -fPIC `pkg-config --cflags gtk+-2.0`
cflags=-Wall -g -O2 -pedantic

View File

@ -16,7 +16,7 @@
#include <stdlib.h>
#include "account.h"
#include "Mailer.h"
/* variables */

View File

@ -26,7 +26,7 @@
/* Mailer */
/* defaults */
/* constants */
# ifndef PLUGINDIR
# define PLUGINDIR LIBDIR "/Mailer"
# endif
@ -36,25 +36,6 @@
# define MAILER_MESSAGES_FONT "Monospace 8"
/* types */
enum
{
MF_COL_ACCOUNT = 0, MF_COL_ENABLED, MF_COL_DELETE, MF_COL_FOLDER,
MF_COL_ICON, MF_COL_NAME
};
# define MF_COL_LAST MF_COL_NAME
# define MF_COL_COUNT (MF_COL_LAST + 1)
enum
{
MH_COL_ACCOUNT = 0, MH_COL_FOLDER, MH_COL_MESSAGE, MH_COL_PIXBUF,
MH_COL_SUBJECT, MH_COL_FROM, MH_COL_TO, MH_COL_DATE,
MH_COL_DATE_DISPLAY, MH_COL_READ
};
# define MH_COL_LAST MH_COL_READ
# define MH_COL_COUNT (MH_COL_LAST + 1)
/* functions */
Mailer * mailer_new(void);
void mailer_delete(Mailer * mailer);