Wrapper class that includes SMS-specific properties and methods, such as P_BODY and GetTargetPrice. Instantiate SMS instances using Skype::CreateOutgoingSms; post SMS messages to a Conversation using Conversation::PostSMS. More...
#include <skype-embedded_2.h>
Wrapper class that includes SMS-specific properties and methods, such as P_BODY and GetTargetPrice. Instantiate SMS instances using Skype::CreateOutgoingSms; post SMS messages to a Conversation using Conversation::PostSMS.
Each SMS can have multiple targets (normalized phone numbers). Note that in a Conversation context, every SMS instance has a corresponding Message instance. Once you've posted an SMS, you can retrieve its corresponding Message instance using Sms::GetPropChatmsgId. That Message instance's P_BODY_XML property contains the SMS message data, such as price, target phone number(s), failure codes, and so forth, which you can parsed out and display in the UI. To put it another way, the object chain goes like this:
@n Conversation->Message->SMS @n
Note that SkypeKit SDK supports outgoing SMS messages only. SkypeKit clients, even when logged in with accounts that have SkypeIn numbers, cannot receive SMS messages.
Definition at line 2225 of file skype-embedded_2.h.
Definition at line 2234 of file skype-embedded_2.h.
Definition at line 2235 of file skype-embedded_2.h.
| anonymous enum |
Definition at line 2236 of file skype-embedded_2.h.
| enum Sms::CONFIRM_TYPE |
| ID_SMS |
Confirm mobile number as SMS sender number |
| ID_MOBILE |
Confirm mobile number as CLI for SkypeOut calls |
| ID_SKYPEIN |
unused currently |
Definition at line 2342 of file skype-embedded_2.h.
| enum Sms::FAILUREREASON |
| MISC_ERROR | |
| SERVER_CONNECT_FAILED | |
| NO_SMS_CAPABILITY | |
| INSUFFICIENT_FUNDS | |
| INVALID_CONFIRMATION_CODE | |
| USER_BLOCKED | |
| IP_BLOCKED | |
| NODE_BLOCKED | |
| NO_SENDERID_CAPABILITY |
Definition at line 2281 of file skype-embedded_2.h.
| enum Sms::PROPERTY |
Properties of the Sms class
| P_TYPE |
type: TYPE |
| P_STATUS |
type: STATUS |
| P_FAILUREREASON |
Set asynchronously and meaningful only after invoking Conversation::PostSMS and detecting Sms::STATUS of SOME_TARGETS_FAILED or FAILED. |
| P_IS_FAILED_UNSEEN |
set to 1 when status goes to FAILED. use MarkSeen() to clear, type: bool |
| P_TIMESTAMP |
unix timestamp of message submission, type: uint |
| P_PRICE |
The total price of sending this SMS message (sum of the individual prices to send to each recipient). Defaults to -1 on instantiation and incremented by the price for each recipient once that recipient's status reflects TARGET_ACCEPTABLE. Use Sms::GetTargetPrice to retrieve individual target prices. @n actualPrice = price / 10^pricePrecision; @n |
| P_PRICE_PRECISION |
The decimal precision of the SMS price values, both individual and total. For example, a value of 2 indicates that you should divide the price (represented as an integer) by 100 (10^2) to obtain the actual price. |
| P_PRICE_CURRENCY |
should be same as account currency at the time of composing/sending, type: Sid::String |
| P_REPLY_TO_NUMBER |
number that should receive the replies, type: Sid::String |
| P_TARGET_NUMBERS |
space-separated normalised pstn numbers, type: Sid::String |
| P_TARGET_STATUSES |
binary blob. track with OnPropertyChange(), access with GetTargetStatus(target), type: Sid::Binary |
| P_BODY |
actual payload, type: Sid::String |
| P_CHATMSG_ID |
reference to Message, type: MessageRef |
Definition at line 2250 of file skype-embedded_2.h.
| enum Sms::SETBODYRESULT |
Definition at line 2315 of file skype-embedded_2.h.
| enum Sms::STATUS |
Definition at line 2272 of file skype-embedded_2.h.
| enum Sms::TARGETSTATUS |
| TARGET_ANALYZING | |
| TARGET_UNDEFINED | |
| TARGET_ACCEPTABLE | |
| TARGET_NOT_ROUTABLE | |
| TARGET_DELIVERY_PENDING | |
| TARGET_DELIVERY_SUCCESSFUL | |
| TARGET_DELIVERY_FAILED |
Definition at line 2293 of file skype-embedded_2.h.
| enum Sms::TYPE |
Definition at line 2266 of file skype-embedded_2.h.
| Sms::~Sms | ( | ) | [virtual] |
Definition at line 1116 of file skype-embedded_2.cpp.
| bool Sms::GetBodyChunks | ( | Sid::List_String & | textChunks, | |
| uint & | charsUntilNextChunk | |||
| ) |
Retrieves string list of SMS text chunks in first argument, while the second argument contains the number of available characters until creation of the next chunk becomes necessary.
| textChunks | List of text chunk strings | |
| charsUntilNextChunk | Number of available characters until creation of the next chunk becomes necessary. |
| bool Sms::GetPropBody | ( | Sid::String & | body | ) |
Sms::P_BODY property get accessor
| bool Sms::GetPropChatmsgId | ( | MessageRef & | chatmsg_id | ) |
Sms::P_CHATMSG_ID property get accessor
| bool Sms::GetPropFailurereason | ( | FAILUREREASON & | failurereason | ) |
Sms::P_FAILUREREASON property get accessor
| bool Sms::GetPropIsFailedUnseen | ( | bool & | is_failed_unseen | ) |
Sms::P_IS_FAILED_UNSEEN property get accessor
| bool Sms::GetPropPrice | ( | uint & | price | ) |
Sms::P_PRICE property get accessor
| bool Sms::GetPropPriceCurrency | ( | Sid::String & | price_currency | ) |
Sms::P_PRICE_CURRENCY property get accessor
| bool Sms::GetPropPricePrecision | ( | uint & | price_precision | ) |
Sms::P_PRICE_PRECISION property get accessor
| bool Sms::GetPropReplyToNumber | ( | Sid::String & | reply_to_number | ) |
Sms::P_REPLY_TO_NUMBER property get accessor
| bool Sms::GetPropStatus | ( | STATUS & | status | ) |
Sms::P_STATUS property get accessor
| bool Sms::GetPropTargetNumbers | ( | Sid::String & | target_numbers | ) |
Sms::P_TARGET_NUMBERS property get accessor
| bool Sms::GetPropTargetStatuses | ( | Sid::Binary & | target_statuses | ) |
Sms::P_TARGET_STATUSES property get accessor
| bool Sms::GetPropTimestamp | ( | uint & | timestamp | ) |
Sms::P_TIMESTAMP property get accessor
| bool Sms::GetPropType | ( | TYPE & | type | ) |
Sms::P_TYPE property get accessor
| bool Sms::GetTargetPrice | ( | const Sid::String & | target, | |
| uint & | price | |||
| ) |
Retrieves the amount of Skype credit necessary to send the SMS to a particular recipient. Defaults to -1 on instantiation and set only when that recipient's status reflects TARGET_ACCEPTABLE. Use Sms::GetPropPrice to retrieve the total cost of this SMS.
Note that the target price is an integer value. Calculate the actual price (in units specified by P_PRICE_CURRENCY) using P_PRICE_PRECISION as:
@n actualTargetPrice = targetPrice / 10^pricePrecision; @n
| target | The normalized phone number of the target recipient. | |
| price | The price of sending this SMS message to the target recipient. |
| bool Sms::GetTargetStatus | ( | const Sid::String & | target, | |
| TARGETSTATUS & | status | |||
| ) |
Retrieves the send status of this SMS to a particular recipient (P_TARGET_STATUSES) either prior to or after invoking Conversation::PostSMS.
| target | The normalized phone number of the target recipient. | |
| status | The send status of the target recipient, for example, TARGET_ANALYZING, TARGET_DELIVERY_PENDING, TARGET_DELIVERY_SUCCESSFUL, TARGET_DELIVERY_FAILED, and so forth. TARGET_UNDEFINED implies that the specified target is not a recipient of this SMS. |
| SmsRef Sms::ref | ( | ) | [inline] |
Definition at line 2237 of file skype-embedded_2.h.
| bool Sms::SetBody | ( | const Sid::String & | text, | |
| SETBODYRESULT & | result, | |||
| Sid::List_String & | chunks, | |||
| uint & | charsUntilNextChunk | |||
| ) |
-The- method for setting the body text of this SMS. While Conversation::PostSMS does have a body argument, that argument is currently unused.
| bool Sms::SetTargets | ( | const Sid::List_String & | numbers, | |
| bool & | success | |||
| ) |
Sets the recipient(s) of this SMS. Note that each invocation replaces the target list and re-calculates all prices - they are not additive!
| numbers | Normalized phone number(s) of the intended recipient(s). | |
| success | Set to true if the target list appears to contain valid, normalized telephone numbers. Note that this check is not very reliable. Actual target validity checking occurs asynchronously in the background, and manifests itself as a series of Sms::P_TARGET_STATUSES property change events. |
(c) Skype Technologies S.A. Confidential/Proprietary
Last updated: Fri Jan 27 2012