Software and Services, Portable Libraries  2019.Mar.01
A library for managing digital certificates
SoftwareAndServices::Library::UPN::UpnDbContactRecord Class Reference
+ Inheritance diagram for SoftwareAndServices::Library::UPN::UpnDbContactRecord:
+ Collaboration diagram for SoftwareAndServices::Library::UPN::UpnDbContactRecord:

Public Member Functions

 UpnDbContactRecord ()
 UpnDbContactRecord() - Default constructor. More...
 
virtual ~UpnDbContactRecord ()
 ~UpnDbContactRecord() - Destructor. More...
 
bool Add (UpnDbAuthHandle_t Auth, UpnDbCompanyDbId_t CompanyId, UpnDbUpnId_t ContactUpnId)
 Add a new UpnDbContact. More...
 
bool Add (UpnDbAuthHandle_t Auth)
 Add this object as a new record. More...
 
UpnDbAddressId_t AddressId () const
 
void AddressId (UpnDbAddressId_t CompId)
 Set the ADDRESS ID of the contact. More...
 
void CompanyDbId (UpnDbCompanyDbId_t CompId)
 Set the COMPANY ID (a database ID) to contact. More...
 
UpnDbUpnId_t CompanyDbId () const
 
UpnDbUpnId_t ContactUpnId () const
 
void ContactUpnId (UpnDbUpnId_t CompId)
 Set the UPN ID of the contact. More...
 
UpnDbUpnId_t CustomerUpnId () const
 
void CustomerUpnId (UpnDbUpnId_t CompId)
 Set the CUSTOMER ID (a UPN) to contact. More...
 
UpnDbEmailId_t EmailId () const
 
void EmailId (UpnDbEmailId_t CompId)
 Set the EMAIL ID of to contact. More...
 
bool EmailUpdates () const
 
void EmailUpdates (bool DoSend)
 Set if this contact get email message updates. More...
 
bool GetActive () const
 true when this record is active. More...
 
time_t GetCreated () const
 
UpnDbUpnId_t GetCreatedByUpnId () const
 
bool GetHasChanged () const
 
bool MarketingUpdates () const
 
void MarketingUpdates (bool DoSend)
 Set if this contact get marketing email. More...
 
UpnDbPhoneId_t PhoneId () const
 
void PhoneId (UpnDbPhoneId_t CompId)
 Set the PHONE ID of the contact. More...
 
bool Remove (UpnDbAuthHandle_t Auth)
 Remove this object. More...
 
void SetActive (bool IsActive)
 Indicate if this record is active. More...
 
bool SetCreated (String &TimeOut)
 
void SetCreatedByUpnId (UpnDbUpnId_t Creator)
 Set the created by UPN ID. More...
 
bool TextUpdates () const
 
void TextUpdates (bool DoSend)
 Set if this contact get text message updates. More...
 
bool Update (UpnDbAuthHandle_t Auth) const
 Update this record. More...
 
bool_t xdr (XDR *xdrs)
 Serialize/Deserialize this object over XDR. More...
 

Static Public Member Functions

static uint64_t Find (UpnDbAuthHandle_t Auth, const char *WildCard, UpnDbCompanyDbId_t CompanyId, std::list< const char *> &Results)
 Find matching contact, matching wild card. More...
 
static UpnDbUpnId_t GetSiteId ()
 
static uint64_t LoadAllForCompany (UpnDbAuthHandle_t Auth, UpnDbCompanyDbId_t CompanyId, std::list< UpnDbContactRecord *> &Results)
 Load contact record. More...
 
static void SetSiteId (UpnDbAuthHandle_t Auth, UpnDbUpnId_t SiteUpnId)
 Set the applications SITE ID. More...
 

Protected Member Functions

void SetCreated (time_t When)
 Set the created time. More...
 
void SetHasChanged (bool ItChanged)
 Set change state. More...
 

Detailed Description

Definition at line 68 of file UpnDbContactRecord.hpp.

Constructor & Destructor Documentation

◆ UpnDbContactRecord()

SoftwareAndServices::Library::UPN::UpnDbContactRecord::UpnDbContactRecord ( )

UpnDbContactRecord() - Default constructor.

◆ ~UpnDbContactRecord()

virtual SoftwareAndServices::Library::UPN::UpnDbContactRecord::~UpnDbContactRecord ( )
virtual

~UpnDbContactRecord() - Destructor.

Member Function Documentation

◆ Add() [1/2]

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::Add ( UpnDbAuthHandle_t  Auth,
UpnDbCompanyDbId_t  CompanyId,
UpnDbUpnId_t  ContactUpnId 
)

Add a new UpnDbContact.

Parameters
AuthAn authentiation handle.
CompanyIdThe Database ID of the company.
ContactUpnIdThe UPN ID of the contact.
Returns
The true when added, and ContactUpnId is a contact UPN.

◆ Add() [2/2]

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::Add ( UpnDbAuthHandle_t  Auth)
virtual

Add this object as a new record.

Parameters
AuthThe authentication handle to use.
Returns
true if added.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ AddressId() [1/2]

UpnDbAddressId_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::AddressId ( ) const
Returns
The ADDRESS ID of the contact. Or zero (0) when none.

◆ AddressId() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::AddressId ( UpnDbAddressId_t  CompId)

Set the ADDRESS ID of the contact.

Parameters
CompIdThe contact ADDRESS ID. Or zero (0) when none.

◆ CompanyDbId() [1/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::CompanyDbId ( UpnDbCompanyDbId_t  CompId)

Set the COMPANY ID (a database ID) to contact.

Parameters
CompIdThe company database ID.

◆ CompanyDbId() [2/2]

UpnDbUpnId_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::CompanyDbId ( ) const
Returns
The COMPANY ID (a database ID) to contact.

◆ ContactUpnId() [1/2]

UpnDbUpnId_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::ContactUpnId ( ) const
Returns
The UPN ID of the contact. A persons UPN ID.

◆ ContactUpnId() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::ContactUpnId ( UpnDbUpnId_t  CompId)

Set the UPN ID of the contact.

A persons UPN ID.

Parameters
CompIdThe contact UPN ID.

◆ CustomerUpnId() [1/2]

UpnDbUpnId_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::CustomerUpnId ( ) const
Returns
The CUSTOMER ID (a UPN) to contact. The UPN ID of the company to contact.

◆ CustomerUpnId() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::CustomerUpnId ( UpnDbUpnId_t  CompId)

Set the CUSTOMER ID (a UPN) to contact.

The UPN ID of the company to contact.

Parameters
CompIdThe contact UPN ID.

◆ EmailId() [1/2]

UpnDbEmailId_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::EmailId ( ) const
Returns
The EMAIL ID to contact. Or zero (0) when none.

◆ EmailId() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::EmailId ( UpnDbEmailId_t  CompId)

Set the EMAIL ID of to contact.

Parameters
CompIdThe contact EMAIL ID. Or zero (0) when none.

◆ EmailUpdates() [1/2]

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::EmailUpdates ( ) const
Returns
true if this contact get email message updates.

◆ EmailUpdates() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::EmailUpdates ( bool  DoSend)

Set if this contact get email message updates.

Parameters
DoSendWhen true, send this contact text message updates.

◆ Find()

static uint64_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::Find ( UpnDbAuthHandle_t  Auth,
const char *  WildCard,
UpnDbCompanyDbId_t  CompanyId,
std::list< const char *> &  Results 
)
static

Find matching contact, matching wild card.

Parameters
AuthAn authentiation handle.

Some of the characters of the contact name. Example "abc" will find: "Abc Contact", "Super abcd inc", and so one.

Matches any location of WildCard in any contact name.

Parameters
CompanyIdThe company who's contacts we are looking for.
ResultsA reference to a std::list<const char*> that will be cleared, any contents freed, and then filled up with the results of matching contact names.
Returns
The number found.
Note
Caller must free each (const char*) entry in Results, when no longer needed.
Your can repeatedly call Find() with the same Results, without clearing Results first, as Find() will clear free the contents of Results before processing.
For SQL aware users, this calls for a select on the UPN table something like:

SELECT upn from upns WHERE upn ILIKE 'WildCard'

◆ GetActive()

bool SoftwareAndServices::Library::UPN::Change::GetActive ( ) const
inherited

true when this record is active.

◆ GetCreated()

time_t SoftwareAndServices::Library::UPN::Change::GetCreated ( ) const
inherited
Returns
The time created, as a time_t.

◆ GetCreatedByUpnId()

UpnDbUpnId_t SoftwareAndServices::Library::UPN::Change::GetCreatedByUpnId ( ) const
inherited
Returns
the UPN ID of the creator of the record.

◆ GetHasChanged()

bool SoftwareAndServices::Library::UPN::Change::GetHasChanged ( ) const
inherited
Returns
true when this record has been updated and needs changed.

◆ GetSiteId()

static UpnDbUpnId_t SoftwareAndServices::Library::UPN::Change::GetSiteId ( )
staticinherited
Returns
the applications site UPN ID, or ZERO (0) if not set.

◆ LoadAllForCompany()

static uint64_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::LoadAllForCompany ( UpnDbAuthHandle_t  Auth,
UpnDbCompanyDbId_t  CompanyId,
std::list< UpnDbContactRecord *> &  Results 
)
static

Load contact record.

Parameters
AuthAn authentiation handle.
CompanyIdThe company ID to load.
Resultsa std::list<UpnDbContactRecord*> of the found objects.
Returns
The number of records returned in Results.

◆ MarketingUpdates() [1/2]

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::MarketingUpdates ( ) const
Returns
true if this contact get marketing email.

◆ MarketingUpdates() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::MarketingUpdates ( bool  DoSend)

Set if this contact get marketing email.

Parameters
DoSendWhen true, send this contact marketing email messages.

◆ PhoneId() [1/2]

UpnDbPhoneId_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::PhoneId ( ) const
Returns
The PHONE ID to contact. Or zero (0) when none.

◆ PhoneId() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::PhoneId ( UpnDbPhoneId_t  CompId)

Set the PHONE ID of the contact.

Parameters
CompIdThe contact PHONE ID. Or zero (0) when none.

◆ Remove()

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::Remove ( UpnDbAuthHandle_t  Auth)
virtual

Remove this object.

Parameters
AuthThe authentication handle to use.
Returns
true if removed.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ SetActive()

void SoftwareAndServices::Library::UPN::Change::SetActive ( bool  IsActive)
inherited

Indicate if this record is active.

Parameters
IsActiveWhen true, this record is marked active.

◆ SetCreated() [1/2]

bool SoftwareAndServices::Library::UPN::Change::SetCreated ( String TimeOut)
inherited
Returns
The time created as a string YYYY-MM-DDTHH:MM:SS format
Parameters
TimeOutThe results of this method.
Returns
true when the time is not zero.

◆ SetCreated() [2/2]

void SoftwareAndServices::Library::UPN::Change::SetCreated ( time_t  When)
protectedinherited

Set the created time.

Parameters
WhenThe time_t of creation.

◆ SetCreatedByUpnId()

void SoftwareAndServices::Library::UPN::Change::SetCreatedByUpnId ( UpnDbUpnId_t  Creator)
inherited

Set the created by UPN ID.

Parameters
CreatorThe UPN ID of the creator of the record.

◆ SetHasChanged()

void SoftwareAndServices::Library::UPN::Change::SetHasChanged ( bool  ItChanged)
protectedinherited

Set change state.

Parameters
ItChangedWhen true, indicate this record has changed.

◆ SetSiteId()

static void SoftwareAndServices::Library::UPN::Change::SetSiteId ( UpnDbAuthHandle_t  Auth,
UpnDbUpnId_t  SiteUpnId 
)
staticinherited

Set the applications SITE ID.

Must me a memember of the authentication credentials realm, or the authentication credentials are an administrator for that realm.

Parameters
AuthThe authentication handle.
SiteUpnIdThe site's UPN ID.

◆ TextUpdates() [1/2]

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::TextUpdates ( ) const
Returns
true if this contact get text message updates.

◆ TextUpdates() [2/2]

void SoftwareAndServices::Library::UPN::UpnDbContactRecord::TextUpdates ( bool  DoSend)

Set if this contact get text message updates.

Parameters
DoSendWhen true, send this contact text message updates.

◆ Update()

bool SoftwareAndServices::Library::UPN::UpnDbContactRecord::Update ( UpnDbAuthHandle_t  Auth) const
virtual

Update this record.

Parameters
AuthThe authentication handle to use.
Returns
true if updated.

Implements SoftwareAndServices::Library::UPN::UpnDbRecord.

◆ xdr()

bool_t SoftwareAndServices::Library::UPN::UpnDbContactRecord::xdr ( XDR xdrs)

Serialize/Deserialize this object over XDR.

Parameters
xdrsA pointer to the XDR instructions.
Returns
true when all when well, else false.

The documentation for this class was generated from the following file: