|
|
The get_message_q method retrieves all messages from a NET SatisFAXtion queue (Send,
Sending,
Sent, Receiving,
or Received). The response from this method is a
GET_MESSAGE_Q_RESULT object,
that contains messages in an array of Q_MESSAGE
objects. Message content is not retrieved, but can be obtained by calling get_message_content.
| GET_MESSAGE_Q_RESULT get_message_q( |
| string user_name, |
// Fax server user name |
| string user_password, |
// Fax server user password |
| string for_this_user, |
// Only for this user (optional) |
| Q_ID server_queue |
// From this fax server queue |
| ) |
|
Parameters: |
|
| user_name |
A NET SatisFAXtion user name.
|
| user_password |
The password for the user.
|
| for_this_user |
A filter used to specify that only messages
for a particular user should be returned.
This parameter is optional and can be null to specify "all users".
|
| server_queue |
Specifies the fax server queue from which
messages are retrieved. Must be set to a member of the Q_ID
enumeration.
| enum Q_ID { |
| Send, |
// The Send (Scheduled) queue |
| Sending, |
// The Sending queue |
| Sent, |
// The Sent (Outbox) queue |
| Receiving, |
// The Receiving queue |
| Received |
// The Received (Inbox) queue |
| } |
|
|
Return Value: |
|
A GET_MESSAGE_Q_RESULT object containing a result code and string, and an
array of Q_MESSAGE objects if the function was successful.
|
Example: |
|
public int count_pages_of_all_received_faxes()
{
NSSOAP ns = new NSSOAP();
GET_MESSAGE_Q_RESULT gmq =
ns.get_message_q("supervisor",
"",
null, // All users
Q_ID.Received);
if (gmq.status_num == STATUS_NUM.NoError)
{
int total_received_pages = 0;
foreach (Q_MESSAGE qm in gmq.q_messages)
{
// Received faxes have only one CONNECTION_INFO per message,
// but for the sake of demonstration here's a loop that
// examines the CONNECTION_INFO for every recipient.
foreach (CONNECTION_INFO ci in qm.connection_info)
{
total_received_pages += ci.pages_transferred;
}
}
return(total_received_pages);
}
return(0);
}
|
See Also: |
|
send_message, get_message_content,
get_message |