//----------------------------------------------------------------------// This software is part of the Haiku distribution and is covered// by the MIT License.//---------------------------------------------------------------------#include "AddOnImage.h"// constructorAddOnImage::AddOnImage(): fID(-1){}// destructorAddOnImage::~AddOnImage(){Unload();}// Loadstatus_tAddOnImage::Load(const char* path){Unload();status_t error = (path ? B_OK : B_BAD_VALUE);if (error == B_OK) {image_id id = load_add_on(path);if (id >= 0)fID = id;elseerror = id;}return error;}// UnloadvoidAddOnImage::Unload(){if (fID >= 0) {unload_add_on(fID);fID = -1;}}// SetIDvoidAddOnImage::SetID(image_id id){Unload();if (id >= 0)fID = id;}