Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.skype.api
Class Sms

    java.lang.Object
      com.skype.ipc.SidObject
          com.skype.api.Sms

All Implemented Interfaces:
  SidGetResponding

    public final class Sms

extends SidObject

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:

Nested Class Summary
`static class` | `Sms.ConfirmType`
`static class` | `Sms.FailureReason`
`class` | `Sms.GetBodyChunksResponse`
`static class` | `Sms.Property` Properties of the Sms class
`class` | `Sms.SetBodyResponse`
`static class` | `Sms.SetBodyResult`
`static class` | `Sms.Status`
`static class` | `Sms.TargetStatus`
`static class` | `Sms.Type`

Field Summary
`java.lang.String` | `mBody`
`Message` | `mChatMsg`
`Sms.FailureReason` | `mFailureReason`
`boolean` | `mIsFailedUnseen`
`int` | `mPrice`
`java.lang.String` | `mPriceCurrency`
`int` | `mPricePrecision`
`java.lang.String` | `mReplyToNumber`
`Sms.Status` | `mStatus`
`java.lang.String` | `mTargetNumbers`
`byte[]` | `mTargetStatuses`
`int` | `mTimestamp`
`Sms.Type` | `mType`

Fields inherited from class com.skype.ipc.SidObject
`mSidCached, mSidOid, mSidRoot, mSidTimestamp`

Constructor Summary
`Sms(int oid, SidRoot root)`

Method Summary
`java.lang.String` | `getBody()` actual payload
`Sms.GetBodyChunksResponse` | `getBodyChunks()` 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.
`Message` | `getChatMsg()` reference to Message
`Sms.FailureReason` | `getFailureReason()` Set asynchronously and meaningful only after invoking Conversation.PostSMS and detecting Sms.STATUS of SOME_TARGETS_FAILED or FAILED.
`boolean` | `getIsFailedUnseen()` set to 1 when status goes to FAILED.
`int` | `getPrice()` The total price of sending this SMS message (sum of the individual prices to send to each recipient).
`java.lang.String` | `getPriceCurrency()` should be same as account currency at the time of composing/sending
`int` | `getPricePrecision()` The decimal precision of the SMS price values, both individual and total.
`java.lang.String` | `getPropertyAsString(int prop)`
`java.lang.String` | `getPropertyAsString(Sms.Property prop)`
`java.lang.String` | `getReplyToNumber()` number that should receive the replies
`Sms.Status` | `getStatus()`
`java.lang.String` | `getTargetNumbers()` space-separated normalised pstn numbers
`int` | `getTargetPrice(java.lang.String target)` Retrieves the amount of Skype credit necessary to send the SMS to a particular recipient.
`Sms.TargetStatus` | `getTargetStatus(java.lang.String target)` Retrieves the send status of this SMS to a particular recipient (P_TARGET_STATUSES) either prior to or after invoking Conversation.PostSMS.
`byte[]` | `getTargetStatuses()` binary blob.
`int` | `getTimestamp()` unix timestamp of message submission
`Sms.Type` | `getType()`
`int` | `moduleId()`
`Sms.SetBodyResponse` | `setBody(java.lang.String text)` -The- method for setting the body text of this SMS.
`boolean` | `setTargets(java.lang.String[] numbers)` Sets the recipient(s) of this SMS.
`byte[]` | `sidGetBinaryProperty(PropertyEnumConverting prop)`
`boolean` | `sidGetBoolProperty(PropertyEnumConverting prop)`
`EnumConverting` | `sidGetEnumProperty(PropertyEnumConverting prop)`
`int` | `sidGetIntProperty(PropertyEnumConverting prop)`
`SidObject` | `sidGetObjectProperty(PropertyEnumConverting prop)`
`java.lang.String` | `sidGetStringProperty(PropertyEnumConverting prop)`
`SidGetResponding` | `sidMultiGet(Sms.Property[] requested)` generic multiget of a list of Property
`static SidGetResponding[]` | `sidMultiGet(Sms.Property[] requested, Sms[] objects)` generic multiget of list of Property for a list of Sms
`protected void` | `sidOnChangedProperty(int propertyId, int value, java.lang.String svalue)`
`void` | `sidSetProperty(PropertyEnumConverting prop, byte[] newValue)`
`void` | `sidSetProperty(PropertyEnumConverting prop, int newValue)`
`void` | `sidSetProperty(PropertyEnumConverting prop, SidObject newValue)`
`void` | `sidSetProperty(PropertyEnumConverting prop, java.lang.String newValue)`

Methods inherited from class com.skype.ipc.SidObject
`finalize, getOid, hasCached, invalidateCache, isCached, sidDoRequest, sidGetFilenameProperty, sidGetLongProperty, sidGetObject, sidGetUintProperty, sidGetXmlProperty, sidMultiGet, sidMultiGet, sidMultiGet, sidMultiGet, sidRequestBinaryProperty, sidRequestBoolProperty, sidRequestEnumProperty, sidRequestFilenameProperty, sidRequestIntProperty, sidRequestObjectProperty, sidRequestProperty, sidRequestStringProperty, sidRequestUintProperty, sidRequestXmlProperty, sidSetProperty`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### mType

    public Sms.Type mType

### mStatus

    public Sms.Status mStatus

### mFailureReason

    public Sms.FailureReason mFailureReason

### mIsFailedUnseen

    public boolean mIsFailedUnseen

### mTimestamp

    public int mTimestamp

### mPrice

    public int mPrice

### mPricePrecision

    public int mPricePrecision

### mPriceCurrency

    public java.lang.String mPriceCurrency

### mReplyToNumber

    public java.lang.String mReplyToNumber

### mTargetNumbers

    public java.lang.String mTargetNumbers

### mTargetStatuses

    public byte[] mTargetStatuses

### mBody

    public java.lang.String mBody

### mChatMsg

    public Message mChatMsg

Constructor Detail

### Sms

    public Sms(int oid,
               SidRoot root)

Method Detail

### getTargetStatus

    public Sms.TargetStatus getTargetStatus(java.lang.String target)

  Retrieves the send status of this SMS to a particular recipient (P_TARGET_STATUSES) either prior to or after invoking Conversation.PostSMS. * @param target The normalized phone number of the target recipient.

  Returns:
    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.

### getTargetPrice

    public int getTargetPrice(java.lang.String target)

  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:

  Parameters:
    `target` - The normalized phone number of the target recipient.
  Returns:
    price The price of sending this SMS message to the target recipient.

### setTargets

    public boolean setTargets(java.lang.String[] numbers)

  Sets the recipient(s) of this SMS. Note that each invocation replaces the target list and re-calculates all prices - they are not additive! * @param numbers Normalized phone number(s) of the intended recipient(s).

  Returns:
    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.

### setBody

    public Sms.SetBodyResponse setBody(java.lang.String text)

  -The- method for setting the body text of this SMS. While Conversation.PostSMS does have a body argument, that argument is currently unused. * @param text Message body text.

  Returns:
    SetBodyResponse
    - result Whether the Message body was successfully set and if not, why not.
    - chunks The Message body as a list of individual chunks. *
    - charsUntilNextChunk Number of available characters until creation of the next chunk becomes necessary.

### getBodyChunks

    public Sms.GetBodyChunksResponse getBodyChunks()

  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. * @return GetBodyChunksResponse
  - textChunks List of text chunk strings
  - charsUntilNextChunk Number of available characters until creation of the next chunk becomes necessary.

### sidMultiGet

    public SidGetResponding sidMultiGet(Sms.Property[] requested)

  generic multiget of a list of Property

  Parameters:
    `requested` - the list of requested properties of Sms
  Returns:
    SidGetResponding

### sidMultiGet

    public static SidGetResponding[] sidMultiGet(Sms.Property[] requested,
                                                 Sms[] objects)

  generic multiget of list of Property for a list of Sms

  Parameters:
    `requested` - the list of requested properties
  Returns:
    SidGetResponding[] can be casted to (Sms[]) if all properties are cached

### getType

    public Sms.Type getType()

### getStatus

    public Sms.Status getStatus()

### getFailureReason

    public Sms.FailureReason getFailureReason()

  Set asynchronously and meaningful only after invoking Conversation.PostSMS and detecting Sms.STATUS of SOME_TARGETS_FAILED or FAILED.

### getIsFailedUnseen

    public boolean getIsFailedUnseen()

  set to 1 when status goes to FAILED. use MarkSeen() to clear

### getTimestamp

    public int getTimestamp()

  unix timestamp of message submission

### getPrice

    public int getPrice()

  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. A value of MAX_UINT indicates that SkypeKit is actively querying and/or updating the value. Note that P_PRICE is an integer value. Calculate the actual price (in units specified by P_PRICE_CURRENCY) using P_PRICE_PRECISION as:

### getPricePrecision

    public int getPricePrecision()

  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.

### getPriceCurrency

    public java.lang.String getPriceCurrency()

  should be same as account currency at the time of composing/sending

### getReplyToNumber

    public java.lang.String getReplyToNumber()

  number that should receive the replies

### getTargetNumbers

    public java.lang.String getTargetNumbers()

  space-separated normalised pstn numbers

### getTargetStatuses

    public byte[] getTargetStatuses()

  binary blob. track with OnPropertyChange(), access with GetTargetStatus(target)

### getBody

    public java.lang.String getBody()

  actual payload

### getChatMsg

    public Message getChatMsg()

  reference to Message

### sidGetStringProperty

    public java.lang.String sidGetStringProperty(PropertyEnumConverting prop)

  Specified by:
    `sidGetStringProperty` in interface `SidGetResponding`
  Overrides:
    `sidGetStringProperty` in class `SidObject`

### sidGetObjectProperty

    public SidObject sidGetObjectProperty(PropertyEnumConverting prop)

  Specified by:
    `sidGetObjectProperty` in interface `SidGetResponding`
  Overrides:
    `sidGetObjectProperty` in class `SidObject`

### sidGetBoolProperty

    public boolean sidGetBoolProperty(PropertyEnumConverting prop)

  Specified by:
    `sidGetBoolProperty` in interface `SidGetResponding`
  Overrides:
    `sidGetBoolProperty` in class `SidObject`

### sidGetIntProperty

    public int sidGetIntProperty(PropertyEnumConverting prop)

  Specified by:
    `sidGetIntProperty` in interface `SidGetResponding`
  Overrides:
    `sidGetIntProperty` in class `SidObject`

### sidGetEnumProperty

    public EnumConverting sidGetEnumProperty(PropertyEnumConverting prop)

  Specified by:
    `sidGetEnumProperty` in interface `SidGetResponding`
  Overrides:
    `sidGetEnumProperty` in class `SidObject`

### sidGetBinaryProperty

    public byte[] sidGetBinaryProperty(PropertyEnumConverting prop)

  Specified by:
    `sidGetBinaryProperty` in interface `SidGetResponding`
  Overrides:
    `sidGetBinaryProperty` in class `SidObject`

### getPropertyAsString

    public java.lang.String getPropertyAsString(int prop)

### getPropertyAsString

    public java.lang.String getPropertyAsString(Sms.Property prop)

### sidOnChangedProperty

    protected void sidOnChangedProperty(int propertyId,
                                        int value,
                                        java.lang.String svalue)

  Specified by:
    `sidOnChangedProperty` in class `SidObject`

### sidSetProperty

    public void sidSetProperty(PropertyEnumConverting prop,
                               java.lang.String newValue)

  Specified by:
    `sidSetProperty` in interface `SidGetResponding`
  Overrides:
    `sidSetProperty` in class `SidObject`

### sidSetProperty

    public void sidSetProperty(PropertyEnumConverting prop,
                               SidObject newValue)

  Specified by:
    `sidSetProperty` in interface `SidGetResponding`
  Overrides:
    `sidSetProperty` in class `SidObject`

### sidSetProperty

    public void sidSetProperty(PropertyEnumConverting prop,
                               int newValue)

  Specified by:
    `sidSetProperty` in interface `SidGetResponding`
  Overrides:
    `sidSetProperty` in class `SidObject`

### sidSetProperty

    public void sidSetProperty(PropertyEnumConverting prop,
                               byte[] newValue)

  Specified by:
    `sidSetProperty` in interface `SidGetResponding`
  Overrides:
    `sidSetProperty` in class `SidObject`

### moduleId

    public int moduleId()

  Specified by:
    `moduleId` in class `SidObject`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.