Added Net library to contrib
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11431 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
43
contrib/include/wx/net/email.h
Normal file
43
contrib/include/wx/net/email.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: email.h
|
||||
// Purpose: wxEmail: portable email client class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "email.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_EMAIL_H_
|
||||
#define _WX_EMAIL_H_
|
||||
|
||||
#include "wx/net/msg.h"
|
||||
|
||||
/*
|
||||
* wxEmail
|
||||
* Miscellaneous email functions
|
||||
*/
|
||||
|
||||
class wxEmail
|
||||
{
|
||||
public:
|
||||
//// Ctor/dtor
|
||||
wxEmail() {};
|
||||
|
||||
//// Operations
|
||||
|
||||
// Send a message.
|
||||
// Specify profile, or leave it to wxWindows to find the current user name
|
||||
static bool Send(wxMailMessage& message, const wxString& profileName = wxEmptyString );
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif //_WX_EMAIL_H_
|
||||
|
67
contrib/include/wx/net/msg.h
Normal file
67
contrib/include/wx/net/msg.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msg.h
|
||||
// Purpose: wxMailMessage
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "msg.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_MSG_H_
|
||||
#define _WX_MSG_H_
|
||||
|
||||
/*
|
||||
* wxMailMessage
|
||||
* Encapsulates an email message
|
||||
*/
|
||||
|
||||
class wxMailMessage
|
||||
{
|
||||
public:
|
||||
|
||||
// A common usage
|
||||
wxMailMessage(const wxString& subject, const wxString& to,
|
||||
const wxString& body, const wxString& attachment = wxEmptyString,
|
||||
const wxString& attachmentTitle = wxEmptyString)
|
||||
{
|
||||
m_to.Add(to);
|
||||
m_subject = subject;
|
||||
m_body = body;
|
||||
if (!attachment.IsEmpty())
|
||||
{
|
||||
m_attachments.Add(attachment);
|
||||
m_attachmentTitles.Add(attachmentTitle);
|
||||
}
|
||||
}
|
||||
|
||||
wxMailMessage() {};
|
||||
|
||||
//// Accessors
|
||||
|
||||
void AddTo(const wxString& to) { m_to.Add(to); }
|
||||
void AddCc(const wxString& cc) { m_cc.Add(cc); }
|
||||
void AddBcc(const wxString& bcc) { m_bcc.Add(bcc); }
|
||||
void AddAttachment(const wxString& attach, const wxString& title = wxEmptyString)
|
||||
{ m_attachments.Add(attach); m_attachmentTitles.Add(title); }
|
||||
|
||||
void SetSubject(const wxString& subject) { m_subject = subject; }
|
||||
void SetBody(const wxString& body) { m_body = body; }
|
||||
|
||||
public:
|
||||
wxArrayString m_to; //The To: Recipients
|
||||
wxArrayString m_cc; //The CC: Recipients
|
||||
wxArrayString m_bcc; //The BCC Recipients
|
||||
wxString m_subject; //The Subject of the message
|
||||
wxString m_body; //The Body of the message
|
||||
wxArrayString m_attachments; //Files to attach to the email
|
||||
wxArrayString m_attachmentTitles; //Titles to use for the email file attachments
|
||||
};
|
||||
|
||||
#endif // _WX_MSG_H_
|
||||
|
56
contrib/include/wx/net/smapi.h
Normal file
56
contrib/include/wx/net/smapi.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: smapi.h
|
||||
// Purpose: Simple MAPI classes
|
||||
// Author: PJ Naughter <pjna@naughter.com>
|
||||
// Modified by: Julian Smart
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) PJ Naughter
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "smapi.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_SMAPI_H_
|
||||
#define _WX_SMAPI_H_
|
||||
|
||||
#include "wx/net/msg.h"
|
||||
|
||||
class wxMapiData;
|
||||
|
||||
//The class which encapsulates the MAPI connection
|
||||
class wxMapiSession
|
||||
{
|
||||
public:
|
||||
//Constructors / Destructors
|
||||
wxMapiSession();
|
||||
~wxMapiSession();
|
||||
|
||||
//Logon / Logoff Methods
|
||||
bool Logon(const wxString& sProfileName, const wxString& sPassword = wxEmptyString, wxWindow* pParentWnd = NULL);
|
||||
bool LoggedOn() const;
|
||||
bool Logoff();
|
||||
|
||||
//Send a message
|
||||
bool Send(wxMailMessage& message);
|
||||
|
||||
//General MAPI support
|
||||
bool MapiInstalled() const;
|
||||
|
||||
//Error Handling
|
||||
long GetLastError() const;
|
||||
|
||||
protected:
|
||||
//Methods
|
||||
void Initialise();
|
||||
void Deinitialise();
|
||||
bool Resolve(const wxString& sName, void* lppRecip1);
|
||||
|
||||
wxMapiData* m_data;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //_WX_SMAPI_H_
|
37
contrib/include/wx/net/web.h
Normal file
37
contrib/include/wx/net/web.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: web.h
|
||||
// Purpose: wxWeb: portable web browser-related class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 2001-08-21
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "web.h"
|
||||
#endif
|
||||
|
||||
#ifndef _WX_WEB_H_
|
||||
#define _WX_WEB_H_
|
||||
|
||||
/*
|
||||
* wxWeb
|
||||
* Miscellaneous web functions
|
||||
*/
|
||||
|
||||
class wxWeb
|
||||
{
|
||||
public:
|
||||
//// Ctor/dtor
|
||||
wxWeb() {};
|
||||
|
||||
//// Operations
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
||||
#endif //_WX_WEB_H_
|
||||
|
Reference in New Issue
Block a user