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.
469 lines
13 KiB
469 lines
13 KiB
13 years ago
|
//
|
||
|
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
|
||
|
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
|
||
|
// may also apply
|
||
|
|
||
|
|
||
|
// Generated by preSip
|
||
12 years ago
|
// module tdeabc version KDE_3_4_3
|
||
13 years ago
|
|
||
|
|
||
|
// This software is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU General Public License as
|
||
|
// published by the Free Software Foundation; either version 2 of
|
||
|
// the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This software is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
// GNU General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU General Public
|
||
|
// License along with this library; see the file COPYING.
|
||
|
// If not, write to the Free Software Foundation, Inc.,
|
||
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||
|
|
||
12 years ago
|
namespace TDEABC
|
||
13 years ago
|
{
|
||
|
|
||
|
class Addressee
|
||
|
{
|
||
|
%TypeHeaderCode
|
||
|
#include <addressee.h>
|
||
|
%End
|
||
|
|
||
|
|
||
|
public:
|
||
12 years ago
|
//ig typedef TQValueList<TDEABC::Addressee> List;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_4_2 - )
|
||
12 years ago
|
typedef TQMap<TQString,TDEABC::Addressee> Map;
|
||
13 years ago
|
%End
|
||
|
|
||
|
Addressee ();
|
||
12 years ago
|
Addressee (const TDEABC::Addressee&);
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
12 years ago
|
bool operator == (const TDEABC::Addressee&) const;
|
||
|
bool operator != (const TDEABC::Addressee&) const;
|
||
13 years ago
|
%End
|
||
|
|
||
|
bool isEmpty () const;
|
||
13 years ago
|
void setUid (const TQString&);
|
||
|
TQString uid () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString uidLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setName (const TQString&);
|
||
|
TQString name () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString nameLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setFormattedName (const TQString&);
|
||
|
TQString formattedName () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString formattedNameLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setFamilyName (const TQString&);
|
||
|
TQString familyName () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString familyNameLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setGivenName (const TQString&);
|
||
|
TQString givenName () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString givenNameLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setAdditionalName (const TQString&);
|
||
|
TQString additionalName () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString additionalNameLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setPrefix (const TQString&);
|
||
|
TQString prefix () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString prefixLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setSuffix (const TQString&);
|
||
|
TQString suffix () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString suffixLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setNickName (const TQString&);
|
||
|
TQString nickName () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString nickNameLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setBirthday (const TQDateTime&);
|
||
|
TQDateTime birthday () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString birthdayLabel ();
|
||
|
static TQString homeAddressStreetLabel ();
|
||
|
static TQString homeAddressLocalityLabel ();
|
||
|
static TQString homeAddressRegionLabel ();
|
||
|
static TQString homeAddressPostalCodeLabel ();
|
||
|
static TQString homeAddressCountryLabel ();
|
||
|
static TQString homeAddressLabelLabel ();
|
||
|
static TQString businessAddressStreetLabel ();
|
||
|
static TQString businessAddressLocalityLabel ();
|
||
|
static TQString businessAddressRegionLabel ();
|
||
|
static TQString businessAddressPostalCodeLabel ();
|
||
|
static TQString businessAddressCountryLabel ();
|
||
|
static TQString businessAddressLabelLabel ();
|
||
|
static TQString homePhoneLabel ();
|
||
|
static TQString businessPhoneLabel ();
|
||
|
static TQString mobilePhoneLabel ();
|
||
|
static TQString homeFaxLabel ();
|
||
|
static TQString businessFaxLabel ();
|
||
|
static TQString carPhoneLabel ();
|
||
|
static TQString isdnLabel ();
|
||
|
static TQString pagerLabel ();
|
||
|
static TQString emailLabel ();
|
||
|
%End
|
||
|
|
||
|
void setMailer (const TQString&);
|
||
|
TQString mailer () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString mailerLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
void setTimeZone (const TDEABC::TimeZone&);
|
||
|
TDEABC::TimeZone timeZone () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString timeZoneLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
void setGeo (const TDEABC::Geo&);
|
||
|
TDEABC::Geo geo () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString geoLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setTitle (const TQString&);
|
||
|
TQString title () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString titleLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setRole (const TQString&);
|
||
|
TQString role () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString roleLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setOrganization (const TQString&);
|
||
|
TQString organization () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString organizationLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setNote (const TQString&);
|
||
|
TQString note () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString noteLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setProductId (const TQString&);
|
||
|
TQString productId () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString productIdLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setRevision (const TQDateTime&);
|
||
|
TQDateTime revision () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString revisionLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setSortString (const TQString&);
|
||
|
TQString sortString () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString sortStringLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
|
void setUrl (const KURL&);
|
||
|
KURL url () const;
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static TQString urlLabel ();
|
||
12 years ago
|
void setSecrecy (const TDEABC::Secrecy&);
|
||
|
TDEABC::Secrecy secrecy () const;
|
||
13 years ago
|
static TQString secrecyLabel ();
|
||
12 years ago
|
void setLogo (const TDEABC::Picture&);
|
||
|
TDEABC::Picture logo () const;
|
||
13 years ago
|
static TQString logoLabel ();
|
||
12 years ago
|
void setPhoto (const TDEABC::Picture&);
|
||
|
TDEABC::Picture photo () const;
|
||
13 years ago
|
static TQString photoLabel ();
|
||
12 years ago
|
void setSound (const TDEABC::Sound&);
|
||
|
TDEABC::Sound sound () const;
|
||
13 years ago
|
static TQString soundLabel ();
|
||
12 years ago
|
void setAgent (const TDEABC::Agent&);
|
||
|
TDEABC::Agent agent () const;
|
||
13 years ago
|
static TQString agentLabel ();
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
void setNameFromString (const TQString&);
|
||
|
TQString realName () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
TQString assembledName () const;
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
TQString fullEmail (const TQString& = TQString ::null ) const;
|
||
|
void insertEmail (const TQString&, bool = 0);
|
||
|
void removeEmail (const TQString&);
|
||
|
TQString preferredEmail () const;
|
||
|
TQStringList emails () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_4_2 - )
|
||
13 years ago
|
void setEmails (const TQStringList&);
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
void insertPhoneNumber (const TDEABC::PhoneNumber&);
|
||
|
void removePhoneNumber (const TDEABC::PhoneNumber&);
|
||
|
TDEABC::PhoneNumber phoneNumber (int) const;
|
||
|
TDEABC::PhoneNumber::List phoneNumbers () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
12 years ago
|
TDEABC::PhoneNumber::List phoneNumbers (int) const;
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
TDEABC::PhoneNumber findPhoneNumber (const TQString&) const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
12 years ago
|
void insertKey (const TDEABC::Key&);
|
||
|
void removeKey (const TDEABC::Key&);
|
||
|
TDEABC::Key key (int, TQString = TQString ::null ) const;
|
||
|
TDEABC::Key::List keys () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_4_2 - )
|
||
12 years ago
|
void setKeys (const TDEABC::Key::List&);
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
TDEABC::Key::List keys (int, TQString = TQString ::null ) const;
|
||
|
TDEABC::Key findKey (const TQString&) const;
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
void insertAddress (const TDEABC::Address&);
|
||
|
void removeAddress (const TDEABC::Address&);
|
||
|
TDEABC::Address address (int) const;
|
||
|
TDEABC::Address::List addresses () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
12 years ago
|
TDEABC::Address::List addresses (int) const;
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
TDEABC::Address findAddress (const TQString&) const;
|
||
13 years ago
|
void insertCategory (const TQString&);
|
||
|
void removeCategory (const TQString&);
|
||
|
bool hasCategory (const TQString&) const;
|
||
|
void setCategories (const TQStringList&);
|
||
|
TQStringList categories () const;
|
||
|
void insertCustom (const TQString&, const TQString&, const TQString&);
|
||
|
void removeCustom (const TQString&, const TQString&);
|
||
|
TQString custom (const TQString&, const TQString&) const;
|
||
|
void setCustoms (const TQStringList&);
|
||
|
TQStringList customs () const;
|
||
13 years ago
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
static void parseEmailAddress (const TQString&, TQString&, TQString&);
|
||
13 years ago
|
%End
|
||
|
|
||
|
void dump () const;
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
13 years ago
|
TQString asString () const;
|
||
12 years ago
|
void setResource (TDEABC::Resource*);
|
||
|
TDEABC::Resource* resource () const;
|
||
13 years ago
|
void setChanged (bool);
|
||
|
bool changed () const;
|
||
|
|
||
|
%If ( KDE_3_4_2 - )
|
||
12 years ago
|
static void setSortMode (TDEABC::SortMode*);
|
||
|
bool operator < (const TDEABC::Addressee&);
|
||
13 years ago
|
%End
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}; // class Addressee
|
||
|
|
||
|
|
||
|
%If ( KDE_3_1_0 - )
|
||
12 years ago
|
//igx TQDataStream& operator << (TQDataStream&, const TDEABC::Addressee&);
|
||
|
//igx TQDataStream& operator >> (TQDataStream&, TDEABC::Addressee&);
|
||
13 years ago
|
%End
|
||
|
|
||
12 years ago
|
}; // namespace TDEABC
|
||
13 years ago
|
|
||
|
|
||
|
|
||
12 years ago
|
%MappedType TDEABC::Addressee::List
|
||
|
//converts a Python list of TDEABC::Addressee
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqvaluelist.h>
|
||
12 years ago
|
//typedef TQValueList<TDEABC::Addressee> List;
|
||
13 years ago
|
%End
|
||
|
|
||
|
%ConvertFromTypeCode
|
||
|
if (!sipCpp)
|
||
|
return PyList_New(0);
|
||
|
|
||
|
// Create the list
|
||
|
PyObject *pylist;
|
||
|
if ((pylist = PyList_New(0)) == NULL)
|
||
|
return NULL;
|
||
|
|
||
12 years ago
|
TQValueList<TDEABC::Addressee> *cpplist = (TQValueList<TDEABC::Addressee> *)sipCpp;
|
||
13 years ago
|
PyObject *inst;
|
||
|
|
||
|
// Get it.
|
||
12 years ago
|
TQValueList<TDEABC::Addressee>::Iterator it;
|
||
13 years ago
|
for( it = cpplist->begin(); it != cpplist->end(); ++it )
|
||
|
{
|
||
12 years ago
|
if (((inst = sipConvertFromNewType(new TDEABC::Addressee (*it), sipType_TDEABC_Addressee, NULL)) == NULL)
|
||
13 years ago
|
|| PyList_Append (pylist, inst) < 0)
|
||
|
{
|
||
|
Py_DECREF (pylist);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return pylist;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%ConvertToTypeCode
|
||
|
if (sipIsErr == NULL)
|
||
|
return PyList_Check(sipPy);
|
||
|
|
||
12 years ago
|
TQValueList<TDEABC::Addressee> *cpplist = new TQValueList<TDEABC::Addressee>;
|
||
13 years ago
|
|
||
|
PyObject *elem;
|
||
12 years ago
|
TDEABC::Addressee *cpp;
|
||
13 years ago
|
int iserr = 0;
|
||
|
|
||
|
for (int i = 0; i < PyList_Size (sipPy); i++)
|
||
|
{
|
||
|
elem = PyList_GET_ITEM (sipPy, i);
|
||
12 years ago
|
cpp = (TDEABC::Addressee *)sipForceConvertToType(elem, sipType_TDEABC_Addressee, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
|
||
13 years ago
|
|
||
|
if (iserr)
|
||
|
{
|
||
|
*sipIsErr = 1;
|
||
|
delete cpplist;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
cpplist->append (*cpp);
|
||
|
}
|
||
|
|
||
|
*sipCppPtr = cpplist;
|
||
|
|
||
|
return 1;
|
||
|
%End
|
||
|
};
|
||
|
|
||
12 years ago
|
%MappedType TDEABC::Address::List
|
||
|
//converts a Python list of TDEABC::Address
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqvaluelist.h>
|
||
12 years ago
|
//typedef TQValueList<TDEABC::Address> List;
|
||
13 years ago
|
%End
|
||
|
|
||
|
%ConvertFromTypeCode
|
||
|
if (!sipCpp)
|
||
|
return PyList_New(0);
|
||
|
|
||
|
// Create the list
|
||
|
PyObject *pylist;
|
||
|
if ((pylist = PyList_New(0)) == NULL)
|
||
|
return NULL;
|
||
|
|
||
12 years ago
|
TQValueList<TDEABC::Address> *cpplist = (TQValueList<TDEABC::Address> *)sipCpp;
|
||
13 years ago
|
PyObject *inst;
|
||
|
|
||
|
// Get it.
|
||
12 years ago
|
TQValueList<TDEABC::Address>::Iterator it;
|
||
13 years ago
|
for( it = cpplist->begin(); it != cpplist->end(); ++it )
|
||
|
{
|
||
12 years ago
|
if (((inst = sipConvertFromNewType(new TDEABC::Address (*it), sipType_TDEABC_Address, NULL)) == NULL)
|
||
13 years ago
|
|| PyList_Append (pylist, inst) < 0)
|
||
|
{
|
||
|
Py_DECREF (pylist);
|
||
|
return NULL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return pylist;
|
||
|
%End
|
||
|
|
||
|
|
||
|
%ConvertToTypeCode
|
||
|
if (sipIsErr == NULL)
|
||
|
return PyList_Check(sipPy);
|
||
|
|
||
12 years ago
|
TQValueList<TDEABC::Address> *cpplist = new TQValueList<TDEABC::Address>;
|
||
13 years ago
|
|
||
|
PyObject *elem;
|
||
12 years ago
|
TDEABC::Address *cpp;
|
||
13 years ago
|
int iserr = 0;
|
||
|
|
||
|
for (int i = 0; i < PyList_Size (sipPy); i++)
|
||
|
{
|
||
|
elem = PyList_GET_ITEM (sipPy, i);
|
||
12 years ago
|
cpp = (TDEABC::Address *)sipForceConvertToType(elem, sipType_TDEABC_Address, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
|
||
13 years ago
|
|
||
|
if (iserr)
|
||
|
{
|
||
|
*sipIsErr = 1;
|
||
|
delete cpplist;
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
cpplist->append (*cpp);
|
||
|
}
|
||
|
|
||
|
*sipCppPtr = cpplist;
|
||
|
|
||
|
return 1;
|
||
|
%End
|
||
|
};
|
||
|
|