Exemple #1
0
    def __makeBlob(self, store):
        dg = PyDatagram()
        if self.__list:
            dg.addUint8(CatalogItem.CatalogItemVersion)
            for item in self.__list:
                CatalogItem.encodeCatalogItem(dg, item, store)

        return dg.getMessage()
Exemple #2
0
    def __makeBlob(self, store):
        dg = PyDatagram()
        if self.__list:
            dg.addUint8(CatalogItem.CatalogItemVersion)
            for item in self.__list:
                CatalogItem.encodeCatalogItem(dg, item, store)

        return dg.getMessage()
Exemple #3
0
 def __makeBlob(self, store):
     # Construct a new datagram and fill it up with the items in
     # the list.
     dg = PyDatagram()
     if self.__list:  # empty list or None means nothing on the list.
         dg.addUint8(CatalogItem.CatalogItemVersion)
         for item in self.__list:
             CatalogItem.encodeCatalogItem(dg, item, store)
     return dg.getMessage()
Exemple #4
0
    def __makeList(self, store):
        list = []
        if self.__blob:
            dg = PyDatagram(self.__blob)
            di = PyDatagramIterator(dg)
            versionNumber = di.getUint8()
            while di.getRemainingSize() > 0:
                item = CatalogItem.decodeCatalogItem(di, versionNumber, store)
                list.append(item)

        return list
Exemple #5
0
    def __makeList(self, store):
        list = []
        if self.__blob:
            dg = PyDatagram(self.__blob)
            di = PyDatagramIterator(dg)
            versionNumber = di.getUint8()
            while di.getRemainingSize() > 0:
                item = CatalogItem.decodeCatalogItem(di, versionNumber, store)
                list.append(item)

        return list
Exemple #6
0
 def __makeList(self, store):
     # Construct a new list and populate it with the items decoded
     # from the blob.
     list = []
     if self.__blob:  # empty string or None means nothing on the list.
         dg = PyDatagram(self.__blob)
         di = PyDatagramIterator(dg)
         versionNumber = di.getUint8()
         while di.getRemainingSize() > 0:
             item = CatalogItem.decodeCatalogItem(di, versionNumber, store)
             list.append(item)
     return list