Home | History | Annotate | Download | only in reference-ril

Lines Matching full:line

128 static void addIntermediate(const char *line)
134 p_new->line = strdup(line);
145 * returns 1 if line is a final response indicating error
157 static int isFinalResponseError(const char *line)
162 if (strStartsWith(line, s_finalResponsesError[i])) {
171 * returns 1 if line is a final response indicating success
179 static int isFinalResponseSuccess(const char *line)
184 if (strStartsWith(line, s_finalResponsesSuccess[i])) {
193 * returns 1 if line is a final response, either error or success
197 static int isFinalResponse(const char *line)
199 return isFinalResponseSuccess(line) || isFinalResponseError(line);
204 * returns 1 if line is the first line in (what will be) a two-line
212 static int isSMSUnsolicited(const char *line)
217 if (strStartsWith(line, s_smsUnsoliciteds[i])) {
227 static void handleFinalResponse(const char *line)
229 sp_response->finalResponse = strdup(line);
234 static void handleUnsolicited(const char *line)
237 s_unsolHandler(line, NULL);
241 static void processLine(const char *line)
247 handleUnsolicited(line);
248 } else if (isFinalResponseSuccess(line)) {
250 handleFinalResponse(line);
251 } else if (isFinalResponseError(line)) {
253 handleFinalResponse(line);
254 } else if (s_smsPDU != NULL && 0 == strcmp(line, "> ")) {
261 handleUnsolicited(line);
265 && isdigit(line[0])
267 addIntermediate(line);
270 the line doesn't begin with a digit */
271 handleUnsolicited(line);
276 && strStartsWith (line, s_responsePrefix)
278 addIntermediate(line);
281 handleUnsolicited(line);
285 if (strStartsWith (line, s_responsePrefix)) {
286 addIntermediate(line);
288 handleUnsolicited(line);
294 handleUnsolicited(line);
303 * Returns a pointer to the end of the next line
306 * returns NULL if there is no complete line
323 * Reads a line from the AT channel, returns NULL on timeout.
326 * This line is valid only until the next call to readline
359 /* a partial line. move it up and prepare to read more */
368 /* Otherwise, (p_eol !- NULL) there is a complete line */
374 RLOGE("ERROR: Input line exceeded buffer\n");
409 /* a full line in the buffer. Place a \0 over the \r and return */
441 const char * line;
443 line = readline();
445 if (line == NULL) {
449 if(isSMSUnsolicited(line)) {
454 // till next call to 'readline()' hence making a copy of line
456 line1 = strdup(line);
468 processLine(line);
687 free(p_toFree->line);
696 * The line reader places the intermediate responses in reverse order
772 /* line reader stores intermediate responses in reverse order */