Added missing BMessage::{Get|Set}String() methods.

* Forgot to add those before accidentally.
This commit is contained in:
Axel Dörfler
2012-11-12 23:56:14 +01:00
parent 25a627d880
commit a2f6e5ac9c
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -475,6 +475,9 @@ public:
status_t SetInt64(const char* name, int64 value);
status_t SetUInt64(const char* name, uint64 value);
status_t SetPointer(const char* name, const void* value);
status_t SetString(const char* name, const char* string);
status_t SetString(const char* name,
const BString& string);
status_t SetFloat(const char* name, float value);
status_t SetDouble(const char* name, double value);
status_t SetAlignment(const char* name,
+8
View File
@@ -2564,6 +2564,7 @@ DEFINE_SET_GET_FUNCTIONS(uint64, UInt64, B_UINT64_TYPE);
DEFINE_SET_GET_FUNCTIONS(bool, Bool, B_BOOL_TYPE);
DEFINE_SET_GET_FUNCTIONS(float, Float, B_FLOAT_TYPE);
DEFINE_SET_GET_FUNCTIONS(double, Double, B_DOUBLE_TYPE);
DEFINE_SET_GET_FUNCTIONS(const char *, String, B_STRING_TYPE);
#undef DEFINE_SET_GET_FUNCTION
@@ -3135,6 +3136,13 @@ BMessage::HasFlat(const char *name, int32 index, const BFlattenable *object)
}
status_t
BMessage::SetString(const char *name, const BString& value)
{
return SetData(name, B_STRING_TYPE, value.String(), value.Length() + 1);
}
status_t
BMessage::SetData(const char* name, type_code type, const void* data,
ssize_t numBytes)