StopObserving Method

Unregisters the class as an observer for a given resource.

Syntax

int StopObserving(const QString& qsURI);

Remarks

This method unregisters the class as an observer for the resource identified by URI. This method operates in the exact same manner as the Get method, with the exception of the two things below; refer to the Get method's documentation for more information:

  1. When constructing the request, the class automatically includes an Observe option with a value of 1. The presence of this option indicates to the server that the class wishes to unregister from further change notifications.
  2. This method, unlike Get, does not return a request Id.

Note: This method can only be called when the class is operating in client mode (i.e., when the Listening property is disabled).

Error Handling

This method returns a result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message. (Note: This method's result code can also be obtained by calling the GetLastErrorCode() method after it returns.)

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 Qt Edition - Version 20.0 [Build 8265]