1/*
2 * Copyright 2009-2011, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include "PackageNodeAttribute.h"
8
9#include <stdlib.h>
10#include <string.h>
11
12
13PackageNodeAttribute::PackageNodeAttribute(uint32 type,
14	const BPackageData& data)
15	:
16	fData(data),
17	fName(NULL),
18	fIndexCookie(NULL),
19	fType(type)
20{
21}
22
23
24PackageNodeAttribute::~PackageNodeAttribute()
25{
26	free(fName);
27}
28
29
30status_t
31PackageNodeAttribute::Init(const char* name)
32{
33	fName = strdup(name);
34	return fName != NULL ? B_OK : B_NO_MEMORY;
35}
36