Correct some typo and add missing feature define
[platform/core/telephony/tel-plugin-packetservice.git] / src / ps_log.c
1 /*
2  * tel-plugin-packetservice
3  *
4  * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: DongHoo Park <donghoo.park@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 #include <tcore.h>
23 #include <server.h>
24 #include <core_object.h>
25
26 #include <glib.h>
27
28 #include "ps_log.h"
29
30 const char *ps_log_tag_name[PS_SUBS_MAX] = {
31         [PS_SUBS_PRIMARY] = "PS/SUBS-0",
32         [PS_SUBS_SECONDARY] = "PS/SUBS-1",
33 };
34
35 const gchar *ps_log_get_tag_by_modem(ps_modem_t *modem)
36 {
37         ps_subs_type subs_type = modem ? modem->subs_type : PS_SUBS_PRIMARY;
38         return ps_log_tag_name[subs_type];
39 }
40
41 const gchar *ps_log_get_tag_by_service(ps_service_t *service)
42 {
43         ps_subs_type subs_type = service ? service->subs_type : PS_SUBS_PRIMARY;
44         return ps_log_tag_name[subs_type];
45 }
46
47 const gchar *ps_log_get_tag_by_context(ps_context_t *context)
48 {
49         ps_subs_type subs_type = context ? context->subs_type : PS_SUBS_PRIMARY;
50         return ps_log_tag_name[subs_type];
51 }
52