Skip to content

Commit

Permalink
REMOVE NotifyConditionVector, NotifyCondition, ConditionValueList, Re…
Browse files Browse the repository at this point in the history
…strictionString, AttributeExpression and ContextRegistrationVector
  • Loading branch information
fgalan committed Aug 12, 2024
1 parent eff5984 commit 383e668
Show file tree
Hide file tree
Showing 30 changed files with 2 additions and 1,437 deletions.
1 change: 0 additions & 1 deletion src/lib/cache/subCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <vector>

#include "common/RenderFormat.h"
#include "ngsi/NotifyConditionVector.h"
#include "ngsi/EntityIdVector.h"
#include "ngsi/StringList.h"
#include "apiTypesV2/HttpInfo.h"
Expand Down
33 changes: 0 additions & 33 deletions src/lib/mongoBackend/MongoGlobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2153,39 +2153,6 @@ bool registrationsQuery



/* ****************************************************************************
*
* isCondValueInContextElementResponse -
*/
bool isCondValueInContextElementResponse(ConditionValueList* condValues, ContextElementResponseVector* cerV)
{
/* Empty conValue means that any attribute matches (aka ONANYCHANGE) */
if (condValues->size() == 0)
{
return true;
}

for (unsigned int cvlx = 0; cvlx < condValues->size(); ++cvlx)
{
for (unsigned int aclx = 0; aclx < cerV->size(); ++aclx)
{
ContextAttributeVector caV = (*cerV)[aclx]->entity.attributeVector;

for (unsigned int kx = 0; kx < caV.size(); ++kx)
{
if (caV[kx]->name == (*condValues)[cvlx])
{
return true;
}
}
}
}

return false;
}



/* ****************************************************************************
*
* condValueAttrMatch -
Expand Down
2 changes: 0 additions & 2 deletions src/lib/mongoBackend/MongoGlobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
#include "ngsi/StringList.h"
#include "ngsi/ContextElementResponseVector.h"
#include "ngsi/ContextRegistrationResponseVector.h"
#include "ngsi/ConditionValueList.h"
#include "ngsi/Restriction.h"
#include "ngsi/NotifyConditionVector.h"
#include "ngsi10/UpdateContextResponse.h"
#include "ngsiNotify/Notifier.h"
#include "rest/uriParamNames.h"
Expand Down
6 changes: 0 additions & 6 deletions src/lib/mongoBackend/mongoQueryContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,6 @@ HttpStatusCode mongoQueryContext
LM_T(LmtMongo, ("QueryContext Request"));
LM_T(LmtPagination, ("Offset: %d, Limit: %d, Count: %s", offset, limit, (countP != NULL)? "true" : "false"));

/* FIXME: restriction not supported for the moment */
if (!requestP->restriction.attributeExpression.isEmpty())
{
alarmMgr.badInput(clientIp, "restriction found, but restrictions are not supported by mongo backend");
}

std::string err;
bool ok;
bool limitReached = false;
Expand Down
1 change: 0 additions & 1 deletion src/lib/mongoBackend/mongoUpdateContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include "alarmMgr/alarmMgr.h"
#include "ngsi10/UpdateContextRequest.h"
#include "ngsi10/UpdateContextResponse.h"
#include "ngsi/NotifyCondition.h"
#include "rest/HttpStatusCode.h"

#include "ngsiNotify/QueueNotifier.h"
Expand Down
102 changes: 0 additions & 102 deletions src/lib/ngsi/AttributeExpression.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions src/lib/ngsi/AttributeExpression.h

This file was deleted.

12 changes: 0 additions & 12 deletions src/lib/ngsi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,11 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)

SET (SOURCES
AttributeExpression.cpp
ConditionValueList.cpp
ContextAttribute.cpp
ContextAttributeVector.cpp
ContextElementResponse.cpp
ContextElementResponseVector.cpp
ContextRegistration.cpp
ContextRegistrationVector.cpp
ContextRegistrationAttribute.cpp
ContextRegistrationAttributeVector.cpp
ContextRegistrationResponse.cpp
Expand All @@ -37,40 +34,31 @@ SET (SOURCES
EntityIdVector.cpp
Metadata.cpp
MetadataVector.cpp
NotifyCondition.cpp
NotifyConditionVector.cpp
ProvidingApplication.cpp
Request.cpp
Restriction.cpp
RestrictionString.cpp
Scope.cpp
ScopeVector.cpp
StatusCode.cpp
StringList.cpp
)

SET (HEADERS
AttributeExpression.h
ConditionValueList.h
ContextAttribute.h
ContextAttributeVector.h
ContextElementResponse.h
ContextElementResponseVector.h
ContextRegistrationAttribute.h
ContextRegistrationAttributeVector.h
ContextRegistration.h
ContextRegistrationVector.h
ContextRegistrationResponse.h
ContextRegistrationResponseVector.h
EntityId.h
EntityIdVector.h
Metadata.h
MetadataVector.h
NotifyCondition.h
NotifyConditionVector.h
ProvidingApplication.h
Restriction.h
RestrictionString.h
Scope.h
StatusCode.h
StringList.h
Expand Down
Loading

0 comments on commit 383e668

Please sign in to comment.