2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef SERVERGDBUS_H_
18 #define SERVERGDBUS_H_
23 #include "smartcard-service-gdbus.h"
25 namespace smartcard_service_api
30 GDBusProxy *dbus_proxy;
32 static ServerGDBus &getInstance();
37 /* connect to dbus daemon */
40 pid_t getPID(const char *name);
42 void emitReaderInserted(unsigned int reader_id,
43 const char *reader_name);
44 void emitReaderRemoved(unsigned int reader_id,
45 const char *reader_name);
49 GDBusConnection *connection;
51 SmartcardServiceSeService *seService;
52 SmartcardServiceReader *reader;
53 SmartcardServiceSession *session;
54 SmartcardServiceChannel *channel;
59 static void name_owner_changed(GDBusProxy *proxy,
60 const gchar *name, const gchar *old_owner,
61 const gchar *new_owner, void *user_data);
64 void deinitSEService();
75 } /* namespace smartcard_service_api */
77 #endif /* SERVERGDBUS_H_ */