TDE personal information management applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dcopdropif.h 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (C) 2004, Mart Kelder (mart.kde@hccnet.nl)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  17. */
  18. #ifndef DCOPDROPIF_H
  19. #define DCOPDROPIF_H
  20. #include <dcopobject.h>
  21. class DCOPDrop;
  22. /**
  23. * This DCOP-interface for the DCOPdrop.
  24. */
  25. class DCOPDropInterface : virtual public DCOPObject
  26. {
  27. K_DCOP
  28. public:
  29. /**
  30. * Constructor
  31. * @param drop The parent DCOPDrop
  32. * @param name The name of the dcop-object
  33. */
  34. DCOPDropInterface( DCOPDrop* drop, const char* name );
  35. /**
  36. * Destructor
  37. */
  38. ~DCOPDropInterface();
  39. /**
  40. * This function is used to change the dcop-name
  41. *
  42. * @param name The new name of this dcop interface.
  43. */
  44. void changeName( const TQString& name );
  45. k_dcop:
  46. /**
  47. * This function adds a message to list of new messages.
  48. *
  49. * @param subject The subject of the message
  50. * @param message The body of the message
  51. * @return The id which this message got
  52. */
  53. int addMessage( const TQString& subject, const TQString& message );
  54. /**
  55. * This function removes a message from the list of new messages.
  56. *
  57. * @param id The id of the message to be deleted. The id can be obtained in
  58. * the "addMessage" dcop call.
  59. */
  60. bool removeMessage( int id );
  61. private:
  62. DCOPDrop *_drop;
  63. };
  64. #endif