GDBusConnection *conn;
PacketServiceMaster *if_obj;
GHashTable *modems;
-
- gboolean initial_pdp_conn; // If FALSE, PDP never been connected for any of slots.
} ps_master_t;
typedef struct packet_service_modem {
gboolean ps_attached;
gboolean roaming;
gboolean restricted;
+ gboolean initial_pdp_conn; // If FALSE, PDP never been connected.
gboolean wifi_connected_checked; // If TRUE, We already checked wifi-connected state.
gboolean attach_apn_complete; // set TRUE, initial define is complete for attach APN.
enum telephony_network_access_technology act;
gboolean _ps_master_get_storage_value_int(gpointer master, enum tcore_storage_key key);
gboolean _ps_master_set_storage_value_bool(gpointer master, enum tcore_storage_key key, gboolean value);
gboolean _ps_master_set_storage_value_int(gpointer master, enum tcore_storage_key key, gint value);
-gboolean _ps_master_set_always_on_control(gpointer master, gboolean enable);
/*MODEM*/
void __remove_modem_handler(gpointer modem);
gpointer _ps_modem_create_modem(GDBusConnection *conn, TcorePlugin *p, gpointer master,
gchar* modem_name, gpointer co_modem, gchar *cp_name);
void _ps_modem_destroy_modem(GDBusConnection *conn, gpointer object);
+gboolean _ps_modem_send_filght_mode_request(gpointer value, void *data);
gboolean _ps_modem_processing_flight_mode(gpointer object, gboolean enable);
gboolean _ps_modem_processing_power_enable(gpointer modem, int enable);
gboolean _ps_modem_processing_sim_complete(gpointer modem, gboolean complete, gchar *operator);
void _ps_modem_set_roaming_apn_support(gpointer object, gboolean value);
guchar _ps_modem_get_hook_flag(gpointer modem);
gboolean _ps_modem_get_flght_mode(gpointer object);
+void _ps_modem_set_flght_mode_ups(gpointer object, gboolean value);
+gboolean _ps_modem_get_flght_mode_ups(gpointer object);
gboolean _ps_modem_get_sim_init(gpointer object);
int _ps_modem_get_power(gpointer object);
gchar* _ps_modem_ref_operator(gpointer object);
gboolean _ps_modem_get_properties_handler(gpointer object, GVariantBuilder * properties);
GVariant* _ps_modem_get_properties(gpointer object, GVariantBuilder *properties);
-gpointer _ps_modem_ref_master(gpointer modem);
GHashTable* _ps_modem_ref_services(gpointer modem);
gchar* _ps_modem_ref_path(gpointer modem);
gpointer _ps_modem_ref_plugin(gpointer modem);
int _ps_service_connect_default_context(gpointer service);
void _ps_service_remove_contexts(gpointer object);
void _ps_service_disconnect_contexts(gpointer service);
-void _ps_service_disconnect_internet_mms_tethering_contexts(gpointer object);
+void _ps_service_disconnect_internet_mms_contexts(gpointer object);
gboolean _ps_service_processing_network_event(gpointer service, gboolean ps_attached, gboolean roaming);
gpointer _ps_service_return_default_context(gpointer object, int svc_cat_id);
gpointer _ps_service_return_non_default_context(gpointer object, int svc_cat_id);
<method name="GetModems">
<arg type="a{sa{ss}}" name="modem_hash" direction="out" />
</method>
- <method name="SetAlwayson">
- <arg type="b" name="enable" direction="in" />
- <arg type="b" name="result" direction="out" />
- </method>
<signal name="ModemAdded">
<arg type="a{ss}" name="modem" direction="out" />
</signal>
%define major 0
%define minor 3
-%define patchlevel 44
+%define patchlevel 40
Name: tel-plugin-packetservice
Version: %{major}.%{minor}.%{patchlevel}
INSERT INTO "pdp_profile" VALUES(644,'Vodafone MMS','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401','http://mms1.live.vodafone.in/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,487,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(645,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,487,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(646,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401',NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,487,1,0,1,0,0,0,1);
-INSERT INTO "pdp_profile" VALUES(647,'IDEA Punjab MMS','mmsc',0,NULL,NULL,2,'10.11.12.13:9401','http://10.11.12.180/',300,NULL,NULL,NULL,NULL,NULL,NULL,378,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(648,'IDEA Punjab','internet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,378,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(647,'IDEA Punjab MMS','spice',0,NULL,NULL,2,'10.11.12.13:9401','http://10.11.12.180/',300,NULL,NULL,NULL,NULL,NULL,NULL,378,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(648,'IDEA Punjab','spicegprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,378,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(649,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,500,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(650,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401',NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,500,1,0,1,0,0,0,1);
INSERT INTO "pdp_profile" VALUES(651,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401','http://mms1.live.vodafone.in/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,500,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(688,'Cellone_North MMS','bsnlmms',0,NULL,NULL,2,'10.210.10.11:8080','http://bsnlmmsc.in',300,NULL,NULL,NULL,NULL,NULL,NULL,320,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(689,'Cellone_North','bsnlnet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,320,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(690,'AIRCEL NE MMS','aircelmms',0,NULL,NULL,2,'172.17.83.69:8080','http://10.50.1.166/servlets/mms',300,NULL,NULL,NULL,NULL,NULL,NULL,1048,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(691,'AIRCEL NE','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1048,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(691,'AIRCEL NE','aircelwebpost',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1048,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(692,'Reliance RTel MMS','MMS',0,NULL,NULL,2,'10.239.221.7:8080','http://10.239.221.47/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,383,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(693,'Reliance RTel','SMARTNET',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,383,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(694,'AIRCEL NE MMS','aircelmms',0,NULL,NULL,2,'172.17.83.69:8080','http://10.50.1.166/servlets/mms',300,NULL,NULL,NULL,NULL,NULL,NULL,1049,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(695,'AIRCEL NE','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1049,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(695,'AIRCEL NE','aircelwebpost',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1049,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(696,'CellOne_Kolkata MMS','bsnlmms',0,NULL,NULL,2,'10.210.10.11:8080','http://bsnlmmsc.in:8514',300,NULL,NULL,NULL,NULL,NULL,NULL,316,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(697,'CellOne_Kolkata','bsnlnet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,316,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(698,'Airtel','airtelgprs.com',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,341,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(699,'Airtel MMS','airtelmms.com',0,NULL,NULL,2,'100.1.201.172:8799','http://100.1.201.171:10021/mmsc',300,NULL,NULL,NULL,NULL,NULL,NULL,341,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(700,'AIRCEL TN','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1050,1,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(701,'AIRCEL TN','aircelmms',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,1050,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(702,'AIRCEL TN','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,306,1,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(703,'AIRCEL TN','aircelmms',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,306,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(700,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1050,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(701,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,1050,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(702,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,306,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(703,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,306,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(704,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,499,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(705,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401',NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,499,1,0,1,0,0,0,1);
INSERT INTO "pdp_profile" VALUES(706,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401','http://mms1.live.vodafone.in/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,499,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(707,'IDEA Karnataka','internet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,363,1,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(708,'IDEA Karnataka MMS','mmsc',0,NULL,NULL,2,'10.4.42.15:8080','http://10.4.42.21:8002',300,NULL,NULL,NULL,NULL,NULL,NULL,363,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(707,'IDEA Karnataka','simplyinternet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,363,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(708,'IDEA Karnataka MMS','spicemms',0,NULL,NULL,2,'10.200.200.3:8080','http://10.200.200.3:8514',300,NULL,NULL,NULL,NULL,NULL,NULL,363,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(709,'Airtel','airtelgprs.com',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,345,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(710,'Airtel MMS','airtelmms.com',0,NULL,NULL,2,'100.1.201.172:8799','http://100.1.201.171:10021/mmsc',300,NULL,NULL,NULL,NULL,NULL,NULL,345,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(711,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,493,1,0,1,1,0,0,1);
INSERT INTO network_info VALUES(303, "IND INDOSAT","51001");
INSERT INTO network_info VALUES(304, "IND TELKOMSEL","51010");
INSERT INTO network_info VALUES(305, "AXIS","51008");
-INSERT INTO network_info VALUES(306, "Aircel South","40442");
-INSERT INTO network_info VALUES(307, "Aircel North","405805");
-INSERT INTO network_info VALUES(308, "Aircel North","405806");
-INSERT INTO network_info VALUES(309, "Aircel North","405804");
-INSERT INTO network_info VALUES(310, "Aircel South","405803");
-INSERT INTO network_info VALUES(311, "Aircel North","405802");
-INSERT INTO network_info VALUES(312, "Aircel North","405800");
-INSERT INTO network_info VALUES(313, "Aircel South","405801");
+INSERT INTO network_info VALUES(306, "AIRCEL","40442");
+INSERT INTO network_info VALUES(307, "Aircel","405805");
+INSERT INTO network_info VALUES(308, "Aircel","405806");
+INSERT INTO network_info VALUES(309, "Aircel","405804");
+INSERT INTO network_info VALUES(310, "Aircel","405803");
+INSERT INTO network_info VALUES(311, "Aircel","405802");
+INSERT INTO network_info VALUES(312, "Aircel","405800");
+INSERT INTO network_info VALUES(313, "Aircel","405801");
INSERT INTO network_info VALUES(314, "CellOne","40479");
INSERT INTO network_info VALUES(315, "CellOne","40473");
INSERT INTO network_info VALUES(316, "CellOne","40438");
INSERT INTO network_info VALUES(360, "IDEA","40407");
INSERT INTO network_info VALUES(361, "IDEA","405799");
INSERT INTO network_info VALUES(362, "IDEA","405845");
-INSERT INTO network_info VALUES(363, "IDEA KARNATAKA","40444");
+INSERT INTO network_info VALUES(363, "IDEA","40444");
INSERT INTO network_info VALUES(364, "IDEA","405846");
INSERT INTO network_info VALUES(365, "IDEA","40456");
INSERT INTO network_info VALUES(366, "IDEA","40489");
INSERT INTO network_info VALUES(375, "IDEA","405853");
INSERT INTO network_info VALUES(376, "IDEA","40412");
INSERT INTO network_info VALUES(377, "IDEA","40422");
-INSERT INTO network_info VALUES(378, "IDEA PUNJAB","40414");
+INSERT INTO network_info VALUES(378, "IDEA","40414");
INSERT INTO network_info VALUES(379, "IDEA","405849");
INSERT INTO network_info VALUES(380, "IDEA","40478");
INSERT INTO network_info VALUES(381, "IN-DOLPHIN","40468");
INSERT INTO network_info VALUES(382, "IN-DOLPHIN","40469");
-INSERT INTO network_info VALUES(383, "Reliance Rtel","40436");
-INSERT INTO network_info VALUES(384, "Reliance Rtel","40418");
-INSERT INTO network_info VALUES(385, "Reliance Rtel","40409");
-INSERT INTO network_info VALUES(386, "Reliance Rtel","40452");
-INSERT INTO network_info VALUES(387, "Reliance Rtel","40450");
-INSERT INTO network_info VALUES(388, "Reliance Rtel","40467");
-INSERT INTO network_info VALUES(389, "Reliance Rtel","40485");
-INSERT INTO network_info VALUES(390, "Reliance Rtel","40483");
-INSERT INTO network_info VALUES(391, "Reliance RCOM","40509");
-INSERT INTO network_info VALUES(392, "Reliance RCOM","40513");
-INSERT INTO network_info VALUES(393, "Reliance RCOM","40507");
-INSERT INTO network_info VALUES(394, "Reliance RCOM","40515");
-INSERT INTO network_info VALUES(395, "Reliance RCOM","40511");
-INSERT INTO network_info VALUES(396, "Reliance RCOM","40505");
-INSERT INTO network_info VALUES(397, "Reliance RCOM","40520");
-INSERT INTO network_info VALUES(398, "Reliance RCOM","40518");
-INSERT INTO network_info VALUES(399, "Reliance RCOM","40519");
-INSERT INTO network_info VALUES(400, "Reliance RCOM","40501");
-INSERT INTO network_info VALUES(401, "Reliance RCOM","40521");
-INSERT INTO network_info VALUES(402, "Reliance RCOM","40506");
-INSERT INTO network_info VALUES(403, "Reliance RCOM","40510");
-INSERT INTO network_info VALUES(404, "Reliance RCOM","40522");
+INSERT INTO network_info VALUES(383, "Reliance","40436");
+INSERT INTO network_info VALUES(384, "Reliance","40418");
+INSERT INTO network_info VALUES(385, "Reliance","40409");
+INSERT INTO network_info VALUES(386, "Reliance","40452");
+INSERT INTO network_info VALUES(387, "Reliance","40450");
+INSERT INTO network_info VALUES(388, "Reliance","40467");
+INSERT INTO network_info VALUES(389, "Reliance","40485");
+INSERT INTO network_info VALUES(390, "Reliance","40483");
+INSERT INTO network_info VALUES(391, "Reliance","40509");
+INSERT INTO network_info VALUES(392, "Reliance","40513");
+INSERT INTO network_info VALUES(393, "Reliance","40507");
+INSERT INTO network_info VALUES(394, "Reliance","40515");
+INSERT INTO network_info VALUES(395, "Reliance","40511");
+INSERT INTO network_info VALUES(396, "Reliance","40505");
+INSERT INTO network_info VALUES(397, "Reliance","40520");
+INSERT INTO network_info VALUES(398, "Reliance","40518");
+INSERT INTO network_info VALUES(399, "Reliance","40519");
+INSERT INTO network_info VALUES(400, "Reliance","40501");
+INSERT INTO network_info VALUES(401, "Reliance","40521");
+INSERT INTO network_info VALUES(402, "Reliance","40506");
+INSERT INTO network_info VALUES(403, "Reliance","40510");
+INSERT INTO network_info VALUES(404, "Reliance","40522");
INSERT INTO network_info VALUES(405, "IND-JIO","405859");
INSERT INTO network_info VALUES(406, "IND-JIO","405860");
INSERT INTO network_info VALUES(407, "IND-JIO","405861");
INSERT INTO "network_info" VALUES(1037,'PLMN_37413','37413');
INSERT INTO "network_info" VALUES(1038,'PLMN_374130','374130');
INSERT INTO "network_info" VALUES(1039,'PLMN_37635','37635');
-INSERT INTO "network_info" VALUES(1040,'Aircel East','40417');
+INSERT INTO "network_info" VALUES(1040,'PLMN_40417','40417');
INSERT INTO "network_info" VALUES(1041,'PLMN_404206','404206');
INSERT INTO "network_info" VALUES(1042,'PLMN_40421','40421');
-INSERT INTO "network_info" VALUES(1043,'Aircel East','40425');
-INSERT INTO "network_info" VALUES(1044,'Aircel East','40428');
-INSERT INTO "network_info" VALUES(1045,'Aircel East','40429');
+INSERT INTO "network_info" VALUES(1043,'PLMN_40425','40425');
+INSERT INTO "network_info" VALUES(1044,'PLMN_40428','40428');
+INSERT INTO "network_info" VALUES(1045,'PLMN_40429','40429');
INSERT INTO "network_info" VALUES(1046,'PLMN_40430','40430');
-INSERT INTO "network_info" VALUES(1047,'Aircel East','40433');
-INSERT INTO "network_info" VALUES(1048,'Aircel North','40435');
-INSERT INTO "network_info" VALUES(1049,'Aircel North','40437');
-INSERT INTO "network_info" VALUES(1050,'Aircel South','40441');
-INSERT INTO "network_info" VALUES(1051,'Aircel East','40491');
-INSERT INTO "network_info" VALUES(1052,'Reliance RCOM','40503');
-INSERT INTO "network_info" VALUES(1053,'Reliance RCOM','40504');
-INSERT INTO "network_info" VALUES(1054,'Reliance RCOM','40508');
-INSERT INTO "network_info" VALUES(1055,'Reliance RCOM','40512');
-INSERT INTO "network_info" VALUES(1056,'Reliance RCOM','40514');
-INSERT INTO "network_info" VALUES(1057,'Reliance RCOM','40517');
-INSERT INTO "network_info" VALUES(1058,'Reliance RCOM','40523');
+INSERT INTO "network_info" VALUES(1047,'PLMN_40433','40433');
+INSERT INTO "network_info" VALUES(1048,'PLMN_40435','40435');
+INSERT INTO "network_info" VALUES(1049,'PLMN_40437','40437');
+INSERT INTO "network_info" VALUES(1050,'PLMN_40441','40441');
+INSERT INTO "network_info" VALUES(1051,'PLMN_40491','40491');
+INSERT INTO "network_info" VALUES(1052,'PLMN_40503','40503');
+INSERT INTO "network_info" VALUES(1053,'PLMN_40504','40504');
+INSERT INTO "network_info" VALUES(1054,'PLMN_40508','40508');
+INSERT INTO "network_info" VALUES(1055,'PLMN_40512','40512');
+INSERT INTO "network_info" VALUES(1056,'PLMN_40514','40514');
+INSERT INTO "network_info" VALUES(1057,'PLMN_40517','40517');
+INSERT INTO "network_info" VALUES(1058,'PLMN_40523','40523');
INSERT INTO "network_info" VALUES(1059,'PLMN_405026','405026');
INSERT INTO "network_info" VALUES(1060,'PLMN_405028','405028');
INSERT INTO "network_info" VALUES(1061,'PLMN_405033','405033');
INSERT INTO "network_info" VALUES(1062,'PLMN_405040','405040');
-INSERT INTO "network_info" VALUES(1063,'Aircel_North','405807');
-INSERT INTO "network_info" VALUES(1064,'Aircel_North','405808');
-INSERT INTO "network_info" VALUES(1065,'Aircel South','405809');
-INSERT INTO "network_info" VALUES(1066,'Aircel_North','405810');
-INSERT INTO "network_info" VALUES(1067,'Aircel_North','405811');
-INSERT INTO "network_info" VALUES(1068,'Aircel_North','405812');
+INSERT INTO "network_info" VALUES(1063,'PLMN_405807','405807');
+INSERT INTO "network_info" VALUES(1064,'PLMN_405808','405808');
+INSERT INTO "network_info" VALUES(1065,'PLMN_405809','405809');
+INSERT INTO "network_info" VALUES(1066,'PLMN_405810','405810');
+INSERT INTO "network_info" VALUES(1067,'PLMN_405811','405811');
+INSERT INTO "network_info" VALUES(1068,'PLMN_405812','405812');
INSERT INTO "network_info" VALUES(1069,'PLMN_405826','405826');
-INSERT INTO "network_info" VALUES(1070,'IDEA','405847');
-INSERT INTO "network_info" VALUES(1071,'IDEA','405851');
+INSERT INTO "network_info" VALUES(1070,'PLMN_405847','405847');
+INSERT INTO "network_info" VALUES(1071,'PLMN_405851','405851');
INSERT INTO "network_info" VALUES(1072,'PLMN_405881','405881');
INSERT INTO "network_info" VALUES(1073,'PLMN_405882','405882');
INSERT INTO "network_info" VALUES(1074,'PLMN_405883','405883');
INSERT INTO "network_info" VALUES(1075,'PLMN_405884','405884');
INSERT INTO "network_info" VALUES(1076,'PLMN_405885','405885');
INSERT INTO "network_info" VALUES(1077,'PLMN_405886','405886');
-INSERT INTO "network_info" VALUES(1078,'IDEA','405908');
-INSERT INTO "network_info" VALUES(1079,'IDEA','405909');
-INSERT INTO "network_info" VALUES(1080,'IDEA','405910');
-INSERT INTO "network_info" VALUES(1081,'IDEA','405911');
-INSERT INTO "network_info" VALUES(1082,'IDEA','404891');
+INSERT INTO "network_info" VALUES(1078,'PLMN_405908','405908');
+INSERT INTO "network_info" VALUES(1079,'PLMN_405909','405909');
+INSERT INTO "network_info" VALUES(1080,'PLMN_405910','405910');
+INSERT INTO "network_info" VALUES(1081,'PLMN_405911','405911');
+INSERT INTO "network_info" VALUES(1082,'PLMN_404891','404891');
INSERT INTO "network_info" VALUES(1083,'PLMN_404220','404220');
INSERT INTO "network_info" VALUES(1084,'PLMN_405932','405932');
INSERT INTO "network_info" VALUES(1085,'MTC Touch','41503');
INSERT INTO "pdp_profile" VALUES(644,'Vodafone MMS','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401','http://mms1.live.vodafone.in/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,487,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(645,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,487,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(646,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401',NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,487,1,0,1,0,0,0,1);
-INSERT INTO "pdp_profile" VALUES(647,'IDEA Punjab MMS','mmsc',0,NULL,NULL,2,'10.11.12.13:9401','http://10.11.12.180/',300,NULL,NULL,NULL,NULL,NULL,NULL,378,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(648,'IDEA Punjab','internet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,378,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(647,'IDEA Punjab MMS','spice',0,NULL,NULL,2,'10.11.12.13:9401','http://10.11.12.180/',300,NULL,NULL,NULL,NULL,NULL,NULL,378,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(648,'IDEA Punjab','spicegprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,378,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(649,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,500,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(650,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401',NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,500,1,0,1,0,0,0,1);
INSERT INTO "pdp_profile" VALUES(651,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401','http://mms1.live.vodafone.in/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,500,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(688,'Cellone_North MMS','bsnlmms',0,NULL,NULL,2,'10.210.10.11:8080','http://bsnlmmsc.in',300,NULL,NULL,NULL,NULL,NULL,NULL,320,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(689,'Cellone_North','bsnlnet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,320,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(690,'AIRCEL NE MMS','aircelmms',0,NULL,NULL,2,'172.17.83.69:8080','http://10.50.1.166/servlets/mms',300,NULL,NULL,NULL,NULL,NULL,NULL,1048,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(691,'AIRCEL NE','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1048,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(691,'AIRCEL NE','aircelwebpost',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1048,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(692,'Reliance RTel MMS','MMS',0,NULL,NULL,2,'10.239.221.7:8080','http://10.239.221.47/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,383,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(693,'Reliance RTel','SMARTNET',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,383,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(694,'AIRCEL NE MMS','aircelmms',0,NULL,NULL,2,'172.17.83.69:8080','http://10.50.1.166/servlets/mms',300,NULL,NULL,NULL,NULL,NULL,NULL,1049,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(695,'AIRCEL NE','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1049,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(695,'AIRCEL NE','aircelwebpost',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1049,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(696,'CellOne_Kolkata MMS','bsnlmms',0,NULL,NULL,2,'10.210.10.11:8080','http://bsnlmmsc.in:8514',300,NULL,NULL,NULL,NULL,NULL,NULL,316,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(697,'CellOne_Kolkata','bsnlnet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,316,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(698,'Airtel','airtelgprs.com',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,341,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(699,'Airtel MMS','airtelmms.com',0,NULL,NULL,2,'100.1.201.172:8799','http://100.1.201.171:10021/mmsc',300,NULL,NULL,NULL,NULL,NULL,NULL,341,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(700,'AIRCEL TN','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1050,1,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(701,'AIRCEL TN','aircelmms',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,1050,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(702,'AIRCEL TN','aircelgprs',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,306,1,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(703,'AIRCEL TN','aircelmms',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,306,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(700,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,1050,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(701,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,1050,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(702,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,306,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(703,'AIRCEL TN','aircelgprs.po',0,NULL,NULL,2,'192.168.35.196:8081','http://mmsc/mmrelay.app',300,NULL,NULL,NULL,NULL,NULL,NULL,306,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(704,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,499,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(705,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401',NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,499,1,0,1,0,0,0,1);
INSERT INTO "pdp_profile" VALUES(706,'VodafoneLive!','portalnmms',0,NULL,NULL,2,'10.10.1.100:9401','http://mms1.live.vodafone.in/mms/',300,NULL,NULL,NULL,NULL,NULL,NULL,499,2,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(707,'IDEA Karnataka','internet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,363,1,0,1,1,0,0,1);
-INSERT INTO "pdp_profile" VALUES(708,'IDEA Karnataka MMS','mmsc',0,NULL,NULL,2,'10.4.42.15:8080','http://10.4.42.21:8002',300,NULL,NULL,NULL,NULL,NULL,NULL,363,2,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(707,'IDEA Karnataka','simplyinternet',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,363,1,0,1,1,0,0,1);
+INSERT INTO "pdp_profile" VALUES(708,'IDEA Karnataka MMS','spicemms',0,NULL,NULL,2,'10.200.200.3:8080','http://10.200.200.3:8514',300,NULL,NULL,NULL,NULL,NULL,NULL,363,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(709,'Airtel','airtelgprs.com',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,345,1,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(710,'Airtel MMS','airtelmms.com',0,NULL,NULL,2,'100.1.201.172:8799','http://100.1.201.171:10021/mmsc',300,NULL,NULL,NULL,NULL,NULL,NULL,345,2,0,1,1,0,0,1);
INSERT INTO "pdp_profile" VALUES(711,'Vodafone Connect','www',0,NULL,NULL,2,NULL,NULL,300,NULL,NULL,NULL,NULL,NULL,NULL,493,1,0,1,1,0,0,1);
tcore_context_set_roaming_apn(co_context, is_roaming_apn);
context->profile_id = profile_id;
+ context->hidden = hidden;
context->editable = editable;
context->is_default = default_conn;
_ps_context_set_profile_enable(context, profile_enable);
context->path = path;
context->co_context = co_context;
- switch(svc_ctg_id) {
- case CONTEXT_ROLE_INTERNET:
- case CONTEXT_ROLE_MMS:
- case CONTEXT_ROLE_PREPAID_INTERNET:
- case CONTEXT_ROLE_PREPAID_MMS:
- context->hidden = hidden;
- break;
- default:
- context->hidden = TRUE;
- break;
- }
g_free(profile_name);
g_free(apn);
{
int rv = TCORE_RETURN_FAILURE;
ps_context_t *pscontext = object;
- ps_service_t *service = _ps_context_ref_service(pscontext);
- CoreObject *co_network = _ps_service_ref_co_network(service);
+ CoreObject *co_network = _ps_service_ref_co_network(_ps_context_ref_service(pscontext));
- /* TBD: dbus method invocation from upper layer. */
- if (TRUE == _ps_context_get_default_context(pscontext, CONTEXT_ROLE_INTERNET)) {
- ps_dbg_ex_co(co_network, "Change Always-on when default internet.");
- _ps_master_set_always_on_control(_ps_modem_ref_master(_ps_service_ref_modem(service)), TRUE);
- }
+ _ps_context_set_alwayson_enable(pscontext, TRUE);
rv = _ps_service_activate_context(pscontext->p_service, pscontext);
if (rv != TCORE_RETURN_SUCCESS) {
ps_dbg_ex_co(co_network, "fail to activate context connection");
CoreObject *co_network;
int context_state = 0;
ps_context_t *pscontext = user_data;
- ps_service_t *service = _ps_context_ref_service(pscontext);
if (!ps_util_check_access_control(invocation, AC_PS_PRIVATE, "w"))
return TRUE;
ps_dbg_ex_co(co_network, "deactivate context(%s)", _ps_context_ref_path(pscontext));
_ps_service_reset_connection_timer(pscontext);
- /* TBD: dbus method invocation from upper layer. */
- if (TRUE == _ps_context_get_default_context(pscontext, CONTEXT_ROLE_INTERNET)) {
- ps_dbg_ex_co(co_network, "Change Always-on when default internet.");
- _ps_master_set_always_on_control(_ps_modem_ref_master(_ps_service_ref_modem(service)), FALSE);
- }
- rv = _ps_service_deactivate_context(service, pscontext);
+ _ps_context_set_alwayson_enable(pscontext, FALSE);
+
+ rv = _ps_service_deactivate_context(pscontext->p_service, pscontext);
if (rv != TCORE_RETURN_SUCCESS) {
ps_err_ex_co(co_network, "fail to deactivate context connection");
FAIL_RESPONSE(invocation, PS_ERR_TRASPORT);
if (context_state == CONTEXT_STATE_ACTIVATING) {
ps_dbg_ex_co(co_network, "Modify profile in activating state, set deactivate flag.");
context->deact_required = TRUE;
- goto EXIT;
}
/*Creating the profile property hash for for internal handling*/
ps_dbg_ex_co(co_network, "context is already disconnected");
_ps_context_set_connected(context, FALSE);
}
-EXIT:
+
packet_service_context_complete_modify_profile(obj_context, invocation, TRUE);
g_hash_table_destroy(profile_property);
return TRUE;
_ps_modem_set_data_roaming_allowed(h_value, roaming_allowed);
} else if (key == KEY_POWER_SAVING_MODE) {
gint ps_mode = g_variant_get_int32(tmp);
-
+#ifdef POWER_SAVING_FEATURE_WEARABLE
+ gboolean f_mode = _ps_modem_get_flght_mode(h_value);
+ gboolean f_mode_ups = _ps_modem_get_flght_mode_ups(h_value);
+ struct treq_modem_set_flightmode data = {0};
+ dbg("f_mode: %d, f_mode_ups: %d", f_mode, f_mode_ups);
+
+ if (ps_mode == POWER_SAVING_MODE_NORMAL) {
+ if (f_mode_ups != f_mode) {
+ dbg("set flight mode off");
+ data.enable = f_mode_ups;
+ }
+ } else if (ps_mode == POWER_SAVING_MODE_WEARABLE) {
+ if (!f_mode) {
+ dbg("set flight mode on");
+ /* save flight mode state when UPS off. */
+ _ps_modem_set_flght_mode_ups(h_value, _ps_modem_get_flght_mode(h_value));
+ data.enable = TRUE;
+ }
+ } else {
+ err("Not supported");
+ return;
+ }
+ _ps_modem_send_filght_mode_request(h_value, &data);
+#endif
if (ps_mode == POWER_SAVING_MODE_NORMAL && ps_mode != _ps_modem_get_psmode(h_value))
warn("[PSINFO] UPS mode change: On -> Off ");
return tcore_storage_set_int(strg, key, value);
}
-gboolean _ps_master_set_always_on_control(gpointer user_data, gboolean enable)
-{
- ps_master_t *master = user_data;
- GHashTableIter iter;
- gpointer key, value;
-
- g_return_val_if_fail(master != NULL, FALSE);
- g_return_val_if_fail(master->modems != NULL, FALSE);
-
- dbg("Entered");
-
- g_hash_table_iter_init(&iter, master->modems);
- while (g_hash_table_iter_next(&iter, &key, &value) == TRUE) {
- unsigned int i;
- ps_modem_t *modem = value;
-
- if (modem == NULL)
- continue;
- if (modem->contexts == NULL)
- continue;
-
- for (i = 0; i < g_slist_length(modem->contexts); i++) {
- ps_context_t *context = (ps_context_t*)g_slist_nth_data(modem->contexts, i);
- gchar *path = _ps_context_ref_path(context);
- if (path) {
- dbg("context(%s)", path);
- _ps_context_set_alwayson_enable(context, enable);
- }
- }
- }
- return TRUE;
-}
-
static gboolean on_master_get_modems(PacketServiceMaster *obj_master,
GDBusMethodInvocation *invocation,
gpointer user_data)
return TRUE;
}
-static gboolean on_master_set_alwayson(PacketServiceMaster *obj_master,
- GDBusMethodInvocation *invocation,
- gboolean enable,
- gpointer user_data)
-{
- gboolean result = FALSE;
-
- if (!ps_util_check_access_control(invocation, AC_PS_PRIVATE, "w"))
- return TRUE;
-
- dbg("Entered");
- result = _ps_master_set_always_on_control(user_data, enable);
- if (result)
- packet_service_master_complete_set_alwayson(obj_master, invocation, result);
- else
- FAIL_RESPONSE(invocation, PS_ERR_INTERNAL);
- return TRUE;
-}
-
-
static void _ps_master_setup_interface(PacketServiceMaster *master, ps_master_t *master_data)
{
dbg("Entered");
"handle-get-modems",
G_CALLBACK(on_master_get_modems),
master_data);
-
- g_signal_connect(master,
- "handle-set-alwayson",
- G_CALLBACK(on_master_set_alwayson),
- master_data);
return;
}
gint key_ps_mode = 0;
ps_modem_t *modem = NULL;
CoreObject *co_modem;
+#if defined(TIZEN_UPS_ENABLED)
+ struct treq_modem_set_flightmode data = {0};
+#endif
modem = (ps_modem_t *) object;
co_modem = _ps_modem_ref_co_modem(modem);
#if defined(TIZEN_UPS_ENABLED)
_ps_modem_set_psmode(modem, key_ps_mode);
+ if (key_ps_mode == POWER_SAVING_MODE_NORMAL) {
+ dbg("set flight mode off");
+ data.enable = FALSE;
+ } else if (key_ps_mode == POWER_SAVING_MODE_WEARABLE) {
+ dbg("set flight mode on");
+ data.enable = TRUE;
+ } else {
+ err("Not supported");
+ goto OUT;
+ }
+ _ps_modem_send_filght_mode_request(modem, &data);
+OUT:
#endif
ps_dbg_ex_co(co_modem, "data allowed(%d) roaming allowed(%d) power saving mode(%d), network restrict mode (%d)",
key_3g_enable, key_roaming_allowed, key_ps_mode, key_nw_restrict_mode);
_ps_service_disconnect_contexts(value);
continue;
} else if (!modem->data_allowed) {
- _ps_service_disconnect_internet_mms_tethering_contexts(value);
+ _ps_service_disconnect_internet_mms_contexts(value);
continue;
}
/* Clear modem hooks */
_ps_free_co_modem_event(modem);
}
+
+gboolean _ps_modem_send_filght_mode_request(gpointer value, void *data)
+{
+ CoreObject *co_modem = NULL, *co_ps = NULL;
+ UserRequest *ur = NULL;
+ ps_modem_t *modem = value;
+ TReturn rv;
+
+ co_modem = _ps_modem_ref_co_modem(modem);
+ co_ps = tcore_plugin_ref_core_object(tcore_object_ref_plugin(co_modem), CORE_OBJECT_TYPE_PS);
+ /* deactivate contexts first. */
+ rv = tcore_ps_deactivate_contexts(co_ps);
+ if (rv != TCORE_RETURN_SUCCESS)
+ ps_dbg_ex_co(co_ps, "fail to deactivation");
+
+ tcore_ps_set_online(co_ps, FALSE);
+
+ ur = tcore_user_request_new(NULL, NULL);
+ tcore_user_request_set_data(ur, sizeof(struct treq_modem_set_flightmode), data);
+ tcore_user_request_set_command(ur, TREQ_MODEM_SET_FLIGHTMODE);
+ if (TCORE_RETURN_SUCCESS != tcore_object_dispatch_request(co_modem, ur)) {
+ err("fail to send user request");
+ tcore_user_request_unref(ur);
+ return FALSE;
+ }
+ return TRUE;
+}
+
gboolean _ps_modem_processing_flight_mode(gpointer object, gboolean enable)
{
ps_modem_t *modem = object;
return modem->flight_mode;
}
+void _ps_modem_set_flght_mode_ups(gpointer object, gboolean value)
+{
+ ps_modem_t *modem = object;
+ g_return_if_fail(modem != NULL);
+
+ modem->flight_mode_ups = value;
+ dbg("modem(%p) flight_mode_ups(%d)", modem, modem->flight_mode_ups);
+
+ return;
+}
+
+gboolean _ps_modem_get_flght_mode_ups(gpointer object)
+{
+ ps_modem_t *modem = object;
+ g_return_val_if_fail(modem != NULL, FALSE);
+
+ return modem->flight_mode_ups;
+}
+
gboolean _ps_modem_get_sim_init(gpointer object)
{
ps_modem_t *modem = object;
return g_variant_builder_end(properties);
}
-gpointer _ps_modem_ref_master(gpointer object)
-{
- ps_modem_t *modem = object;
- g_return_val_if_fail(modem != NULL, NULL);
-
- return modem->p_master;
-}
-
GHashTable *_ps_modem_ref_services(gpointer object)
{
ps_modem_t *modem = object;
#include <core_object.h>
#include <co_ps.h>
#include <co_context.h>
-#include <co_network.h>
#include <storage.h>
#define PROP_DEFAULT FALSE
ps_service_t *service = object;
ps_modem_t *modem = _ps_service_ref_modem(service);
- ps_master_t *master = _ps_modem_ref_master(modem);
ps_context_t *ps_context = context;
CoreObject *co_context = (CoreObject *)_ps_context_ref_co_context(context);
CoreObject *co_network = _ps_service_ref_co_network(service);
}
role = tcore_context_get_role(co_context);
- if (service->roaming) {
- gboolean roaming_allowed = FALSE;
- roaming_allowed = _ps_modem_get_data_roaming_allowed(modem);
- ps_warn_ex_co(co_network, "roaming_allowed:[%d]", roaming_allowed);
- b_connect &= roaming_allowed;
- }
+ if (service->roaming)
+ b_connect &= _ps_modem_get_data_roaming_allowed(modem);
+
sim = _ps_modem_get_sim_init(modem);
data = _ps_modem_get_data_allowed(modem);
flight = _ps_modem_get_flght_mode(modem);
* taken care of by telephony.
* Solution: Do not PDP retry until initial PDP connection when Wifi connected.
*/
- if (master && master->initial_pdp_conn == FALSE) {
+ if (service->initial_pdp_conn == FALSE) {
int wifi_state = PS_WIFI_STATE_OFF;
Server *s = NULL;
Storage *strg = NULL;
return rv;
}
-static gboolean __ps_service_check_is_network_in_serivce(gpointer object)
-{
- ps_service_t *service = object;
- CoreObject *co_network = NULL;
- enum telephony_network_service_type service_type = NETWORK_SERVICE_TYPE_UNKNOWN;
- gboolean rv = FALSE;
-
- co_network = _ps_service_ref_co_network(service);
- tcore_network_get_service_type(co_network, &service_type);
- ps_warn_ex_co(co_network, "service_type[%d]", service_type);
- switch (service_type) {
- case NETWORK_SERVICE_TYPE_UNKNOWN:
- case NETWORK_SERVICE_TYPE_NO_SERVICE:
- case NETWORK_SERVICE_TYPE_EMERGENCY:
- case NETWORK_SERVICE_TYPE_SEARCH:
- break;
- default:
- rv = TRUE;
- break;
- }
- return rv;
-}
-
void _ps_service_set_attach_apn(ps_service_t *service)
{
unsigned int index;
devinfo->ip_address[0], devinfo->ip_address[1],
devinfo->ip_address[2], devinfo->ip_address[3]);
if (!g_str_equal(ipv4, "0.0.0.0")) {
- devinfo->pcscf_ipv4 = g_try_malloc0(sizeof(char *));
- if (devinfo->pcscf_ipv4 == NULL)
- continue;
- devinfo->pcscf_ipv4[0] = g_strdup("220.103.220.10");
devinfo->pcscf_ipv4_count = 1;
+ devinfo->pcscf_ipv4 = g_try_malloc0(sizeof(char *) * devinfo->pcscf_ipv4_count);
+ if (devinfo->pcscf_ipv4 != NULL)
+ devinfo->pcscf_ipv4[0] = g_strdup("220.103.220.10");
}
}
/*IPv6*/
if (devinfo->pcscf_ipv6_count == 0) {
if (devinfo->ipv6_address != NULL) {
- devinfo->pcscf_ipv6 = g_try_malloc0(sizeof(char *));
- if (devinfo->pcscf_ipv6 == NULL)
- continue;
- devinfo->pcscf_ipv6[0] = g_strdup("2001:2d8:00e0:0220::10");
devinfo->pcscf_ipv6_count = 1;
+ devinfo->pcscf_ipv6 = g_try_malloc0(sizeof(char *) * devinfo->pcscf_ipv6_count);
+ if (devinfo->pcscf_ipv6 != NULL)
+ devinfo->pcscf_ipv6[0] = g_strdup("2001:2d8:00e0:0220::10");
}
}
}
return;
}
-void _ps_service_disconnect_internet_mms_tethering_contexts(gpointer object)
+void _ps_service_disconnect_internet_mms_contexts(gpointer object)
{
unsigned int index;
ps_service_t *service = object;
CoreObject *co_context = NULL;
enum co_context_role role = CONTEXT_ROLE_UNKNOWN;
- dbg("Service disconnect Internet/MMS/Tethering contexts");
+ dbg("Service disconnect Internet/MMS contexts");
g_return_if_fail(service != NULL);
for (index = 0; index < g_slist_length(service->contexts); index++) {
* - INTERNET_PREPAID
* - MMS
* - MMS_PREPAID
- * - TETHERING
*/
switch (role) {
case CONTEXT_ROLE_INTERNET:
case CONTEXT_ROLE_MMS:
case CONTEXT_ROLE_PREPAID_INTERNET:
case CONTEXT_ROLE_PREPAID_MMS:
- case CONTEXT_ROLE_TETHERING:
_ps_service_reset_connection_timer(value);
_ps_service_deactivate_context(service, value);
break;
gboolean prev_roaming_status;
g_return_val_if_fail(service != NULL, FALSE);
- co_network = _ps_service_ref_co_network(service);
+
prev_roaming_status = _ps_service_get_roaming(service);
- if(__ps_service_check_is_network_in_serivce(service) != TRUE)
- ps_warn_ex_co(co_network, "Update roaming status only in IN SRV");
- else
- _ps_service_set_roaming(service, roaming);
+
+ co_network = _ps_service_ref_co_network(service);
_ps_service_set_ps_attached(service, ps_attached);
+ _ps_service_set_roaming(service, roaming);
_ps_update_cellular_state_key(service);
if (prev_roaming_status != _ps_service_get_roaming(service)) {
gpointer def_conn = NULL;
gpointer requested_conn = NULL;
- ps_service_t *service = (ps_service_t *) object;
- ps_master_t *master = _ps_modem_ref_master(_ps_service_ref_modem(object));
+ ps_service_t *service = NULL;
struct tnoti_ps_call_status *call_status = NULL;
CoreObject *co_network;
+ service = (ps_service_t *) object;
co_network = _ps_service_ref_co_network(service);
call_status = (struct tnoti_ps_call_status *)cstatus;
- if (enabled && master && master->initial_pdp_conn == FALSE) {
+ if (enabled && service->initial_pdp_conn == FALSE) {
ps_dbg_ex_co(co_network, "Initial PDP connection.");
- master->initial_pdp_conn = TRUE;
+ service->initial_pdp_conn = TRUE;
}
for (index = 0; index < g_slist_length(service->contexts); index++) {
static void __ps_modem_cp_reset_handler(gpointer object)
{
- unsigned int index;
ps_modem_t *modem = object;
- dbg("disconnect all contexts");
- /* send deactivation request to clear resources. */
- for (index = 0; index < g_slist_length(modem->contexts); index++) {
- gpointer context = g_slist_nth_data(modem->contexts, index);
- ps_service_t *service = _ps_context_ref_service(context);
- CoreObject *co_context = _ps_context_ref_co_context(context);
- if(service == NULL)
- continue;
- tcore_ps_deactivate_context(service->co_ps, co_context, NULL);
- tcore_context_set_state(co_context, CONTEXT_STATE_DEACTIVATED);
- }
+ dbg("Entred");
/* check for any pending request in modem queue and respond with error */
__ps_modem_cp_reset_send_pending_request_response(modem);
break;
case TREQ_MODEM_POWER_LOW:
-#ifndef POWER_SAVING_FEATURE_WEARABLE
+#ifdef POWER_SAVING_FEATURE_WEARABLE
+ __ps_check_handle_modem_off_request(modem, ON_REQUEST, TNOTI_UNKNOWN);
+#else
if (modem->hook_flag & PS_NETWORK_SET_POWER_LOW)
if (TCORE_RETURN_SUCCESS != tcore_object_dispatch_request(modem->co_modem, wqd->ur))
err("Failed to dispatch ");