C# 클래스 MMS_App1, API-Platform

MMS_App1 class
This application allows an end user to send an MMS message with up to three attachments of any common format, and check the delivery status of that MMS message.
상속: System.Web.UI.Page
파일 보기 프로젝트 열기: attdevsupport/API-Platform

공개 메소드들

메소드 설명
BypassCertificateError ( ) : void

This method neglects the ssl handshake error with authentication server

보호된 메소드들

메소드 설명
GetStatusButton_Click ( object sender, EventArgs e ) : void

This method will be called when user click on get status button

Page_Load ( object sender, EventArgs e ) : void

Event, that triggers when the application page is loaded into the web browser, reads the web.config file and gets the values of the attributes

SendMMSMessageButton_Click ( object sender, EventArgs e ) : void

This method will be called when user clicks on send mms button

비공개 메소드들

메소드 설명
DrawGetStatusSuccess ( string status, string url ) : void

Displays Resource url upon success of GetMmsDelivery

DrawPanelForFailure ( Panel, panelParam, string message ) : void

Displays error message

DrawPanelForSuccess ( Panel, panelParam, string message ) : void

Display success message

FormMIMEParts ( string boundary, string &data ) : byte[]

Form mime parts for the user input files

GetAccessToken ( AccessTokenType type ) : bool

This method gets access token based on either client credentials mode or refresh token.

GetBytesOfFile ( string boundary, string &data, string filePath ) : byte[]

Gets the bytes representation of file along with mime part

GetMmsDeliveryStatus ( ) : void

This function calls get message delivery status api to fetch the delivery status

GetPhoneNumber ( ) : string

Gets formatted phone number

IsTokenValid ( ) : string

Validates he expiry of the access token and refresh token

JoinTwoByteArrays ( byte firstByteArray, byte secondByteArray ) : MemoryStream

This function adds two byte arrays

ReadAccessTokenFile ( ) : bool

This function reads the Access Token File and stores the values of access token, expiry seconds, refresh token, last access token time and refresh token expiry time.

ReadAndGetAccessToken ( ) : bool

This function reads access token file, validates the access token and gets a new access token

ReadConfigFile ( ) : bool

This method reads config file and assigns values to local variables

SendMMS ( ) : void

This function initiates send mms api call to send selected files as an mms

SendMessageNoAttachments ( string mmsAddress, string mmsMessage ) : void

Invokes messaging api to send message without any attachments

SendMultimediaMessage ( string mmsAddress, string mmsMessage ) : void

Sends MMS by calling messaging api

메소드 상세

BypassCertificateError() 공개 정적인 메소드

This method neglects the ssl handshake error with authentication server
public static BypassCertificateError ( ) : void
리턴 void

GetStatusButton_Click() 보호된 메소드

This method will be called when user click on get status button
protected GetStatusButton_Click ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
리턴 void

Page_Load() 보호된 메소드

Event, that triggers when the application page is loaded into the web browser, reads the web.config file and gets the values of the attributes
protected Page_Load ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
리턴 void

SendMMSMessageButton_Click() 보호된 메소드

This method will be called when user clicks on send mms button
protected SendMMSMessageButton_Click ( object sender, EventArgs e ) : void
sender object object, that caused this event
e EventArgs Event that invoked this function
리턴 void