Class TNNTPSend

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TNNTPSend = class(TSynaClient)

Description

abstract(Implementation of Network News Transfer Protocol.

Note: Are you missing properties for setting Username and Password? Look to parent TSynaClient object!

Are you missing properties for specify server address and port? Look to parent TSynaClient too!

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function Login: Boolean;
Public function Logout: Boolean;
Public function DoCommand(const Command: string): boolean;
Public function DoCommandRead(const Command: string): boolean;
Public function DoCommandWrite(const Command: string): boolean;
Public function GetArticle(const Value: string): Boolean;
Public function GetBody(const Value: string): Boolean;
Public function GetHead(const Value: string): Boolean;
Public function GetStat(const Value: string): Boolean;
Public function SelectGroup(const Value: string): Boolean;
Public function IHave(const MessID: string): Boolean;
Public function GotoLast: Boolean;
Public function GotoNext: Boolean;
Public function ListGroups: Boolean;
Public function ListNewGroups(Since: TDateTime): Boolean;
Public function NewArticles(const Group: string; Since: TDateTime): Boolean;
Public function PostArticle: Boolean;
Public function SwitchToSlave: Boolean;
Public function Xover(xoStart, xoEnd: string): boolean;
Public function StartTLS: Boolean;
Public function FindCap(const Value: string): string;
Public function ListExtensions: Boolean;

Properties

Published property ResultCode: Integer read FResultCode;
Published property ResultString: string read FResultString;
Published property Data: TStringList read FData;
Published property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;
Published property FullSSL: Boolean read FFullSSL Write FFullSSL;
Published property Sock: TTCPBlockSocket read FSock;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function Login: Boolean;

Connects to NNTP server and begin session.

Public function Logout: Boolean;

Logout from NNTP server and terminate session.

Public function DoCommand(const Command: string): boolean;

By this you can call any NNTP command.

Public function DoCommandRead(const Command: string): boolean;

by this you can call any NNTP command. This variant is used for commands for download information from server.

Public function DoCommandWrite(const Command: string): boolean;

by this you can call any NNTP command. This variant is used for commands for upload information to server.

Public function GetArticle(const Value: string): Boolean;

Download full message to Data property. Value can be number of message or message-id (in brackets).

Public function GetBody(const Value: string): Boolean;

Download only body of message to Data property. Value can be number of message or message-id (in brackets).

Public function GetHead(const Value: string): Boolean;

Download only headers of message to Data property. Value can be number of message or message-id (in brackets).

Public function GetStat(const Value: string): Boolean;

Get message status. Value can be number of message or message-id (in brackets).

Public function SelectGroup(const Value: string): Boolean;

Select given group.

Public function IHave(const MessID: string): Boolean;

Tell to server 'I have mesage with given message-ID.' If server need this message, message is uploaded to server.

Public function GotoLast: Boolean;

Move message pointer to last item in group.

Public function GotoNext: Boolean;

Move message pointer to next item in group.

Public function ListGroups: Boolean;

Download to Data property list of all groups on NNTP server.

Public function ListNewGroups(Since: TDateTime): Boolean;

Download to Data property list of all groups created after given time.

Public function NewArticles(const Group: string; Since: TDateTime): Boolean;

Download to Data property list of message-ids in given group since given time.

Public function PostArticle: Boolean;

Upload new article to server. (for new messages by you)

Public function SwitchToSlave: Boolean;

Tells to remote NNTP server 'I am not NNTP client, but I am another NNTP server'.

Public function Xover(xoStart, xoEnd: string): boolean;

Call NNTP XOVER command.

Public function StartTLS: Boolean;

Call STARTTLS command for upgrade connection to SSL/TLS mode.

Public function FindCap(const Value: string): string;

Try to find given capability in extension list. This list is getted after successful login to NNTP server. If extension capability is not found, then return is empty string.

Public function ListExtensions: Boolean;

Try get list of server extensions. List is returned in Data property.

Properties

Published property ResultCode: Integer read FResultCode;

Result code number of last operation.

Published property ResultString: string read FResultString;

String description of last result code from NNTP server.

Published property Data: TStringList read FData;

Readed data. (message, etc.)

Published property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;

If is set to True, then upgrade to SSL/TLS mode after login if remote server support it.

Published property FullSSL: Boolean read FFullSSL Write FFullSSL;

SSL/TLS mode is used from first contact to server. Servers with full SSL/TLS mode usualy using non-standard TCP port!

Published property Sock: TTCPBlockSocket read FSock;

Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:51