Lines Matching defs:attribute

126 	// write the type attribute
146 /*! Reads up to \c length bytes of the given data from the given attribute
153 \param attribute The attribute name.
162 DatabaseLocation::ReadAttribute(const char* type, const char* attribute,
165 if (type == NULL || attribute == NULL || data == NULL)
173 return node.ReadAttr(attribute, datatype, 0, data, length);
177 /*! Reads a flattened BMessage from the given attribute of the given
181 stored in the attribute is not a flattened BMessage, the function fails
185 \param attribute The attribute name.
186 \param data Reference to a pre-allocated BMessage into which the attribute
192 DatabaseLocation::ReadMessageAttribute(const char* type, const char* attribute,
195 if (type == NULL || attribute == NULL)
205 result = node.GetAttrInfo(attribute, &info);
217 ssize_t bytesRead = node.ReadAttr(attribute, B_MESSAGE_TYPE, 0, buffer,
226 /*! Reads a BString from the given attribute of the given MIME type.
232 \param attribute The attribute name.
233 \param _string Reference to a pre-allocated BString into which the attribute
239 DatabaseLocation::ReadStringAttribute(const char* type, const char* attribute,
242 if (type == NULL || attribute == NULL)
250 return node.ReadAttrString(attribute, &_string);
254 /*! Writes \c len bytes of the given data to the given attribute
260 \param attribute The attribute name.
268 DatabaseLocation::WriteAttribute(const char* type, const char* attribute,
271 if (type == NULL || attribute == NULL || data == NULL)
279 ssize_t bytesWritten = node.WriteAttr(attribute, datatype, 0, data, length);
287 /*! Flattens the given \c BMessage and writes it to the given attribute
293 \param attribute The attribute name.
299 DatabaseLocation::WriteMessageAttribute(const char* type, const char* attribute,
312 return WriteAttribute(type, attribute, data.Buffer(), data.BufferLength(),
317 /*! Deletes the given attribute for the given type
320 \param attribute The attribute name
324 \retval B_ENTRY_NOT_FOUND No such type or attribute.
327 DatabaseLocation::DeleteAttribute(const char* type, const char* attribute) const
329 if (type == NULL || attribute == NULL)
337 return node.RemoveAttr(attribute);
376 The attribute information is returned in a pre-allocated BMessage pointed to
564 // construct our attribute name
621 // construct our attribute name
629 // get info about attribute for that name
634 // validate attribute type
638 // allocate a buffer and read the attribute data into it
822 char attribute[B_ATTR_NAME_LENGTH];
823 while (source.GetNextAttrName(attribute) == B_OK) {
825 result = source.GetAttrInfo(attribute, &info);
827 syslog(LOG_ERR, "Failed to get info for attribute \"%s\" of MIME "
828 "type \"%s\": %s", attribute, type, strerror(result));
840 ssize_t bytesRead = source.ReadAttr(attribute, info.type, 0,
843 syslog(LOG_ERR, "Failed to read attribute \"%s\" of MIME "
844 "type \"%s\": %s", attribute, type,
849 ssize_t bytesWritten = _target.WriteAttr(attribute, info.type, 0,
852 syslog(LOG_ERR, "Failed to write attribute \"%s\" of MIME "
853 "type \"%s\": %s", attribute, type,