Version: 0.6.0
mailto.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: mail supported class for Linux
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2004 Roberto Majadas
7 * Copyright (C) 2005-2013 Bastien Nocera
8 * Copyright (C) 2014 Dmitry Baryshnikov
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22  ****************************************************************************/
23 #pragma once
24 
25 #include "wxgis/net/message.h"
26 
27 #ifdef wxGIS_HAVE_GTK_INTEGRATION
28 
29 typedef enum {
30  MAILER_UNKNOWN,
31  MAILER_EVO,
32  MAILER_BALSA,
33  MAILER_SYLPHEED,
34  MAILER_THUNDERBIRD,
35 } MailerType;
36 
44 class wxGISMailer
45 {
46 public:
47  wxGISMailer(void);
48  virtual ~wxGISMailer(void);
49  virtual bool Init();
50  virtual bool Send(const wxMailMessage& message);
51 protected:
52  virtual wxString GetEvoCmd() const;
53  wxString GetEvoMailto (const wxMailMessage& message) const;
54  wxString GetBalsaMailto (const wxMailMessage& message) const;
55  wxString GetThunderbirdMailto (const wxMailMessage& message) const;
56  wxString GetSylpheedMailto (const wxMailMessage& message) const;
57  wxString EscapeStrings(const wxString &sData) const;
58 protected:
59  MailerType m_eType;
60  wxString m_sCmd;
61 };
62 
63 #endif //wxGIS_HAVE_GTK_INTEGRATION