class CSMS20
class CSMS20 : public CObjectSource file(s): SMS20.cpp; SMS20.h
This class provides access to the SMS2.0 service that allows us to send instant messages to our contacts through an HTTP interface.
SMS 2.0 service gives you the capability to detect presence status of your contacts. You can chat with them via SMS messages when they are offline. If any of your contact is online, he will receive your messages instantly, as with other IMS services (MSN, Yahoo, etc.).
This API allows you to perform the following operations:
- Log into the SMS2.0 service. You will only need your telephone number and password.
- Retrieve your contact list.
- Get presence status for your contacts.
- Add contacts to your contact list. You will only need your contact's telephone number.
- Poll for notifications from the service. These notifications can be:
- Change in presence status for any of your contacts.
- New message received.
- Request from another user to add you to his/her contact list. You must respond to this notification allowing (or not) the other user to add you you.
- Remove a contact from your list..
- Log out from the service.
You can check billing information here
Methods
| Login | Performs login to movistar web site |
| Connect | Connects to SMS2.0 service |
| Polling | Performs polling to search for new message notifications, contacts online, etc... |
| AddContact | Adds a contact to the user's contact list |
| AuthorizeContact | Authorizes a contact to be informed about our presence status |
| DeleteContact | Deletes a contact |
| SendMessage | Sends a message to the destination contact |
| Disconnect | Disconnects from SMS2.0 service |
class CSMS20Helper
class CSMS20Helper : public CObjectThe CSMS20Helper class provides helper functions to parse SMS2.0 service responses, convert between differente text encondings, etc.
Methods
| ASCII2UTF8 | Converts text from ASCII to UTF8 |
| UTF82ASCII | Converts text from UTF8 to ASCII |
| GetContactPresence | Obtains contacts presence status from received XML |
| SearchAuthorizePresence | Retrieves UserID for the contact that wants to know our presence status |
| SearchTransactionId | Retrieves TransactionID for an incoming request |
| SearchMessage | Retrieves sender and text of a received message |
class CSMS20Contact
class CSMS20Contact : public CObjectThe CSMS20Contact class encapsulates a contact of SMS2.0 service.
Members
| m_csUserID | UserID of the contact |
| m_csAlias | Alias of the contact |
| m_bPresent | Presence status of the contact |
Sample Code
| SMS 2.0 | Sample code to show how to use SMS2.0 service |