renaming target member (tagType) for retro-compatibility
authorFrederic PAUT <frederic.paut@linux.intel.com>
Wed, 22 Feb 2012 09:16:55 +0000 (10:16 +0100)
committerFrederic PAUT <frederic.paut@linux.intel.com>
Wed, 22 Feb 2012 09:16:55 +0000 (10:16 +0100)
lib/neardal.c
lib/neardal.h
lib/neardal_target.c
lib/neardal_target.h
ncl/ncl_cmd.c

index d9dcbc1..4fb075c 100644 (file)
@@ -373,7 +373,7 @@ errorCode_t neardal_get_target_properties(neardal_t neardalMgr,
                goto exit;
 
        target->records = NULL;
-       target->tagsType        = NULL;
+       target->tagType = NULL;
        err = neardal_mgr_prv_get_adapter(neardalMgr, tgtName,
                                                   &adpProp);
        if (err != NEARDAL_SUCCESS)
@@ -404,22 +404,22 @@ errorCode_t neardal_get_target_properties(neardal_t neardalMgr,
        }
 
        target->nbTagTypes = 0;
-       target->tagsType = NULL;
+       target->tagType = NULL;
        /* Count TagTypes */
-       target->nbTagTypes = tgtProp->tagsTypeLen;
+       target->nbTagTypes = tgtProp->tagTypeLen;
 
        if (target->nbTagTypes <= 0)
                goto exit;
 
        err = NEARDAL_ERROR_NO_MEMORY;
        size = (target->nbTagTypes + 1) * sizeof(char *);
-       target->tagsType = g_try_malloc0(size);
-       if (target->tagsType == NULL)
+       target->tagType = g_try_malloc0(size);
+       if (target->tagType == NULL)
                goto exit;
 
        ct = 0;
        while (ct < target->nbTagTypes) {
-               target->tagsType[ct] = g_strdup(tgtProp->tagsType[ct]);
+               target->tagType[ct] = g_strdup(tgtProp->tagType[ct]);
                ct++;
        }
        err = NEARDAL_SUCCESS;
index 6a12724..a0cd4e2 100644 (file)
@@ -82,7 +82,7 @@ typedef struct {
 /*! @brief Number of supported 'types' in target */
        int             nbTagTypes;
 /*! @brief types list (use @link neardal_free_array @endlink(& ) to free) */
-       char            **tagsType;
+       char            **tagType;
 /*! @brief target type */
        const char      *type;
 /*! @brief Read-Only flag (is target writable?) */
index f2e5411..e83bf1a 100644 (file)
@@ -117,11 +117,11 @@ static errorCode_t neardal_tgt_prv_read_properties(TgtProp *tgtProp)
 
        tmpOut = g_variant_lookup_value(tmp, "TagType", G_VARIANT_TYPE_ARRAY);
        if (tmpOut != NULL) {
-               tgtProp->tagsType = g_variant_dup_strv (tmpOut, &len);
-               tgtProp->tagsTypeLen = len;
+               tgtProp->tagType = g_variant_dup_strv (tmpOut, &len);
+               tgtProp->tagTypeLen = len;
                if (len == 0) {
-                       g_strfreev(tgtProp->tagsType);
-                       tgtProp->tagsType = NULL;
+                       g_strfreev(tgtProp->tagType);
+                       tgtProp->tagType = NULL;
                }
        }
 
@@ -202,7 +202,7 @@ static void neardal_tgt_prv_free(TgtProp **tgtProp)
        }
        g_free((*tgtProp)->name);
        g_free((*tgtProp)->type);
-       g_strfreev((*tgtProp)->tagsType);
+       g_strfreev((*tgtProp)->tagType);
        g_free((*tgtProp));
        (*tgtProp) = NULL;
 }
index 10e8e58..3999b0a 100644 (file)
@@ -45,8 +45,8 @@ typedef struct {
        gsize           rcdLen;
        GList           *rcdList;       /* target's records paths */
        
-       gchar           **tagsType;     /* array of tag types */
-       gsize           tagsTypeLen;
+       gchar           **tagType;      /* array of tag types */
+       gsize           tagTypeLen;
        gboolean        readOnly;       /* Read-Only flag */
 } TgtProp;
 
index 29a1864..ecb37fc 100644 (file)
@@ -208,7 +208,7 @@ static void ncl_cmd_prv_dump_target(neardal_target target)
        NCL_CMD_PRINT(".. Type:\t\t'%s'\n", target.type);
 
        NCL_CMD_PRINT(".. Number of 'Tag Type':%d\n", target.nbTagTypes);
-       tagTypes = target.tagsType;
+       tagTypes = target.tagType;
        if (target.nbTagTypes > 0) {
                NCL_CMD_PRINT(".. Tags type[]:\t\t");
                while ((*tagTypes) != NULL) {
@@ -216,7 +216,7 @@ static void ncl_cmd_prv_dump_target(neardal_target target)
                        tagTypes++;
                }
                NCL_CMD_PRINT("\n");
-               neardal_free_array(&target.tagsType);
+               neardal_free_array(&target.tagType);
        }
 
        records = target.records;