em->type = type;
- em->atom = __ofono_modem_add_atom(modem, atom_t, emulator_remove, em);
+ em->atom = __ofono_modem_add_atom_offline(modem, atom_t,
+ emulator_remove, em);
return em;
}
return atom;
}
+struct ofono_atom *__ofono_modem_add_atom_offline(struct ofono_modem *modem,
+ enum ofono_atom_type type,
+ void (*destruct)(struct ofono_atom *),
+ void *data)
+{
+ struct ofono_atom *atom;
+
+ atom = __ofono_modem_add_atom(modem, type, destruct, data);
+
+ atom->modem_state = MODEM_STATE_OFFLINE;
+
+ return atom;
+}
+
void *__ofono_atom_get_data(struct ofono_atom *atom)
{
return atom->data;
void (*destruct)(struct ofono_atom *),
void *data);
+struct ofono_atom *__ofono_modem_add_atom_offline(struct ofono_modem *modem,
+ enum ofono_atom_type type,
+ void (*destruct)(struct ofono_atom *),
+ void *data);
+
struct ofono_atom *__ofono_modem_find_atom(struct ofono_modem *modem,
enum ofono_atom_type type);