PrevNextUpHome SophiaFramework UNIVERSE 5.3
SFBSMS
Wrapper class for the ISMS interface.
#include <SFBSMS.h.hpp>
class SFBSMS : public SFBQuery;
SFMTYPEDEFWRAPPER(SFBSMS)

Inheritance diagram

 Inheritance diagram of SFBSMSClass

Version

BREW 2.0 BREW 2.1 BREW 3.1 BREW 4.0
X X O O

Reference

BREW API ISMS

Member

Public Functions
SFCError GetBytesAvailableForPayload( SFBSMSMsgSmpConstRef message , SInt32Ptr bytes , SInt32Ptr padding )
Checks various ISMSMsg parameters and finds that how many more bytes and bits are available for payload.
SFCError GetEncodingsAvailableForMOSMS( UInt32Ptr buffer , UInt32Ptr size )
Provides the list of encodings supported by the device for mobile originated messages.
SFCError GetEncodingsAvailableForMOSMS( SFXBufferPtr buffer )
Provides the list of encodings supported by the device for mobile originated messages.
static
SFBSMSSmp
NewInstance( SFCErrorPtr exception = null )
Create a new SFBSMS instance.
static
SFBSMSSmp
NewInstance( AEECLSID id , SFCErrorPtr exception = null )
Create a new SFBSMS instance.
SFCError ReceiveMsg( UInt32 messageID , SFBSMSMsgSmpPtr message )
Receive the message with specified message ID.
SFBSMSMsgSmp ReceiveMsg( UInt32 messageID )
Receive the message with specified message ID.
Void SendMsg( SFBSMSMsgSmpConstRef message , SFXCallbackPtr callback , UInt32Ptr result )
send messages from the handset.
SFCError SetClientStatus( AEESMSClientStatus status , AEESMSType type )
Set the status of main client of SMS according to the message type.
SFCError QueryInterface( AEECLSID clsid , VoidHandle handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFCError QueryInterface( AEECLSID clsid , SFBBaseSmpPtr handle ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
SFBBaseSmp QueryInterface( AEECLSID clsid ) (inherits from SFBQuery)
Ask an object for another API contract from the object in question.
Void Self( AEECLSID clsidReq , SFBQuerySmpPtr clone , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
SFBQuerySmp Self( AEECLSID clsidReq , AEECLSID clsidImp ) (inherits from SFBQuery)
Helper macro for those implementing an object with a single interface.
Protected Functions
static
SFBBaseSmp
FactoryByCreate( AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface.
static
SFBBaseSmp
FactoryByQuery( SFBQuerySmpConstRef query , AEECLSID id , SFCErrorPtr exception = null ) (inherits from SFBBase)
Create the instance for the specified ClassID's interface using the SFBQuery instance.

SFBSMS::GetBytesAvailableForPayload
Checks various ISMSMsg parameters and finds that how many more bytes and bits are available for payload.
[ public ]
SFCError GetBytesAvailableForPayload(
    SFBSMSMsgSmpConstRef message   // pointer to the SFBSMSMsg interface
    SInt32Ptr bytes                // placeholder for bytes available for payload
    SInt32Ptr padding              // placeholder for bits padded
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED

Reference

BREW API ISMS_GetBytesAvailableForPayload


SFBSMS::GetEncodingsAvailableForMOSMS
Provides the list of encodings supported by the device for mobile originated messages.
[ public ]
SFCError GetEncodingsAvailableForMOSMS(
    UInt32Ptr buffer   // placeholder for available MO SMS encoding options
    UInt32Ptr size     // size of data
);
[ public ]
SFCError GetEncodingsAvailableForMOSMS(
    SFXBufferPtr buffer   // placeholder for available MO SMS encoding options
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • buffer is null: SFERR_INVALID_PARAM
  • If insufficient memory: SFERR_NO_MEMORY
  • If failed: SFERR_FAILED

Reference

BREW API ISMS_GetEncodingsAvailableForMOSMS


SFBSMS::NewInstance
Create a new SFBSMS instance.
[ public, static ]
SFBSMSSmp NewInstance(
    SFCErrorPtr exception = null   // Error
);
[ public, static ]
SFBSMSSmp NewInstance(
    AEECLSID id                    // Class ID
    SFCErrorPtr exception = null   // Error
);

SFBSMS::ReceiveMsg
Receive the message with specified message ID.
[ public ]
SFCError ReceiveMsg(
    UInt32 messageID          // message ID
    SFBSMSMsgSmpPtr message   // placeholder for ISMSMsg interface pointing to the message
);
[ public ]
SFBSMSMsgSmp ReceiveMsg(
    UInt32 messageID   // message ID
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • message is null: SFERR_INVALID_PARAM

Reference

BREW API ISMS_ReceiveMsg


SFBSMS::SendMsg
send messages from the handset.
[ public ]
Void SendMsg(
    SFBSMSMsgSmpConstRef message   // pointer to SFBSMSMsg interface pointing to the message to be sent 
    SFXCallbackPtr callback        // pointer to callback to inform the status of the message sent
    UInt32Ptr result               // placeholder for return value
);

Return value

According to the callback, the result as below will be returned:

  • If succeeds: SFERR_NO_ERROR
  • Argument of SFBSMSMsg is invalid: SFERR_INVALID_PARAM
  • If failed: SFERR_FAILED
  • SFBSMS is not in the message que which has the privilege to send a message : EITEMBUSY

Reference

BREW API ISMS_SendMsg


SFBSMS::SetClientStatus
Set the status of main client of SMS according to the message type.
[ public ]
SFCError SetClientStatus(
    AEESMSClientStatus status   // client status
    AEESMSType type             // message type
);

Return value

  • If succeeds: SFERR_NO_ERROR
  • If failed: SFERR_FAILED
  • AEECLSID_SMSMAINCLIENT has no privileges : EPRIVLEVEL

Reference

BREW API ISMS_SetClientStatus