00001 // 00002 // plumbing - C++ wrapper facades for Berkeley sockets 00003 // Copyright (C) 2009 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify it 00006 // under the terms of the GNU General Public License, version 3, as published 00007 // by the Free Software Foundation. 00008 // 00009 // This program is distributed in the hope that it will be useful, but WITHOUT 00010 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00012 // more details. 00013 // 00014 // You should have received a copy of the GNU General Public License along with 00015 // this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #include <libplumbing/at/job.h> 00019 #include <libplumbing/at/service.h> 00020 00021 00022 plumbing::at_job::~at_job() 00023 { 00024 unregister(); 00025 } 00026 00027 void 00028 plumbing::at_job::unregister() 00029 { 00030 if (death_subscriber) 00031 { 00032 death_subscriber->unregister_job(this); 00033 death_subscriber = 0; 00034 } 00035 } 00036 00037 00038 plumbing::at_job::at_job() : 00039 death_subscriber(0) 00040 { 00041 } 00042 00043 00044 void 00045 plumbing::at_job::death_subscribe(at_service *sp) 00046 { 00047 death_subscriber = sp; 00048 } 00049 00050 00051 // vim: set ts=4 et