SGServer (ISGServer80) 

This interface provides the methods for connecting, disconnecting and checking the currently connected SkylineGlobe Server.

 

 

Methods

 

Connect

Connects TerraExplorer to a SkylineGlobe Server.

ConnectAsync

Connects TerraExplorer to a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync80 object, thereby ensuring that control is promptly handed back to the calling function.

ConnectByCookie

Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session.

ConnectByCookieAsync

Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session. This method executes asynchronously, immediately returning an ITerraExplorerAsync80 object, thereby ensuring that control is promptly handed back to the calling function.

Disconnect

Disconnects TerraExplorer from a SkylineGlobe Server.

DisconnectAsync

Disconnects TerraExplorer from a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync80 object, thereby ensuring that control is promptly handed back to the calling function.

GetConnectedServer

Returns the URL of the connected server.

GetConnectedUser

Returns the user name of the connected user.

GetParam

Reserved. Currently not used.

GetUserDisplayName

Returns the display name of the connected user.

GetVersion

Returns the version of the connected server.

IsTokenLoggedIn

Returns a Boolean indicating whether the currently logged in user has permission for the passed token.

Reconnect

Reconnects TerraExplorer to a SkylineGlobe Server.

ReconnectAsync

Reconnects TerraExplorer to a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync80 object, thereby ensuring that control is promptly handed back to the calling function.

SetParam

Reserved. Currently not used.

Connect

Connects TerraExplorer to a SkylineGlobe Server. This method cannot be used for a guest login. This method executes synchronously, meaning it returns after connecting to the server. If you want to execute asynchronously, use ConnectAsync instead.

 

JavaScript

 

Connect(

       URL,

       UserName,

       Password,

       bRememberMe)

 

C#

 

void Connect(

       string URL,

       string UserName,

       string Password,

       [bool bRememberMe = False])      

 

C++

 

HRESULT Connect(

       BSTR URL,

       BSTR UserName,

       BSTR Password ,

       VARIANT_BOOL bRememberMe)

Parameters

URL

The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.

UserName

The user name by which to connect to the SkylineGlobe Server.

Password

The password by which to connect to the SkylineGlobe Server.

bRememberMe

A Boolean that determines whether the login details should be remembered for automatic completion in future logins.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

ConnectAsync

Connects TerraExplorer to a SkylineGlobe Server. This method cannot be used for a guest login.

This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

 

JavaScript

 

ConnectAsync(

       URL,

       UserName,

       Password,

       bRememberMe)

 

C#

 

ITerraExplorerAsync80 ConnectAsync (

       string URL,

       string UserName,

       string Password

       [bool bRememberMe = False])      

 

C++

 

HRESULT ConnectAsync (

       BSTR URL,

       BSTR UserName,

       BSTR Password,

       VARIANT_BOOL bRememberMe,

       ITerraExplorerAsync80** pITerraExplorerObject) )

Parameters

URL

The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.

UserName

The user name by which to connect to the SkylineGlobe Server.

Password

The password by which to connect to the SkylineGlobe Server.

bRememberMe

A Boolean that determines whether the login details should be remembered for automatic completion in future logins.

Return Value

pITerraExplorerObject

An ITerraExplorerAsync80 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

ConnectByCookie

Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session. This method executes synchronously, meaning it returns after connecting to SkylineGlobe Server. If you want to execute asynchronously, use ConnectByCookieAsync instead.

 

JavaScript

 

ConnectByCookie(

       URL,

       sCookie,

       bRememberMe)

 

C#

 

void ConnectByCookie (

       string URL,

       string sCookie,

       [bool bRememberMe = False])      

 

C++

 

HRESULT ConnectByCookie (

       BSTR URL,

       BSTR sCookie,

       VARIANT_BOOL bRememberMe)

Parameters

URL

The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.

sCookie

The SGS cookie generated by SGS when the user originally logged in. This cookie is used to identify a returning user.

bRememberMe

A Boolean that determines whether the login details should be remembered for automatic completion in future logins.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

ConnectByCookieAsync

Connects TerraExplorer to a SkylineGlobe Server using a cookie generated by the server when the user logged in during a previous session.

This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The returned ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve callbacks).

If you want to execute synchronously, use ConnectByCookie instead.?

 

JavaScript

 

ConnectByCookieAsync(

       URL,

       sCookie,

       bRememberMe)

 

C#

 

ITerraExplorerAsync80 ConnectByCookieAsync (

       string URL,

       string sCookie,

       [bool bRememberMe = False])      

 

C++

 

HRESULT ConnectByCookieAsync (

       BSTR URL,

       BSTR sCookie,

       VARIANT_BOOL bRememberMe,

       ITerraExplorerAsync80** pITerraExplorerObject)

Parameters

URL

The URL of the SkylineGlobe Server. If this parameter is set to an empty string, TerraExplorer connects to the last server it connected to.

sCookie

The SGS cookie generated by SGS when the user originally logged in. This cookie is used to identify a returning user.

bRememberMe

A Boolean that determines whether the login details should be remembered for automatic completion in future logins.

Return Value

pITerraExplorerObject

An ITerraExplorerAsync80 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

Disconnect

Disconnect TerraExplorer from a SkylineGlobe Server. This method executes synchronously, meaning it returns after disconnecting. If you want to execute asynchronously, use DisconnectAsync instead.

 

JavaScript

 

Disconnect()

 

C#

 

Disconnect()

 

C++

 

HRESULT Disconnect();

 

DisconnectAsync

Disconnect TerraExplorer from a SkylineGlobe Server. This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

If you want to execute synchronously, use Disconnect instead.

 

JavaScript

 

DisconnectAsync()

 

C#

 

ITerraExplorerAsync80 DisconnectAsync ()

 

C++

 

HRESULT DisconnectAsync (ITerraExplorerAsync80** pITerraExplorerObject);

 

GetConnectedServer

Returns the URL of the connected server.

 

JavaScript

 

GetConnectedServer()

 

C#

 

string GetConnectedServer()

 

C++

 

HRESULT GetConnectedServer(

       BSTR* URL)

Return Value

URL

The URL of the connected server.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

GetConnectedUser

Returns the user name of the connected user.

 

JavaScript

 

GetConnectedUser()

 

C#

 

string GetConnectedUser ()

 

C++

 

HRESULT GetConnectedUser (

       BSTR* User)

Return Value

User

The user name of the connected user.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

GetUserDisplayName

Returns the display name of the connected user.

 

JavaScript

 

GetUserDisplayName ()

 

C#

 

string GetUserDisplayName ()

 

C++

 

HRESULT GetUserDisplayName (

       BSTR* DisplayedName)

Return Value

DisplayedName

The display name of the connected user.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

 

GetVersion

Returns the version of the connected server.

 

JavaScript

 

GetVersion()

 

C#

 

string GetVersion ()

 

C++

 

HRESULT GetVersion (

       BSTR* Version)

Return Value

Version

The version of the connected server.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

IsTokenLoggedIn

This method returns a Boolean indicating whether the currently logged in user has permissions associated with the passed URL token.

 

JavaScript

 

IsTokenLoggedIn (

       Token)

 

C#

 

bool IsTokenLoggedIn (

       string Token)

 

C++

 

HRESULT IsTokenLoggedIn (

       BSTR* Token,

       VARIANT_BOOL pVal)

Parameters

Token

The URL token whose associated permissions are to be verified for the currently logged in user.

Return Value

pVal

A Boolean indicating whether the currently logged user has the permissions associated with the passed URL token.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.

Reconnect

Reconnect TerraExplorer to the last SkylineGlobe Server it was connected to.

 

JavaScript

 

Reconnect()

 

C#

 

Reconnect()

 

C++

 

HRESULT Reconnect();

ReconnectAsync

Reconnect TerraExplorer to the last SkylineGlobe Server it was connected to. This method executes asynchronously, immediately returning an ITerraExplorerAsync80, thereby ensuring that control is promptly handed back to the calling function. The ITerraExplorerAsync80 object provides a callback-based mechanism similar to the JavaScript promise and the C# Task that allows for handling rejections/errors and successful resolution of the asynchronous operation (using OnReject and OnResolve).

 

JavaScript

 

ReconnectAsync()

 

C#

 

ITerraExplorerAsync80 ReconnectAsync ()

 

C++

 

HRESULT ReconnectAsync (ITerraExplorerAsync80** pITerraExplorerObject);

Return Value

pITerraExplorerObject

An ITerraExplorerAsync80 object, which provides a callback-based mechanism similar to the JavaScript promise and the C# Task that offers the following functionality:

·          Allows for handling the various stages of the asynchronous operation, from tracking progress to managing rejection/error, and finally resolving the operation (using OnProgress, OnReject, and OnResolve respectively).

·          Upon resolution of the query, enables the passing of a SafeArray of float values representing the elevation values in the designated area, to the OnResolve callback.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.