2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file download-manager-event.h
19 * @author Jungki Kwak (jungki.kwak@samsung.com)
20 * @brief Download event class
22 #ifndef DOWNLOAD_MANAGER_EVENT_H
23 #define DOWNLOAD_MANAGER_EVENT_H
38 void attach(Observer *);
39 void detach(Observer *);
43 vector<Observer*> _observers;
46 typedef void (*updateFunction)(void *data);
52 Observer(updateFunction uf, void *data, const char *name);
53 //Observer(updateFunction uf, void *data);
56 void update(Subject *s);
57 void set(updateFunction uf, void *data);
59 void *getUserData(void) { return m_userData; }
61 string name(void) { return observerName; }
66 updateFunction m_updateFunction;
72 #endif /* DOWNLOAD_MANAGER_EVENT_H */