notice.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // This file is part of BOINC.
  2. // http://boinc.berkeley.edu
  3. // Copyright (C) 2014 University of California
  4. //
  5. // BOINC is free software; you can redistribute it and/or modify it
  6. // under the terms of the GNU Lesser General Public License
  7. // as published by the Free Software Foundation,
  8. // either version 3 of the License, or (at your option) any later version.
  9. //
  10. // BOINC is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. // See the GNU Lesser General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU Lesser General Public License
  16. // along with BOINC. If not, see <http://www.gnu.org/licenses/>.
  17. #ifndef BOINC_NOTICE_H
  18. #define BOINC_NOTICE_H
  19. #include <string>
  20. #include "parse.h"
  21. // represents a notice delivered from client to GUI
  22. class NOTICE {
  23. public:
  24. int seqno;
  25. char title[256];
  26. std::string description;
  27. double create_time;
  28. double arrival_time; // when item arrived at client
  29. bool is_private;
  30. char category[64];
  31. // assigned by RSS source. Reserved values:
  32. // "client": generated by client
  33. // "server": scheduler RPC message
  34. char link[256];
  35. // URL where original message can be seen, if any
  36. char project_name[64];
  37. // if notice is associated with a project
  38. bool is_youtube_video;
  39. // set if the text includes "youtube.com"
  40. // the following fields used in client only (not reported to GUI)
  41. char guid[256];
  42. char feed_url[256];
  43. // URL of RSS feed, or blank
  44. bool keep;
  45. // temp used when adding new notices
  46. NOTICE();
  47. ~NOTICE();
  48. int parse(XML_PARSER&);
  49. int parse_rss(XML_PARSER&);
  50. void write(MIOFILE&, bool for_gui);
  51. void clear();
  52. };
  53. #endif