Skip to content

Commit

Permalink
Remove java class name in JNI
Browse files Browse the repository at this point in the history
  • Loading branch information
joonhaengHeo committed Jan 3, 2024
1 parent c789217 commit 3b76d86
Show file tree
Hide file tree
Showing 6 changed files with 170 additions and 189 deletions.
302 changes: 113 additions & 189 deletions src/controller/java/MatterInteractionClient-JNI.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ public ChipPathId getAttributeId() {
return attributeId;
}

// For use in JNI.
long getEndpointId(long wildcardValue) {
return endpointId.getId(wildcardValue);
}

long getClusterId(long wildcardValue) {
return clusterId.getId(wildcardValue);
}

long getAttributeId(long wildcardValue) {
return attributeId.getId(wildcardValue);
}

public int getDataVersion() {
return dataVersion.orElse(0);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@ public ChipPathId getAttributeId() {
return attributeId;
}

// For use in JNI.
long getEndpointId(long wildcardValue) {
return endpointId.getId(wildcardValue);
}

long getClusterId(long wildcardValue) {
return clusterId.getId(wildcardValue);
}

long getAttributeId(long wildcardValue) {
return attributeId.getId(wildcardValue);
}

@Override
public boolean equals(Object object) {
if (object instanceof ChipAttributePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,19 @@ public ChipPathId getEventId() {
return eventId;
}

// For use in JNI.
long getEndpointId(long wildcardValue) {
return endpointId.getId(wildcardValue);
}

long getClusterId(long wildcardValue) {
return clusterId.getId(wildcardValue);
}

long getEventId(long wildcardValue) {
return eventId.getId(wildcardValue);
}

public boolean isUrgent() {
return isUrgent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public IdType getType() {
return type;
}

// For use in JNI.
long getId(long wildCardValue) {
return type == IdType.WILDCARD ? wildCardValue : id;
}

@Override
public boolean equals(Object object) {
if (object instanceof ChipPathId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,19 @@ public ChipPathId getCommandId() {
return commandId;
}

// For use in JNI.
long getEndpointId(long wildcardValue) {
return endpointId.getId(wildcardValue);
}

long getClusterId(long wildcardValue) {
return clusterId.getId(wildcardValue);
}

long getCommandId(long wildcardValue) {
return commandId.getId(wildcardValue);
}

public Optional<Integer> getGroupId() {
return groupId;
}
Expand Down

0 comments on commit 3b76d86

Please sign in to comment.