[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kmail-devel
Subject:    Fwd: Re: New code for KmailCvt
From:       Hans Dijkema <h.dijkema () hum ! org>
Date:       2000-09-29 18:51:27
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----

Hi fellow kmail developers,

Is there someone who could insert (and if 
possible dry test) the dcop code I've added
to the kmail kernel component to make the
connection between KmailCvt and Kmail?

Best whishes,
Hans Dijkema

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBOdTlBFR9sBLZYUt9AQEG7AP/fXdqsk2xzfZZl9N6Etn004IIE+LCBRIn
ppxvJCsEBVlqJR10DXE23Asq64hSjF1+RZkQl2UgVvXqaNjk3vg7dvdZ7BovLH3F
XzPE1Hpb5M/RC7XylVD8sXc43GPVm5pD1i8NKcllRYSI6fQFTOMSk0iazgDnbAZ8
lczzzrYs3vE=
=DO7X
-----END PGP SIGNATURE-----

["kmailIface.h.diff" (text/english)]

--- kmailIface.h	Mon Sep 25 12:12:06 2000
+++ ../kmail/kmailIface.h	Sat Sep  2 22:13:26 2000
@@ -28,24 +28,6 @@
                             QString comment) = 0;
   virtual int setBody (int composerId, QString body) = 0;
   virtual int ready() = 0; //1=yes, 0=no
-// 
-// Hans Dijkema <h.dijkema@hum.org> 
-//   added addMessage() function, which creates a folder if it doesn't
-//   exist (only in the root). And adds messages to the folder.
-//
-#include <stdio.h>
-  virtual INT32 dcopAddMessage(QString foldername,KURL url);
-//
-//  pre : true
-//  post: =1, message added to folder, if folder doesn't exist, folder
-//            has been created.
-//        =0, an error occured.
-//        =-1, couldn't create folder and it didn't exist
-//        =-2, couldn't read messageFile.
-//        =-3, Can't allocate memory.
-//
-// Hans Dijkema <h.dijkema@hum.org> 
-//
 };
 
 #endif

["kmkernel.cpp.diff" (text/plain)]

--- kmkernel.cpp	Sat Sep 23 10:47:51 2000
+++ ../kmail/kmkernel.cpp	Sat Sep  2 22:13:29 2000
@@ -137,63 +137,6 @@
   return 1;
 }
 
-//
-// Hans Dijkema <h.dijkema@hum.org>
-//
-#include <mimelib/message.h>
-#define DCOPADDMSG_BUF  16384
-
-INT32 KMKernel::dcopAddMessage(QString foldername,KURL msgUrl)
-{
-char buf[DCOPADDMSG_BUF];
-unsigned long len;
-FILE *msgFile;
-
-  kdDebug() << "KMKernel::dcopAddMessage called" << endl;
-
-  if (!msgUrl.isEmpty() && msgUrl.sLocalFile()) {
-
-    msgFile=fopen(msgUrl.path(),"rb");
-    if (msgFile==NULL) { return -2; }
-
-    DwString *dwMsg=new DwString;
-    if (dwMsg==NULL) { return -3; }
-
-    fseek(msgFile,0,SEEK_END);
-    len=ftell(msgFile);
-    fseek(msgFile,0,SEEK_SET);
-
-    while(len>DCOPADDMSG_BUF) {
-      fread(buf,DCOPADDMSG_BUF,1,msgBuf);
-      len-=DCOPADDMSG_BUF;
-      dwMsg->append(buf,DCOPADDMSG_BUF);
-    }
-    fread(buf,len,1,msgBuf);
-    dwMsg->append(buf,len);
-    
-    fclose(msgFile);
-
-    DwMessage *msg=new DwMessage(*dwMsg);
-    delete dwMsg;
-    if (msg==NULL) { return -3; }
- 
-    KMMessage *M=new KMMessage(msg);
-    delete msg;
-
-    KMFolder  *F=the_folderMgr->findOrCreate(foldername);
-
-    if (F==NULL) { return -1; }
-    if (F->addMsg(M)==0) { return 1; }
-    else { return -2; }
-  }
-  else {
-    return -2
-  }
-}
-//
-// Hans Dijkema <h.dijkema@hum.org>
-//
-
 /********************************************************************/
 /*                        Kernel methods                            */
 /********************************************************************/

["kmkernel.h.diff" (text/x-c++)]

--- kmkernel.h	Sat Sep 23 10:41:18 2000
+++ ../kmail/kmkernel.h	Sat Sep  2 22:13:30 2000
@@ -43,9 +43,6 @@
   int send(int composerId, int how); //0=now, 1=later
   int addAttachment(int composerId, KURL url, QString comment);
   int setBody (int composerId, QString body);
-// Hans Dijkema <h.dijkema@hum.org>
-  INT32 dcopAddMessage(QString foldername, KURL messageFile);
-// Hans Dijkema <h.dijkema@hum.org>
   // normal control stuff
 
   static KMKernel *self() { return mySelf; }

_______________________________________________
Kmail Developers mailing list
Kmail@master.kde.org
http://master.kde.org/mailman/listinfo/kmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic