Commit 3c76a437 authored by Ryan Berkheimer's avatar Ryan Berkheimer

updated new class references in MessageApiEndpointLib

parent c771d06e
...@@ -84,14 +84,6 @@ struct record_list *ProtocolRecordUtils::getRecords(const char *recordMethod, co ...@@ -84,14 +84,6 @@ struct record_list *ProtocolRecordUtils::getRecords(const char *recordMethod, co
return record_list; return record_list;
} }
struct record *ProtocolRecordUtils::getRecord(struct record_list *record_list, int index)
{
jobject jrecord = this->jvm->CallObjectMethod(record_list->jrecords, this->listUtils->getListItemMethod(), index);
struct record *record = (struct record *)malloc(sizeof(struct record) + sizeof(jrecord));
record->jrecord = jrecord;
return record;
}
void ProtocolRecordUtils::loadGlobalRefs(JNIEnv *jvm, jobject protocolRecord, TypeUtils *typeUtils, ListUtils *listUtils) void ProtocolRecordUtils::loadGlobalRefs(JNIEnv *jvm, jobject protocolRecord, TypeUtils *typeUtils, ListUtils *listUtils)
{ {
this->jvm = jvm; this->jvm = jvm;
......
...@@ -32,7 +32,6 @@ public: ...@@ -32,7 +32,6 @@ public:
/*Protocol Record Methods*/ /*Protocol Record Methods*/
jobject getProtocolRecords(const char *method, const char *key, const char *val); jobject getProtocolRecords(const char *method, const char *key, const char *val);
struct record_list *getRecords(const char *method, const char *key = NULL, const char *val = NULL); struct record_list *getRecords(const char *method, const char *key = NULL, const char *val = NULL);
struct record *getRecord(struct record_list *record_list, int index);
private: private:
/*Vars*/ /*Vars*/
......
...@@ -144,6 +144,13 @@ void RecordUtils::addRecord(struct record_list *record_list, struct record *reco ...@@ -144,6 +144,13 @@ void RecordUtils::addRecord(struct record_list *record_list, struct record *reco
record_list->count += 1; record_list->count += 1;
} }
struct record *RecordUtils::getRecord(struct record_list *record_list, int index)
{
jobject jrecord = this->jvm->CallObjectMethod(record_list->jrecords, this->listUtils->getListItemMethod(), index);
struct record *record = (struct record *)malloc(sizeof(struct record) + sizeof(jrecord));
record->jrecord = jrecord;
return record;
}
/*Private methods*/ /*Private methods*/
......
...@@ -23,15 +23,19 @@ class RecordUtils ...@@ -23,15 +23,19 @@ class RecordUtils
public: public:
/*Default constructor/destructors*/ /*Default constructor/destructors*/
RecordUtils(JNIEnv *javaEnv, TypeUtils *typeUtils, ListUtils *listUtils); RecordUtils(JNIEnv *javaEnv, TypeUtils *typeUtils, ListUtils *listUtils);
~RecordUtils(); ~RecordUtils();
/*Record Methods*/ /*Record Methods*/
struct record_list *createRecordList(); struct record_list *createRecordList();
void addRecord(struct record_list *record_list, struct record *record); void addRecord(struct record_list *record_list, struct record *record);
struct record *getRecord(struct record_list *record_list, int index);
struct record *getCopy(struct record *record); struct record *getCopy(struct record *record);
bool isValid(struct record *record); bool isValid(struct record *record);
bool hasField(struct record *record, const char *fieldId); bool hasField(struct record *record, const char *fieldId);
struct string_list *getFieldIds(struct record *record); struct string_list *getFieldIds(struct record *record);
struct field_list *getFields(struct record *record); struct field_list *getFields(struct record *record);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment