Fetion. net interface

Source: Internet
Author: User

Description

1) The core file of this Apsara stack interface is fetionobj. dll and fetionser. dll. All other files are the Apsara stack client files. Only your applicationsProgramAnd the above two files can be placed in the same directory as the Apsara client. During debugging, You need to copy the files to your running directory, including the theme directory.

2) when developing and using interfaces, you only need to add fetionobj. DLL file to reference, and add the "using fetion;" Statement to the source code reference. The reference includes two objects: The fetionuser structure is the friend information structure, and the fetionobj class is the Feixin operation interface class.

3) The fetionuser structure is described as follows:
Public struct fetionuser
{
Public String fetionno; // fetion account
Public String inclueno; // fetion mobile phone number
Public String uname; // user name or nickname
Public bool enableim; // Apsara online
Public bool enablesms; // online SMS
Public bool enableinvite // activity (login or Exit)
}

4) fetionobj class description
(For call details, refer to the "Call test" program source code I gave)

**************************************** ****************
Attribute description:
/// <Summary>
/// Determine whether the user has logged on. If the value is true, the user has logged on.
/// </Summary>
Public bool islogin

/// <Summary>
/// Return the mobile phone number or flying signal used for login
/// </Summary>
Public String getmyno

/// <Summary>
/// Return your own flight Signal
/// </Summary>
Public String getmyfetionno

/// <Summary>
/// Return your mobile phone number
/// </Summary>
Public String getmydomaineno

/// <Summary>
/// Return your nickname
/// </Summary>
Public String getmyname

**************************************** *************
Function Description:
/// <Summary>
/// Fetion Constructor
/// </Summary>
Public fetionobj ()

/// <Summary>
/// Log on to Apsara Stack
/// </Summary>
/// <Param name = "mymno"> string, mobile phone number or flying signal </param>
/// <Param name = "mympass"> string Feixin password </param>
/// <Returns> the true operation is successful (note: the logon is successful only after the onlogin event occurs), and the false operation fails </returns>
Public bool loginfetion (string mymno, string mympass)

/// <Summary>
/// Cancel Apsara Stack
/// </Summary>
Public void logoutfetion ()

/// <Summary>
/// Send an SMS message (Note: You can call it multiple times to return a successful result in the sendok event)
/// </Summary>
/// <Param name = "tomnoarr"> send the target mobile phone number or flying signal array </param>
/// <Param name = "smsmsg"> message content </param>
/// <Param name = "issms"> true: all text messages are sent. False is automatically processed based on the user's online status. </param>
Public bool sendsms (string [] tomnoarr, string smsmsg)

/// <Summary>
/// Send a scheduled message
/// </Summary>
/// <Param name = "tomnoarr"> send the target mobile phone number or flying signal array </param>
/// <Param name = "smsmsg"> message content </param>
/// <Param name = "totime"> scheduled sending time. Note: The time must be later than 10 minutes. </param>
Public bool sendtimesms (string [] tomnoarr, string smsmsg, datetime totime)

/// <Summary>
/// Add a friend
/// </Summary>
/// <Param name = "addmno"> target mobile phone number or flying signal to be added </param>
/// <Param name = "MSG"> the information given to the recipient. The limit is no more than 10 characters (that is, five Chinese characters). </param>
/// <Param name = "friendname"> Custom friend name or nickname </param>
Public bool addfriend (string addmno, string MSG, string friendname)

/// <Summary>
/// Delete a friend
/// </Summary>
/// <Param name = "addmno"> target mobile phone number or flying signal to be deleted </param>
Public bool delfriend (string delmno)

/// <Summary>
/// Directly obtain the friend list
/// </Summary>
Public fetionuser [] getmlist ()

/// <Summary>
/// Check whether the friend list is ready
/// </Summary>
Public bool ismlistok ()

**************************************** **********************************
Event Description:

/// <Summary>
/// Trigger event proxy when new messages exist
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "Reu"> sender User Information </param>
/// <Param name = "MSG"> received message content </param>
Public Delegate void refindmsg (fetionobj fobj, fetionuser Reu, string MSG );

/// <Summary>
/// Events triggered when new messages exist
/// </Summary>
Public event refindmsg onrefindmsg; // receives the SMS

/// <Summary>
/// Trigger event proxy when an error occurs when receiving SMS messages
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "errtxt"> error message </param>
Public Delegate void reerr (fetionobj fobj, string errtxt );

/// <Summary>
/// Triggered when an error occurred while receiving the SMS
/// </Summary>
Public event reerr onreerr;

/// <Summary>
/// Event proxy triggered when added as a friend
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "Reu"> peer User Information </param>
/// <Returns> true: Yes. Add a friend. False does not agree. </returns>
Public Delegate bool readd (fetionobj fobj, fetionuser REU );

/// <Summary>
/// Triggered when added as a friend
/// </Summary>
Public event readd onreadd;

/// <Summary>
/// Trigger event proxy when the friend status changes
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "Reu"> Peer Information </param>
Public Delegate bool pchanged (fetionobj fobj, fetionuser REU );

/// <Summary>
/// Triggered when the friend status changes
/// </Summary>
Public event pchanged onpchanged;

/// <Summary>
/// Trigger event proxy every time a message is sent successfully
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "tofno"> Target flying signal </param>
/// <Param name = "MSG"> message content </param>
Public Delegate void sendok (fetionobj fobj, string tofno, string MSG );

/// <Summary>
/// Triggered every time a message is sent successfully
/// </Summary>
Public event sendok onsendok;

/// <Summary>
/// Trigger the event agent after sending all the messages
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
Public Delegate void sendallok (fetionobj fobj );

/// <Summary>
/// Trigger the event after all messages are sent
/// </Summary>
Public event sendallok onsendallok; // after all

/// <Summary>
/// Trigger event proxy every time an error occurs
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "tofno"> Target flying signal </param>
/// <Param name = "MSG"> message content </param>
/// <Param name = "errtxt"> error message </param>
Public Delegate void senderr (fetionobj fobj, string tofno, string MSG, string errtxt );

/// <Summary>
/// Trigger an event every time an error occurs during sending
/// </Summary>
Public event senderr onsenderr; // sending Error

/// <Summary>
/// The event proxy is triggered after the logon of Apsara stack.
/// </Summary>
/// <Param name = "fobj"> use Class Object of the Apsara stack event </param>
/// <Param name = "oklogin"> check whether the logon is successful. True indicates that the logon is successful. </param>
Public Delegate void login (fetionobj fobj, bool oklogin );

/// <Summary>
/// Events triggered after the logon of Apsara Stack
/// </Summary>
Public event login onlogin;

/// <Summary>
/// Trigger event proxy when the friend list is complete
/// </Summary>
/// <Param name = "fobj"> the Apsara Class Object in which the event occurs </param>
/// <Param name = "ulist"> friend list </param>
Public Delegate void MList (fetionobj fobj, fetionuser [] ulist );

/// <Summary>
/// Triggered when the friend list is complete
/// </Summary>
Public event MList onmlist;

/// <Summary>
/// The event proxy is triggered when Apsara stack is canceled
/// </Summary>
/// <Param name = "fobj"> the Apsara Class Object in which the event occurs </param>
Public Delegate void logout (fetionobj fobj );

/// <Summary>
/// Events triggered when Apsara mail is canceled
/// </Summary>
Public event logout onlogout;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.