Skip to content

Commit

Permalink
Merge pull request hpcc-systems#18410 from wangkx/h31194
Browse files Browse the repository at this point in the history
HPCC-31194 Add dalilocks to WsDali

Reviewed-by: Jake Smith <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Mar 21, 2024
2 parents 0550af0 + c11fffc commit 16bee08
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
7 changes: 6 additions & 1 deletion esp/scm/ws_dali.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ ESPrequest [nil_remove] DisconnectClientConnectionRequest
string Endpoint;
};

ESPrequest [nil_remove] ListSDSLocksRequest
{
};

ESPrequest [nil_remove] UnlockSDSLockRequest
{
string ConnectionID;
Expand All @@ -180,7 +184,7 @@ ESPrequest [nil_remove] ClearTraceTransactionsRequest
};

ESPservice [auth_feature("NONE"), //This declares that the method logic handles feature level authorization
version("1.06"), default_client_version("1.06"), exceptions_inline("./smc_xslt/exceptions.xslt")] WSDali
version("1.07"), default_client_version("1.07"), exceptions_inline("./smc_xslt/exceptions.xslt")] WSDali
{
ESPmethod [min_ver("1.01")] SetValue(SetValueRequest, ResultResponse);
ESPmethod [min_ver("1.01")] GetValue(GetValueRequest, ResultResponse);
Expand All @@ -205,6 +209,7 @@ ESPservice [auth_feature("NONE"), //This declares that the method logic handles
ESPmethod [min_ver("1.05")] GetSDSStats(GetSDSStatsRequest, ResultResponse);
ESPmethod [min_ver("1.05")] GetSDSSubscribers(GetSDSSubscribersRequest, ResultResponse);
ESPmethod [min_ver("1.06")] DisconnectClientConnection(DisconnectClientConnectionRequest, ResultResponse);
ESPmethod [min_ver("1.07")] ListSDSLocks(ListSDSLocksRequest, ResultResponse);
ESPmethod [min_ver("1.06")] UnlockSDSLock(UnlockSDSLockRequest, ResultResponse);
ESPmethod [min_ver("1.06")] SaveSDSStore(SaveSDSStoreRequest, ResultResponse);
ESPmethod [min_ver("1.06")] SetTraceTransactions(SetTraceTransactionsRequest, ResultResponse);
Expand Down
18 changes: 18 additions & 0 deletions esp/services/ws_dali/ws_daliservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,24 @@ bool CWSDaliEx::onDisconnectClientConnection(IEspContext& context, IEspDisconnec
return true;
}

bool CWSDaliEx::onListSDSLocks(IEspContext& context, IEspListSDSLocksRequest& req, IEspResultResponse& resp)
{
try
{
checkAccess(context);

Owned<ILockInfoCollection> lockInfoCollection = querySDS().getLocks();
StringBuffer result;
lockInfoCollection->toString(result);
resp.setResult(result);
}
catch(IException* e)
{
FORWARDEXCEPTION(context, e, ECLWATCH_INTERNAL_ERROR);
}
return true;
}

bool CWSDaliEx::onUnlockSDSLock(IEspContext& context, IEspUnlockSDSLockRequest& req, IEspResultResponse& resp)
{
try
Expand Down
1 change: 1 addition & 0 deletions esp/services/ws_dali/ws_daliservice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class CWSDaliEx : public CWSDali
virtual bool onGetSDSStats(IEspContext& context, IEspGetSDSStatsRequest& req, IEspResultResponse& resp) override;
virtual bool onGetSDSSubscribers(IEspContext& context, IEspGetSDSSubscribersRequest& req, IEspResultResponse& resp) override;
virtual bool onDisconnectClientConnection(IEspContext& context, IEspDisconnectClientConnectionRequest& req, IEspResultResponse& resp) override;
virtual bool onListSDSLocks(IEspContext& context, IEspListSDSLocksRequest& req, IEspResultResponse& resp) override;
virtual bool onUnlockSDSLock(IEspContext& context, IEspUnlockSDSLockRequest& req, IEspResultResponse& resp) override;
virtual bool onSaveSDSStore(IEspContext& context, IEspSaveSDSStoreRequest& req, IEspResultResponse& resp) override;
virtual bool onSetTraceTransactions(IEspContext& context, IEspSetTraceTransactionsRequest& req, IEspResultResponse& resp) override;
Expand Down

0 comments on commit 16bee08

Please sign in to comment.