Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: nifman.h
Link against: nifman.lib

Class RNif

RNif

Support

Supported from 5.0

Description

Provides an interface for the client so that it may monitor a connection. Client requests are passed to the NifMan server for processing.

This interface is designed to be extended by inheritance by an agent for a particular connection type.

Derivation

RHandleBaseHandle to an object
RNifProvides an interface for the client so that it may monitor a connection
RSessionBaseClient-side handle to a session with a server

Defined in RNif:
AgentInfo(), CancelProgressNotification(), DisableTimers(), LastProgressError(), NetworkActive(), Open(), Progress(), ProgressNotification(), Start(), Stop(), Version()

Inherited from RHandleBase:
Close(), Duplicate(), Handle(), SetHandle()

Inherited from RSessionBase:
Attach(), CreateSession(), EAutoAttach, EExplicitAttach, Send(), SendReceive(), SetRetry(), Share(), TAttachMode


Dial-up progress notification service


CancelProgressNotification()

void CancelProgressNotification();

Description

Cancels an outstanding request for the current stage of a dial-up connection. The outstanding request completes with the request status set to KErrCancel.


LastProgressError()

TInt LastProgressError(TNifProgress& aProgress);

Description

Gets the last error which occurred when setting up the connection. This is a synchronous request and is complete when the function returns.

Parameters

TNifProgress& aProgress

A reference to a TNifProgress object. On successful return, the iError data member of this object contains the last error which occurred.

Return value

TInt

System-wide error code


Progress()

TInt Progress(TNifProgress& aProgress);

Description

Gets the current stage of the dial-up connection. This is a synchronous request and is complete when the function returns.

When the function returns, the iStage member function of aProgress contains a value which defines the current stage. Where dial-up networking is the agent of the Network Interface Manager, the stage of the dial-up connection is defined by one of the TNetDialProgress enumerators.

Parameters

TNifProgress& aProgress

A reference to a TNifProgress object. On successful return, the iStage data member of this is object contains the current stage of the dial-up connection.

Return value

TInt

KErrNone if successful, otherwise another of the system-wide error codes.


ProgressNotification()

void ProgressNotification(TNifProgressBuf& aProgress, TRequestStatus& aStatus);

Description

Requests the current stage of a dial-up connection. This is an asynchronous request.

When the request completes, the iStage member function of the packaged TNifProgress object contains a value which defines the current stage. Where dial-up networking is the agent of the Network Interface Manager, the stage of the dial-up connection is defined by one of the TNetDialProgress enumerators.

If an outstanding request is cancelled by a call to CancelProgressNotification(), then the request completes and aStatus is set to KErrCancel.

Parameters

TNifProgressBuf& aProgress

A reference to a package buffer containing a TNifProgress object.

TRequestStatus& aStatus

A reference to the request status object. If the request is cancelled, this is set to KErrCancel.


AgentInfo()

TInt AgentInfo(TNifAgentInfo& aInfo);

Description

Gets information describing the agent currently in use.

Parameters

TNifAgentInfo& aInfo

On return, contains information describing the agent.

Return value

TInt

KErrNone if successful; otherwise one of the other system wide error codes; specifically KErrNotSupported if no monitor exists.


DisableTimers()

TInt DisableTimers(TBool aDisable=ETrue);

Description

Enables or disables timers.

Parameters

TBool aDisable

ETrue, disables timers; EFalse, enables timers. If not explicitly specified, the parameter defaults to ETrue.

Return value

TInt

KErrNone if successful; otherwise one of the other system wide error codes; specifically KErrNotSupported if no monitor exists.


Stop()

TInt Stop();

Description

Stops the agent and terminates the connection.

Return value

TInt

KErrNone if successful; otherwise one of the other system wide error codes; specifically KErrNotSupported if no monitor exists.


Version()

static TVersion Version();

Description

Gets the version of the NifMan server.

Return value

TVersion

The version of the NifMan server.


Open()

TInt Open(const TDesC& aName=TPtrC(), TInt aSlots=KDefaultNifSlots);

Description

Starts the NifMan server, if it is not already started, and opens an accompanying companion session from the specified agent.

Parameters

const TDesC& aName

The name of the agent. If not explicitly specified, the function locates the default agent listed in TCPIP.ESK file.

TInt aSlots

The number of slots to use. If not explicitly specified, defaults to KDefaultNifSlots.

Return value

TInt

KErrNone if successful; otherwise one of the other system wide error codes; specifically KErrNotFound if the agent cannot be found.


NetworkActive()

TInt NetworkActive(TBool& aIsActive);

Description

Tests whether there is an active connection.

The function may be used by a client to check whether it can safely start a connection without upsetting another client.

Parameters

TBool& aIsActive

On successful return, contains true if there is an active connection; false, otherwise.

Return value

TInt

KErrNone if successful; otherwise one of the other system wide error codes; specifically KErrNotSupported if there is no monitor in existence; KErrNotReady, if there is no network interface.


Start()

protected : TInt Start(TAny *aPtr);

Description

Starts a connection.

Parameters

TAny *aPtr

A pointer to a parameter to be passed. Typically this is the connection type as defined by the TAgentConnectType enumerator.

Return value

TInt

KErrNone if successful; otherwise one of the other system wide error codes; specifically KErrNotSupported if there is no monitor in existence; KErrAlreadyExists, if a connection is already in progress.