Android Programming Press on the image to return to the main documentation page.

iNet

List of types:

FTP
FTPEntry
SMTP

FTP


Events:

DeleteCompleted (ServerPath As String, Success As Boolean)
DownloadCompleted (ServerPath As String, Success As Boolean)
UploadCompleted (ServerPath As String, Success As Boolean)
ListCompleted (ServerPath As String, Success As Boolean, Folders() As FTPEntry, Files() As FTPEntry)
CommandCompleted (Command As String, Success As Boolean, ReplyCode As Int, ReplyString As String)

Members:


  DeleteFile (ServerPath As String)

  DownloadFile (ServerFilePath As String, Unused As Boolean, DeviceFolder As String, DeviceFile As String)

  Initialize (EventName As String, Host As String, Port As Int, User As String, Password As String)

  List (ServerPath As String)

  PassiveMode As Boolean

  SendCommand (Command As String, Parameters As String)

  UploadFile (DeviceFolder As String, DeviceFile As String, Unused As Boolean, ServerFilePath As String)

Members description:

DeleteFile (ServerPath As String)
Deletes a file from the server. The DeleteCompleted event will be raised.
DownloadFile (ServerFilePath As String, Unused As Boolean, DeviceFolder As String, DeviceFile As String)
Downloads the file from the server. The DownloadCompleted event will be raised when download completes.
ServerFilePath - Full path to the remote file.
Unused - Unused boolean value (kept for signature compatibility).
DeviceFolder / DeviceFile - The file will be downloaded to this path.
Initialize (EventName As String, Host As String, Port As Int, User As String, Password As String)
Initializes the object and set the subs that will handle the events.
EventName - Subs prefix.
Host - FTP host name or ip address.
Port - FTP port number (usually 21).
User / Password - User credentials.
List (ServerPath As String)
Fetches the list of folders and files in the specified path.
The ListCompleted event will be raised when the data is available.
PassiveMode As Boolean
Gets or sets whether FTP is in passive mode. The default mode is active mode.
SendCommand (Command As String, Parameters As String)
Sends an FTP command. The CommandCompleted event will be raised with the server reply.
Should only be used with commands that return the reply in the command channel.
Example:
FTP.SendCommand("MKD", "/somefolder/newfolder")
UploadFile (DeviceFolder As String, DeviceFile As String, Unused As Boolean, ServerFilePath As String)
Uploads a local file to the server. The UploadCompleted event will be raised when upload completes.
DeviceFolder / DeviceFile - File to upload.
Unused - Unused boolean value (kept for signature compatibility).
ServerFilePath - The full path to the server file that will be created.

FTPEntry


Events:

None

Members:


  Name As String [read only]

  Size As Long [read only]

  Timestamp As Long [read only]

Members description:

Name As String [read only]
Returns the entry name.
Size As Long [read only]
Returns the file size.
Timestamp As Long [read only]
Returns the last modified time.

SMTP


Events:

MessageSent (Success As Boolean)

Members:


  AddAttachment (Dir As String, FileName As String)

  BCC As List

  Body As String

  CC As List

  DebugLogs As Boolean

  HtmlBody As Boolean

  Initialize (Server As String, Port As Int, Username As String, Password As String, EventName As String)

  Send

  Sender As String

  StartTLSMode As Boolean

  Subject As String

  To As List

  UseSSL As Boolean

Members description:

AddAttachment (Dir As String, FileName As String)
Adds an attachment to the message.
BCC As List
Gets or sets the list of "BCC" recipients.
Body As String
Gets or sets the message body.
CC As List
Gets or sets the list of "CC" recipients.
DebugLogs As Boolean
Set to true to log debug messages.
HtmlBody As Boolean
Gets or sets whether the message body is Html text.
Initialize (Server As String, Port As Int, Username As String, Password As String, EventName As String)
Initializes the object.
Server - Server address. Host name or ip.
Port - mail server port.
Username / Password - Account credentials.
EventName - Sets the subs that handle the events.
Send
Sends the message. The MessageSent will later be raised.
Sender As String
Gets or sets the sender field. By default it is the same as the user name.
StartTLSMode As Boolean
Gets or sets whether the connection should be done in StartTLS mode (for example Gmail smtp over port 587).
Subject As String
Gets or sets the message subject.
To As List
Gets or sets the list of "To" recipients.
Example:SMTP.To.Add("[email protected]")
UseSSL As Boolean
Gets or sets whether the connection should be done with SSL sockets (for example Gmail smtp over port 465).
Top