// WctpClientOperations.hpp #ifndef WCTPCLIENTOPERATIONS_HPP #define WCTPCLIENTOPERATIONS_HPP #include "WctpFactory.hpp" #include #include using namespace std; /* Class WctpClientOperations * Contains functionality to format WCTP Client packets. * This is beta software that is still under development. Use * at your own risk. * * New in this version: * - now accepts host names rather than just IP addresses * * Copyright 2000, 2001 Arch Wireless Holdings, Inc. * Author: Kris Latham * Version 0.1 Beta August 8, 2001 */ class WctpClientOperations : public WctpFactory { public: /* * Constructor Method */ WctpClientOperations(); /* * Destructor Method */ ~WctpClientOperations(); /* Formats the WCTP packet for a Submit Client Message * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias) * receipt - Do you want a receipt to later check with clientQuery? * 0 = false * 1 = true * * Returns the XML document */ string submitMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID, int receipt); /* Formats the WCTP packet for a Submit Client Message * This method assumes that you do not want the message to be preformatted and you will not * later come back to get a receipt with a clientQuery. * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias) * * Returns the XML document */ string submitMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID); /* Formats the WCTP packet for a Submit Client Message * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias) * receipt - Do you want a receipt to later check with clientQuery? * * Returns the XML document */ string submitMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID, bool receipt); /* Formats the WCTP packet for a Submit Client Message * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias) * receipt - Do you want a receipt to later check with clientQuery? * preformatted - indicate true if you want the message to be preformatted ( * preserve whitespace and carriage returns (note: this may * incur additional character charges by your carrier) * * Returns the XML document */ string submitMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID, bool receipt, bool preformatted); /* Formats the WCTP packet for a Client Query * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * trackNo - the tracking number for the message * senderID - the sending users ID (i.e. Email Address, pager pin number, alias) * * Returns the xml document */ string clientQuery(string postDir, string deviceID, string trackNo, string senderID); /* Formats the WCTP packet for a Submit Client Message in Binary Format * * Parameters: * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * payload - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias * * Returns the XML document */ string submitBinaryMessage(string postDir, string timeStmp, string deviceID, string payload, string senderID); /* Formats the WCTP packet for a Submit Client Message with MCR. * It is assumed that you do not want the message to be preformatted and you will not want * to later come back with a client query for a receipt. * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias * choices - a String array of MCR entries * * Returns the XML document, or an empty string if the email was left blank */ string submitMCRMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID, string choices[]); /* Formats the WCTP packet for a Submit Client Message with MCR. Preformatted is assumed * to be false. * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias * choices - a String array of MCR entries * receipt - indicate true if you are going to later want a receipt * * Returns the XML document, or an empty string if the email was left blank */ string submitMCRMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID, string choices[], bool receipt); /* Formats the WCTP packet for a Submit Client Message with MCR * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * timeStmp - the correctly formatted time stamp * deviceID - the pager number that is being paged (i.e. Email Address, pager pin number, alias) * mssg - the message being sent to the pager * senderID - the sending users ID (i.e. Email Address, pager pin number, alias * choices - a String array of MCR entries * receipt - indicate true if you are going to later want a receipt * preformatted - indicate true if you want the message to be preformatted ( * preserve whitespace and carriage returns (note: this may * incur additional character charges by your carrier) * * Returns the XML document, or an empty string if the email was left blank */ string submitMCRMessage(string postDir, string timeStmp, string deviceID, string mssg, string senderID, string choices[], bool receipt, bool preformatted); /* Formats the WCTP packet for a Version Query * Note: This is a 1.1 feature that is not currently implemented. * * Parameters: * postDir - the directory to include in the HTTP header (i.e. HTTP 1.0 POST postDir) * inquirer - address of the entity that is requesting the version * * Returns the XML document */ string versionQuery(string postDir, string inquirer); private: }; #endif