4 * Copyright(C) 2007,2008 Ixonos Plc
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Boston, MA 02111.
32 void gsmd_pdp_command_list_gprs_classes(PDPInterface
*pdp
,
35 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
36 const char *classes
[] = {"First","Second","Third"};
37 modem
->pdp_ipc
->list_gprs_classes_reply(modem
->pdp_ipc
,ipc_data
,classes
);
41 void gsmd_pdp_command_select_gprs_class(PDPInterface
*pdp
,
45 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
46 modem
->pdp_ipc
->select_gprs_class_reply(modem
->pdp_ipc
,ipc_data
);
50 void gsmd_pdp_command_activate(PDPInterface
*pdp
,
54 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
55 modem
->pdp_ipc
->activate_reply(modem
->pdp_ipc
,ipc_data
);
59 void gsmd_pdp_command_deactivate(PDPInterface
*pdp
,
63 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
64 modem
->pdp_ipc
->deactivate_reply(modem
->pdp_ipc
,ipc_data
);
68 void gsmd_pdp_command_select_context(PDPInterface
*pdp
,
72 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
73 modem
->pdp_ipc
->select_context_reply(modem
->pdp_ipc
,ipc_data
);
77 void gsmd_pdp_command_add_context(PDPInterface
*pdp
,
81 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
82 modem
->pdp_ipc
->add_context_reply(modem
->pdp_ipc
,ipc_data
,0);
86 void gsmd_pdp_command_delete_context(PDPInterface
*pdp
,
90 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
91 modem
->pdp_ipc
->delete_context_reply(modem
->pdp_ipc
,ipc_data
);
96 void gsmd_pdp_command_list_contexts(PDPInterface
*pdp
,
99 ModemInterface
*modem
= (ModemInterface
*)pdp
->priv
;
100 const char *contexts
[] = {"First","Second","Third"};
101 modem
->pdp_ipc
->list_contexts_reply(modem
->pdp_ipc
,ipc_data
,contexts
);
107 void gsmd_pdp_init(ModemInterface
*modem
)
109 modem
->pdp
->priv
= (gpointer
)modem
;
110 modem
->pdp
->list_contexts
= &gsmd_pdp_command_list_contexts
;
111 modem
->pdp
->delete_context
= &gsmd_pdp_command_delete_context
;
112 modem
->pdp
->add_context
= &gsmd_pdp_command_add_context
;
113 modem
->pdp
->select_context
= &gsmd_pdp_command_select_context
;
114 modem
->pdp
->deactivate
= &gsmd_pdp_command_deactivate
;
115 modem
->pdp
->activate
= &gsmd_pdp_command_activate
;
116 modem
->pdp
->select_gprs_class
= &gsmd_pdp_command_select_gprs_class
;
117 modem
->pdp
->list_gprs_classes
= &gsmd_pdp_command_list_gprs_classes
;