IRfNetworkFn Interface Reference

Inherits IRsObject.

List of all members.

Public Member Functions

HRESULT GetNetworkSpaceOwner ([out, retval] BSTR *pbstrNetworkSpaceOwner)
HRESULT GetNetworkSpace ([out, retval] IRsNode **ppNetworkSpaceNode)
HRESULT CreateNetworkSpace ([out, retval] IRsNode **ppNetworkSpaceNode)
HRESULT FindInNetworkSpace ([in] BSTR bstrName,[out, retval] IRsNode **ppNtNode)
HRESULT CreateClient ([in] BSTR bstrName,[out, retval] IRsNode **ppNtClientNode)
HRESULT AuthorizeLogin ([in] IRsNode *pSSSNode)
HRESULT SerializeRepository ([in] IRsNEBlockRepository *pRepository,[in] RtBOOL bAddNetHeader,[in] RtBOOL bDeleteOnRelease,[out, retval] IStream **ppStm)
HRESULT DeserializeRepository ([in] IRsNEBlockRepository *pRepository,[in] IRsBSEIdRegister *pBSERegister,[in] RtBOOL bNewIdAllowed,[in] IStream *pStm)
HRESULT SerializeContext ([in] IRsNode *pNode,[out] IRsNtCtxStorage **ppNtCtxStorage,[out] IRdNtCtxInfo **ppCtxInfo)
HRESULT DeleteSpaceContent ([in] IRsNode *pNode)
HRESULT CreateStreamFromBuffer ([in] void *pBuffer,[in] RtDWORD dwBufLen,[out, retval] IStream **ppStm)
HRESULT ZipStream ([in] IStream *pInStm,[in] NtZLibLevel eCmprsLev,[in] RtBOOL bAddNtHeader,[in] RtBOOL bDeleteOnRelease,[out, retval] IStream **ppOutStm)
HRESULT CreateTextChatMsg ([in] RtCSNID csnidClient,[in] BSTR bstrName,[in] BSTR bstrText,[out, retval] IRdNtChatMsg **ppChatMsg)
HRESULT GetServerFreePort ([out, retval] WORD *pwPort)
HRESULT SplitStreamToMessages ([in] RtDWORD dwMsgID,[in] IStream *pStm,[in] RtDWORD dwReservedSize,[out] BYTE ***pppbaMsgs,[out] RtDWORD *pdwNumMsgs,[out] RtDWORD *pdwFirstMsgSize,[out] RtDWORD *pdwRestMsgSize)
HRESULT AssembleSplittedMsg ([in] RtNtSplittedMsgRec *pSplMsgRec,[in] RtNtSplittedMsg *pMsg,[in] RtDWORD dwMsgSize,[out] BYTE **ppOrigMsg)
HRESULT DeletePaMsgs ([in] BYTE **ppaMsgs,[in] RtDWORD dwNumSpltMsgs)
HRESULT FindServerByPort ([in] IRsNode *pNode,[in] RtDWORD dwPort,[out, retval] IRsNode **ppServerControl)
HRESULT RemoveClients (void)
HRESULT AddRejectedBlockIntoRepository ([in] IRsNEBlockRepository *pRepository,[in] RtDWORD dwNSEBlockId)
HRESULT FirstNodeInNetSpaceByCLSID ([in] const GUID *piid,[out, retval] IRsNode **ppNode)
HRESULT GetNetworkProperties ([in] RtBOOL bCreate,[out, retval] IRsNode **ppNetPropNode)
HRESULT CheckToAutoOpenPanel ([in] IRsNode *pNode)
HRESULT ReplaceAddrInSSS ([in] IRsNode *pNode,[in] BSTR bstrOrigAddr,[in] BSTR bstrNewAddr)
HRESULT PlaySoundFromRes ([in] RtInstance hInst,[in] RtDWORD dwResId,[in] RtBOOL bPlayAlways)
HRESULT GetAvatarsMatrix ([in] IRsNode *pAvatarNode,[out, retval] IRdMatrixf **ppMatrix)
HRESULT CreateSharedSpace ([in] BSTR bstrOwnerSpace,[in] BSTR bstrSharedSpace,[out, retval] IRsNode **ppSharedSpaceNode)
HRESULT DeserializeObject ([in] IRsPersistStream *pPersistStream,[in] RtBYTE *pData,[in] RtDWORD dwDataSize)


Detailed Description

This function-set offers operations over Shared Space or helps you to create and manage it.

Member Function Documentation

HRESULT IRfNetworkFn::GetNetworkSpaceOwner ( [out, retval] BSTR *  pbstrNetworkSpaceOwner  ) 

Returns Network space owner string ID.

Returns:
pbstrNetworkSpaceOwner [out, retval] String ID of the Network Space owner.

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::GetNetworkSpace ( [out, retval] IRsNode **  ppNetworkSpaceNode  ) 

Returns network space encapsulator.

Returns:
ppNetworkSpaceNode [out, retval] Returned interface of the created space.

S_OK if found, S_FALSE if it does not exist, or other error code.

HRESULT IRfNetworkFn::CreateNetworkSpace ( [out, retval] IRsNode **  ppNetworkSpaceNode  ) 

Returns network space encapsulator.

  • If the named space already exists, a new one will not be created.
Returns:
ppNetworkSpaceNode [out, retval] Returned interface of the created space (optional, can be NULL).

S_OK if found or successfully created, or other error code.

HRESULT IRfNetworkFn::FindInNetworkSpace ( [in] BSTR  bstrName,
[out, retval] IRsNode **  ppNtNode 
)

Find node by its name in network space.

Parameters:
bstrName [in] Name of the node.
Returns:
ppNtNode [out, retval] Returned interface of the node.

S_OK if found, S_FALSE if not found or other standard error code.

HRESULT IRfNetworkFn::CreateClient ( [in] BSTR  bstrName,
[out, retval] IRsNode **  ppNtClientNode 
)

Create client in network space.

  • If the client already exists, just its interface will be returned.
Parameters:
bstrName [in] Name of the client.
Returns:
ppNtClientNode [out, retval] Returned interface of the client.

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::AuthorizeLogin ( [in] IRsNode pSSSNode  ) 

Create RnAuthLogin node in network space and activate it.

  • If the login authorization is approved, execute RcSharedSpaceSettings command to reconnect the current client.
  • After authorization the RnAuthLogin will be destroyed.
Parameters:
pSSSNode [in] Shared Space Settings object.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::SerializeRepository ( [in] IRsNEBlockRepository *  pRepository,
[in] RtBOOL  bAddNetHeader,
[in] RtBOOL  bDeleteOnRelease,
[out, retval] IStream **  ppStm 
)

Called to serialize repository.

Parameters:
pRepository [in] Repository that will be serialized.
bAddNetHeader [in] If TRUE, the network header will be added to begining of the stream.
bDeleteOnRelease [in] .
Returns:
ppStm [out, retval] Returned stream.
  • If the repository was empty, NULL will be returned.

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::DeserializeRepository ( [in] IRsNEBlockRepository *  pRepository,
[in] IRsBSEIdRegister pBSERegister,
[in] RtBOOL  bNewIdAllowed,
[in] IStream *  pStm 
)

Called to deserialize repository.

Parameters:
pRepository [in] Repository that will be serialized.
pBSERegister [in] Identification register
bNewIdAllowed [in] Set TRUE to allow Identification register modification (usually TRUE on server)
pStm [in] Stream from which will be repository deserialized.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::SerializeContext ( [in] IRsNode pNode,
[out] IRsNtCtxStorage **  ppNtCtxStorage,
[out] IRdNtCtxInfo **  ppCtxInfo 
)

Called to serialize given context.

Parameters:
pNode [in] Context that will be serialized.
ppNtCtxStorage [out] Returns structure storing serialized context.
ppCtxInfo [out] Info DO about the serialized context.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::DeleteSpaceContent ( [in] IRsNode pNode  ) 

Called to delete content of given node together with selected network related connectors.

Parameters:
pNode [in] Specify node of Dependency Graph of the content you want to delete.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::CreateStreamFromBuffer ( [in] void *  pBuffer,
[in] RtDWORD  dwBufLen,
[out, retval] IStream **  ppStm 
)

Create stream from buffer.

Parameters:
pBuffer [in] The input buffer that you wish to send to stream.
dwBufLen [in] Buffer's length.
Returns:
ppStm [out, retval] Returns the stream created from the input buffer.

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::ZipStream ( [in] IStream *  pInStm,
[in] NtZLibLevel  eCmprsLev,
[in] RtBOOL  bAddNtHeader,
[in] RtBOOL  bDeleteOnRelease,
[out, retval] IStream **  ppOutStm 
)

Zip stream.

Parameters:
pInStm [in] Input stream.
eCmprsLev [in] The compression level (see NtZLibLevel).
bAddNtHeader [in] If TRUE, default stream network header will be added (see RtNtZippedMsg).
bDeleteOnRelease [in] If TRUE, the stream will be released when no longer referenced.
Returns:
ppOutStm [out, retval] Returns zipped stream.
Remarks:
In case the zip fails, the output stream will be equal to the input stream.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::CreateTextChatMsg ( [in] RtCSNID  csnidClient,
[in] BSTR  bstrName,
[in] BSTR  bstrText,
[out, retval] IRdNtChatMsg **  ppChatMsg 
)

Create Chat Text Message Data object.

Parameters:
csnidClient [in] Client ID.
bstrName [in] Client alias.
bstrText [in] Text of the message.
Returns:
ppChatMsg [out, retval] Returns Data Object with text chat message.

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::GetServerFreePort ( [out, retval] WORD *  pwPort  ) 

Find a free communication port for server.

  • Method scans all IRnNtServer nodes for the port in given port range, which is defined in registers (FirstPort & LastPort).
  • The port is allowed to be reserved even if the server is inactive.
  • Only the network space(s) are scanned.
Returns:
pwPort [out, retval] Returns the first free server port. S_OK If found, E_FAIL If there are no free ports.

HRESULT IRfNetworkFn::SplitStreamToMessages ( [in] RtDWORD  dwMsgID,
[in] IStream *  pStm,
[in] RtDWORD  dwReservedSize,
[out] BYTE ***  pppbaMsgs,
[out] RtDWORD *  pdwNumMsgs,
[out] RtDWORD *  pdwFirstMsgSize,
[out] RtDWORD *  pdwRestMsgSize 
)

Split Stream into small messages.

Parameters:
dwMsgID [in] Messages ID.
pStm [in] Input stream.
dwReservedSize [in] Size in bytes that will be added before the message itself.
  • <dwReservedSize><sizeof(RtNtSplittedMsg)><part of src.msg>.
pppbaMsgs [out] Created output structure (array with pointers to messages).
pdwNumMsgs [out] Number of created messages (pppbaMsgs array's size).
pdwFirstMsgSize [out] Size of the first message.
pdwRestMsgSize [out] Size of remainder of the messages.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::AssembleSplittedMsg ( [in] RtNtSplittedMsgRec *  pSplMsgRec,
[in] RtNtSplittedMsg *  pMsg,
[in] RtDWORD  dwMsgSize,
[out] BYTE **  ppOrigMsg 
)

Use this method to assemble received split message.

Parameters:
pSplMsgRec [in] Pointer to queue structure.
pMsg [in] Received part of the original message.
dwMsgSize [in] Size of the received message.
ppOrigMsg [out]Returned pointer to original already assembled message when the last fragment has been added.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::DeletePaMsgs ( [in] BYTE **  ppaMsgs,
[in] RtDWORD  dwNumSpltMsgs 
)

Delete ppaMsgs msg. structure created with SplitStreamToMessages method.

Parameters:
ppaMsgs [in] Pointer to the structure.
dwNumSpltMsgs [in] Number of messages in the structure.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::FindServerByPort ( [in] IRsNode pNode,
[in] RtDWORD  dwPort,
[out, retval] IRsNode **  ppServerControl 
)

Find first Server control by specified port number.

Parameters:
pNode [in] Space to begin the search (all the sub-spaces will be searched as well).
dwPort [in] The port number.
Returns:
pServerControl [out, retval] Returned pointer to the Server control if found.

S_OK If found
S_FALSE If not found, or other error.

HRESULT IRfNetworkFn::RemoveClients ( void   ) 

Call to remove all client nodes from network space.

HRESULT IRfNetworkFn::AddRejectedBlockIntoRepository ( [in] IRsNEBlockRepository *  pRepository,
[in] RtDWORD  dwNSEBlockId 
)

Create empty NSE Block, set it as rejected and add into repository.

Parameters:
pRepository [in] Repository to which the NSE Block will be added.
dwNSEBlockId [in] The NSEB ID.
Returns:
S_OK or other error.

HRESULT IRfNetworkFn::FirstNodeInNetSpaceByCLSID ( [in] const GUID *  piid,
[out, retval] IRsNode **  ppNode 
)

Find the first node in Network space by class id.

  • This method enumerate only the Network space not its sub-objects.
Parameters:
piid [in] The node's class id.
Returns:
ppNode [out, retval] Returns the node if exist.

S_OK if the node is found and S_FALSE if the network space don't exist or the node is not found.

HRESULT IRfNetworkFn::GetNetworkProperties ( [in] RtBOOL  bCreate,
[out, retval] IRsNode **  ppNetPropNode 
)

Get network properties. The node is located in network space.

  • With this method you can also create the properties if they don't exist yet.
Parameters:
bCreate [in] If TRUE, then if the properties don't exist they are created together with the network space.
Returns:
ppNetPropNode [out, retval] Returns the properties node.

S_OK if the node is found, S_FALSE if it isn't or other error if a problem occurs.

HRESULT IRfNetworkFn::CheckToAutoOpenPanel ( [in] IRsNode pNode  ) 

Check whether panel for specified node should be opened.
Conditions:

  • object must have set auto open flag.
  • the client is running on shareSpace.
  • this is client space.
Parameters:
pNode [in] Node that's panel should be checked.
Returns:
S_OK If panel was opened.

S_FALSE If it is not necessary to open panel.

other standard error.

HRESULT IRfNetworkFn::ReplaceAddrInSSS ( [in] IRsNode pNode,
[in] BSTR  bstrOrigAddr,
[in] BSTR  bstrNewAddr 
)

Replace server addresses in SharedSpaceSettings objects.

Parameters:
bstrObjName [in] Object identification for which the replace will be executed (all sub-objects are enumerated).
bstrOrigAddr [in] Original address.
bstrNewAddr [in] New address.
Returns:
Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::PlaySoundFromRes ( [in] RtInstance  hInst,
[in] RtDWORD  dwResId,
[in] RtBOOL  bPlayAlways 
)

Play sound from resource.

  • The sound has to be enabled in the network properties.
Parameters:
hInst [in] hInstance of the resources. If NULL the networks one is used.
bstrNewAddr [in] Sound resource id.
bPlayAlways [in] Play sound even if sound is disabled.
Returns:
Standard HRESULT processing can be applied to the result.
Remarks:
This method checks the DG to find whether sounds are enabled (if not forced to play) so you must call it always from a command.

This function is obsolete. Consider using MediaDV package sound support instead.

HRESULT IRfNetworkFn::GetAvatarsMatrix ( [in] IRsNode pAvatarNode,
[out, retval] IRdMatrixf **  ppMatrix 
)

Returns avatar's matrix in 3D Shared Space.

Parameters:
pAvatarNode [in] Specify avatar node.
Returns:
ppMatrix [out, retval] Returns the avatar's matrix Data Object.

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::CreateSharedSpace ( [in] BSTR  bstrOwnerSpace,
[in] BSTR  bstrSharedSpace,
[out, retval] IRsNode **  ppSharedSpaceNode 
)

Create Shared Space encapsulator. If it already exists, a new one will not be created.

Parameters:
bstrOwnerSpace [in] ID of the space in which the Shared Space will be created.
bstrSharedSpace [in] String ID of the space.
Returns:
ppSharedSpaceNode [out, retval] Returned interface of the created space (optional, can be NULL).

Standard HRESULT processing can be applied to the result.

HRESULT IRfNetworkFn::DeserializeObject ( [in] IRsPersistStream pPersistStream,
[in] RtBYTE pData,
[in] RtDWORD  dwDataSize 
)

Deserialize object from buffer.

Parameters:
pPersistStream [in] The IRsPersistStream interface of the object you want to load
pData [in] The buffer's pointer
dwDataSize [in] Buffer's length


Generated on Wed May 20 21:32:12 2009 for trueSpace7.6 SDK by  doxygen 1.5.5