6 #include <tdeapplication.h> 7 #include <dcopclient.h> 8 #include <tdecmdlineargs.h> 11 #include <kmailIface_stub.h> 12 #include <mailcomposerIface_stub.h> 14 int main( int argc, char **argv) 16 kdDebug(5006) << "Test KMail DCOP interface." << endl; 18 TDEAboutData aboutData( "testKMailDCOP", 19 "Test for KMail DCOP interface", "0.0" ); 20 TDECmdLineArgs::init(argc, argv, &aboutData); 22 app.dcopClient()->attach(); 24 KMailIface_stub kmailStub( "kmail", "KMailIface"); 26 kmailStub.openComposer( "to 1", "", "", "First test", "simple openComp call",0, 29 DCOPRef ref = kmailStub.openComposer( "to 2", "", "", "Second test", 31 MailComposerIface_stub composerStub(ref.app(),ref.object()); 32 TQCString data = "BEGIN:VCALENDAR\nEND:VCALENDAR"; 33 composerStub.addAttachment( "test.ics", "7bit",data, "text", "calendar", "method", 34 "publish", "attachement;"); 37 kdDebug(5006) << "testDCOP done." << endl;
|