Example #1
0
    bool
    Changer::MoveCartridge(
            Slot & slot,
            Cartridge & cartridge,
            Error & error)
    {
        boost::lock_guard<boost::mutex> lock(detail_->mutex);

        int slotIDSrc;
        if ( ! cartridge.GetSlotID(slotIDSrc,error) ) {
            return false;
        }
        int slotIDDst;
        if ( ! slot.GetSlotID(slotIDDst,error) ) {
            return false;
        }

        return detail_->MoveCartridge(slotIDSrc,slotIDDst,cartridge,error);
    }