All of lore.kernel.org
 help / color / mirror / Atom feed
* Handling of Fixed Dialing v3
@ 2010-10-12 15:18 Petteri Tikander
  2010-10-12 15:18 ` [RFC PATCH 1/8] sim: add function to read general info from SIM EF-file Petteri Tikander
  0 siblings, 1 reply; 24+ messages in thread
From: Petteri Tikander @ 2010-10-12 15:18 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 614 bytes --]

The goal of these patches is to check, if Fixed Dialing is enabled in SIM-card.
Because also invalidation/rehabilitation status of ADN has to be checked,
functionality is added for retrieving file-status of EF-files.
So general information of EF-files is returned (containing now also file status)
without starting the actual EF-content retrieving.

The FDN-enable status is checked. If FDN is enabled, SIM-initialisation routine is 
interrupted (modem is left in PRE-SIM state), and FD-enabled property is signalled 
over D-BUS.

oFono still trusts to EFphase value when selecting SIM/USIM access.



^ permalink raw reply	[flat|nested] 24+ messages in thread
* [RFC PATCH 6/8] sim: add function for reading only general info from SIM-EF file
@ 2010-10-14 21:02 Petteri Tikander
  2010-10-14 21:02 ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Petteri Tikander
  0 siblings, 1 reply; 24+ messages in thread
From: Petteri Tikander @ 2010-10-14 21:02 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2109 bytes --]

Not actual EF-contents returned, but file length, record length, file status etc.
---
 include/sim.h |   10 ++++++++++
 src/sim.c     |   21 +++++++++++++++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

diff --git a/include/sim.h b/include/sim.h
index 7860e24..8dd6131 100644
--- a/include/sim.h
+++ b/include/sim.h
@@ -207,6 +207,16 @@ int ofono_sim_write(struct ofono_sim *sim, int id,
 int ofono_sim_read_bytes(struct ofono_sim *sim, int id,
 			unsigned short offset, unsigned short num_bytes,
 			ofono_sim_file_read_cb_t cb, void *data);
+
+/*
+ * This function reads only general info from SIM-file with
+ * requested id (file length, record length, file status etc),
+ * not any records.
+ */
+int ofono_sim_read_info(struct ofono_sim *sim, int id,
+			enum ofono_sim_file_structure expected,
+			ofono_sim_file_read_cb_t cb, void *data);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/src/sim.c b/src/sim.c
index ab38e4f..d189350 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1710,7 +1710,7 @@ int ofono_sim_read_bytes(struct ofono_sim *sim, int id,
 		return -1;
 
 	return sim_fs_read(sim->simfs, id, OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
-				offset, num_bytes, cb, data);
+				FALSE, offset, num_bytes, cb, data);
 }
 
 int ofono_sim_read(struct ofono_sim *sim, int id,
@@ -1720,7 +1720,24 @@ int ofono_sim_read(struct ofono_sim *sim, int id,
 	if (sim == NULL)
 		return -1;
 
-	return sim_fs_read(sim->simfs, id, expected_type, 0, 0, cb, data);
+	return sim_fs_read(sim->simfs, id, expected_type, FALSE,
+				0, 0, cb, data);
+}
+
+int ofono_sim_read_info(struct ofono_sim *sim, int id,
+			enum ofono_sim_file_structure expected_type,
+			ofono_sim_file_read_cb_t cb, void *data)
+{
+	/*
+	 * Retrieve EF-info only (file length, record length, file status etc).
+	 * So this function doesn't retrieve actual EF-contents.
+	 */
+
+	if (sim == NULL)
+		return -1;
+
+	return sim_fs_read(sim->simfs, id, expected_type, TRUE,
+				0, 0, cb, data);
 }
 
 int ofono_sim_write(struct ofono_sim *sim, int id,
-- 
1.6.3.3



^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-10-15 12:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-12 15:18 Handling of Fixed Dialing v3 Petteri Tikander
2010-10-12 15:18 ` [RFC PATCH 1/8] sim: add function to read general info from SIM EF-file Petteri Tikander
2010-10-12 15:18   ` [RFC PATCH 2/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Petteri Tikander
2010-10-12 15:18     ` [RFC PATCH 3/8] simutil: response-handler returns now also file-status Petteri Tikander
2010-10-12 15:18       ` [RFC PATCH 4/8] atmodem: returns file-status of SIM EF-file Petteri Tikander
2010-10-12 15:18         ` [RFC PATCH 5/8] isimodem: " Petteri Tikander
2010-10-12 15:18           ` [RFC PATCH 6/8] simutil: add ID of EFadn Petteri Tikander
2010-10-12 15:18             ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Petteri Tikander
2010-10-12 15:18               ` [RFC PATCH 8/8] doc: update sim-api Petteri Tikander
2010-10-14  5:56                 ` Marcel Holtmann
2010-10-14 11:22               ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Denis Kenzior
2010-10-14 11:24               ` Denis Kenzior
2010-10-14 10:43             ` [RFC PATCH 6/8] simutil: add ID of EFadn Denis Kenzior
2010-10-14 10:58           ` [RFC PATCH 5/8] isimodem: returns file-status of SIM EF-file Denis Kenzior
2010-10-14 10:57         ` [RFC PATCH 4/8] atmodem: " Denis Kenzior
2010-10-14 16:54           ` Petteri Tikander
2010-10-14 11:03         ` Denis Kenzior
2010-10-14 10:41       ` [RFC PATCH 3/8] simutil: response-handler returns now also file-status Denis Kenzior
2010-10-14 16:12         ` Petteri Tikander
2010-10-14 11:10     ` [RFC PATCH 2/8] simfs: add logic to retrieve only only EF-info, but no EF-contents Denis Kenzior
2010-10-14 11:07   ` [RFC PATCH 1/8] sim: add function to read general info from SIM EF-file Denis Kenzior
2010-10-14 15:14     ` Petteri Tikander
  -- strict thread matches above, loose matches on Subject: below --
2010-10-14 21:02 [RFC PATCH 6/8] sim: add function for reading only general info from SIM-EF file Petteri Tikander
2010-10-14 21:02 ` [RFC PATCH 7/8] sim: check if Fixed Dialing is enabled in the SIM-card Petteri Tikander
2010-10-15 12:33   ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.