Переглянути джерело

remove function defns that are never implemented

The swig-generated modules don't load otherwise.
Julius Pfrommer 10 роки тому
батько
коміт
7fae61e566
5 змінених файлів з 33 додано та 26 видалено
  1. 1 1
      src/ua_namespace.h
  2. 2 2
      src/ua_namespace_xml.h
  3. 10 0
      src/ua_types.h
  4. 17 18
      src/ua_types_encoding_xml.c
  5. 3 5
      src/ua_xml.h

+ 1 - 1
src/ua_namespace.h

@@ -49,7 +49,7 @@ void Namespace_delete(Namespace * ns);
 UA_Int32 Namespace_insert(Namespace * ns, const UA_Node * node);
 
 /** @brief Insert a new node or replace an existing node if an entry has the same NodeId. */
-UA_Int32 Namespace_insertOrReplace(Namespace * ns, const UA_Node * node);
+// UA_Int32 Namespace_insertOrReplace(Namespace * ns, const UA_Node * node);
 
 /** @brief Find an unused (numeric) NodeId in the namespace and insert the node.
 	The node is modified to contain the new nodeid after insertion. */

+ 2 - 2
src/ua_namespace_xml.h

@@ -8,12 +8,12 @@
 void print_node(UA_Node const * node);
 UA_Int32 UA_NodeSetAlias_init(UA_NodeSetAlias* p);
 UA_Int32 UA_NodeSetAlias_new(UA_NodeSetAlias** p);
-UA_Int32 UA_NodeSetAlias_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAlias* dst, _Bool isStart);
+//UA_Int32 UA_NodeSetAlias_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAlias* dst, _Bool isStart);
 
 UA_Int32 UA_NodeSetAliases_init(UA_NodeSetAliases* p);
 UA_Int32 UA_NodeSetAliases_new(UA_NodeSetAliases** p);
 UA_Int32 UA_NodeSetAliases_println(cstring label, UA_NodeSetAliases *p);
-UA_Int32 UA_NodeSetAliases_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAliases* dst, _Bool isStart);
+//UA_Int32 UA_NodeSetAliases_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAliases* dst, _Bool isStart);
 
 typedef struct UA_NodeSet {
 	Namespace* ns;

+ 10 - 0
src/ua_types.h

@@ -293,9 +293,11 @@ UA_TYPE_PROTOTYPES(UA_InvalidType)
 UA_Int32 UA_String_copycstring(char const *src, UA_String *dst);
 UA_Int32 UA_String_copyprintf(char const *fmt, UA_String *dst, ...);
 UA_Int32 UA_String_equal(const UA_String *string1, const UA_String *string2);
+#ifdef DEBUG
 void UA_String_printf(char const *label, const UA_String *string);
 void UA_String_printx(char const *label, const UA_String *string);
 void UA_String_printx_hex(char const *label, const UA_String *string);
+#endif
 
 /* DateTime */
 UA_DateTime UA_DateTime_now();
@@ -319,13 +321,17 @@ UA_Int32 UA_Guid_equal(const UA_Guid *g1, const UA_Guid *g2);
 /* ByteString */
 UA_Int32 UA_ByteString_equal(const UA_ByteString *string1, const UA_ByteString *string2);
 UA_Int32 UA_ByteString_newMembers(UA_ByteString *p, UA_Int32 length);
+#ifdef DEBUG
 void UA_ByteString_printf(char *label, const UA_ByteString *string);
 void UA_ByteString_printx(char *label, const UA_ByteString *string);
 void UA_ByteString_printx_hex(char *label, const UA_ByteString *string);
+#endif
 
 /* NodeId */
 UA_Int32 UA_NodeId_equal(const UA_NodeId *n1, const UA_NodeId *n2);
+#ifdef DEBUG
 void UA_NodeId_printf(char *label, const UA_NodeId *node);
+#endif
 UA_Boolean UA_NodeId_isNull(const UA_NodeId *p);
 UA_Boolean UA_NodeId_isBasicType(UA_NodeId const *id);
 
@@ -335,7 +341,9 @@ UA_Boolean UA_ExpandedNodeId_isNull(const UA_ExpandedNodeId *p);
 /* QualifiedName */
 #define UA_QUALIFIEDNAME_STATIC(STRING) \
 	(UA_QualifiedName){0, {sizeof(STRING)-1, (UA_Byte*)STRING}}
+#ifdef DEBUG
 void UA_QualifiedName_printf(char const *label, const UA_QualifiedName *qn);
+#endif
 
 /* LocalizedText */
 #define UA_LOCALIZEDTEXT_STATIC(STRING) (UA_LocalizedText){{2, (UA_Byte*)"en"}, UA_STRING_STATIC(STRING)}
@@ -360,7 +368,9 @@ UA_Int32 UA_Array_delete(void *p, UA_Int32 noElements, UA_VTable_Entry *vt);
 
 /* @brief The destination array is allocated according to noElements. */
 UA_Int32 UA_Array_copy(const void *src, UA_Int32 noElements, UA_VTable_Entry *vt, void **dst);
+#ifdef DEBUG
 void UA_Array_print(const void *p, UA_Int32 noElements, UA_VTable_Entry *vt, FILE *stream);
+#endif
 
 /**********/
 /* VTable */

+ 17 - 18
src/ua_types_encoding_xml.c

@@ -14,19 +14,18 @@ UA_Int32 UA_Boolean_copycstring(cstring src, UA_Boolean *dst) {
 
 UA_TYPE_METHOD_CALCSIZEXML_NOTIMPL(UA_Boolean)
 UA_TYPE_METHOD_ENCODEXML_NOTIMPL(UA_Boolean)
-UA_Int32 UA_Boolean_decodeXML(XML_Stack *s, XML_Attr *attr, UA_Boolean *dst, _Bool isStart) {
-	DBG_VERBOSE(printf("UA_Boolean entered with dst=%p,isStart=%d\n", (void * )dst, isStart));
-	if(isStart) {
-		if(dst == UA_NULL) {
-			UA_Boolean_new(&dst);
-			s->parent[s->depth - 1].children[s->parent[s->depth - 1].activeChild].obj = (void *)dst;
-		}
-		UA_Boolean_copycstring((cstring)attr[1], dst);
-	}
-	return UA_SUCCESS;
-}
-
-UA_TYPE_DECODEXML_FROM_BYTESTRING(UA_Boolean)
+UA_TYPE_METHOD_DECODEXML_NOTIMPL(UA_Boolean)
+/* UA_Int32 UA_Boolean_decodeXML(XML_Stack *s, XML_Attr *attr, UA_Boolean *dst, _Bool isStart) { */
+/* 	DBG_VERBOSE(printf("UA_Boolean entered with dst=%p,isStart=%d\n", (void * )dst, isStart)); */
+/* 	if(isStart) { */
+/* 		if(dst == UA_NULL) { */
+/* 			UA_Boolean_new(&dst); */
+/* 			s->parent[s->depth - 1].children[s->parent[s->depth - 1].activeChild].obj = (void *)dst; */
+/* 		} */
+/* 		UA_Boolean_copycstring((cstring)attr[1], dst); */
+/* 	} */
+/* 	return UA_SUCCESS; */
+/* } */
 
 /* SByte */
 UA_TYPE_METHOD_CALCSIZEXML_NOTIMPL(UA_SByte)
@@ -257,11 +256,11 @@ UA_TYPE_DECODEXML_FROM_BYTESTRING(UA_ExpandedNodeId)
 /* StatusCode */
 UA_TYPE_METHOD_CALCSIZEXML_NOTIMPL(UA_StatusCode)
 UA_TYPE_METHOD_ENCODEXML_NOTIMPL(UA_StatusCode)
-UA_Int32 UA_StatusCode_decodeXML(XML_Stack *s, XML_Attr *attr, UA_StatusCode *dst, _Bool isStart) {
-	DBG_VERBOSE(printf("UA_StatusCode_decodeXML entered with dst=%p,isStart=%d\n", (void * )dst, isStart));
-	return UA_ERR_NOT_IMPLEMENTED;
-}
-UA_TYPE_DECODEXML_FROM_BYTESTRING(UA_StatusCode)
+UA_TYPE_METHOD_DECODEXML_NOTIMPL(UA_StatusCode)
+/* UA_Int32 UA_StatusCode_decodeXML(XML_Stack *s, XML_Attr *attr, UA_StatusCode *dst, _Bool isStart) { */
+/* 	DBG_VERBOSE(printf("UA_StatusCode_decodeXML entered with dst=%p,isStart=%d\n", (void * )dst, isStart)); */
+/* 	return UA_ERR_NOT_IMPLEMENTED; */
+/* } */
 
 /* QualifiedName */
 UA_TYPE_METHOD_CALCSIZEXML_NOTIMPL(UA_QualifiedName)

+ 3 - 5
src/ua_xml.h

@@ -22,14 +22,14 @@ typedef struct UA_NodeSetAlias {
 	UA_String alias;
 	UA_String value;
 } UA_NodeSetAlias;
-UA_TYPE_PROTOTYPES(UA_NodeSetAlias)
+//UA_TYPE_PROTOTYPES(UA_NodeSetAlias)
 
 /** @brief UA_NodeSetAliases - a list of aliases */
 typedef struct UA_NodeSetAliases {
 	UA_Int32 size;
 	UA_NodeSetAlias **aliases;
 } UA_NodeSetAliases;
-UA_TYPE_PROTOTYPES(UA_NodeSetAliases)
+//UA_TYPE_PROTOTYPES(UA_NodeSetAliases)
 
 typedef struct XML_child {
 	cstring     name;
@@ -72,16 +72,14 @@ UA_Int32 UA_TypedArray_init(UA_TypedArray *p);
 /** @brief allocate memory for the array header only */
 UA_Int32 UA_TypedArray_new(UA_TypedArray **p);
 UA_Int32 UA_TypedArray_setType(UA_TypedArray *p, UA_Int32 type);
-UA_Int32 UA_TypedArray_decodeXML(XML_Stack *s, XML_Attr *attr, UA_TypedArray *dst, UA_Boolean isStart);
+//UA_Int32 UA_TypedArray_decodeXML(XML_Stack *s, XML_Attr *attr, UA_TypedArray *dst, UA_Boolean isStart);
 
 UA_Int32 UA_NodeSetAlias_init(UA_NodeSetAlias* p);
 UA_Int32 UA_NodeSetAlias_new(UA_NodeSetAlias** p);
-UA_Int32 UA_NodeSetAlias_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAlias* dst, _Bool isStart);
 
 UA_Int32 UA_NodeSetAliases_init(UA_NodeSetAliases* p);
 UA_Int32 UA_NodeSetAliases_new(UA_NodeSetAliases** p);
 UA_Int32 UA_NodeSetAliases_println(cstring label, UA_NodeSetAliases *p);
-UA_Int32 UA_NodeSetAliases_decodeXML(XML_Stack* s, XML_Attr* attr, UA_NodeSetAliases* dst, _Bool isStart);
 
 UA_Int32 UA_ExpandedNodeId_copycstring(cstring src, UA_ExpandedNodeId* dst, UA_NodeSetAliases* aliases);