• Home
  • Raw
  • Download

Lines Matching refs:entry

90     Json::Value entry = entries.get(i, Json::Value());  in Parse()  local
95 if (!ParseEntry(entry)) in Parse()
184 bool ActivityReplay::ParseEntry(const Json::Value& entry) { in ParseEntry() argument
185 if (!entry.isMember(ActivityLog::kKeyType) || in ParseEntry()
186 entry[ActivityLog::kKeyType].type() != Json::stringValue) { in ParseEntry()
190 string type = entry[ActivityLog::kKeyType].asString(); in ParseEntry()
192 return ParseHardwareState(entry); in ParseEntry()
194 return ParseTimerCallback(entry); in ParseEntry()
196 return ParseCallbackRequest(entry); in ParseEntry()
198 return ParseGesture(entry); in ParseEntry()
200 return ParsePropChange(entry); in ParseEntry()
205 bool ActivityReplay::ParseHardwareState(const Json::Value& entry) { in ParseHardwareState() argument
207 if (!entry.isMember(ActivityLog::kKeyHardwareStateButtonsDown)) { in ParseHardwareState()
211 hs.buttons_down = entry[ActivityLog::kKeyHardwareStateButtonsDown].asUInt(); in ParseHardwareState()
212 if (!entry.isMember(ActivityLog::kKeyHardwareStateTouchCnt)) { in ParseHardwareState()
216 hs.touch_cnt = entry[ActivityLog::kKeyHardwareStateTouchCnt].asUInt(); in ParseHardwareState()
217 if (!entry.isMember(ActivityLog::kKeyHardwareStateTimestamp)) { in ParseHardwareState()
221 hs.timestamp = entry[ActivityLog::kKeyHardwareStateTimestamp].asDouble(); in ParseHardwareState()
222 if (!entry.isMember(ActivityLog::kKeyHardwareStateFingers)) { in ParseHardwareState()
226 Json::Value fingers = entry[ActivityLog::kKeyHardwareStateFingers]; in ParseHardwareState()
245 if (entry.isMember(ActivityLog::kKeyHardwareStateRelX)) { in ParseHardwareState()
246 hs.rel_x = entry[ActivityLog::kKeyHardwareStateRelX].asDouble(); in ParseHardwareState()
247 if (!entry.isMember(ActivityLog::kKeyHardwareStateRelY)) { in ParseHardwareState()
251 hs.rel_x = entry[ActivityLog::kKeyHardwareStateRelY].asDouble(); in ParseHardwareState()
252 if (!entry.isMember(ActivityLog::kKeyHardwareStateRelWheel)) { in ParseHardwareState()
256 hs.rel_wheel = entry[ActivityLog::kKeyHardwareStateRelWheel].asDouble(); in ParseHardwareState()
257 if (!entry.isMember(ActivityLog::kKeyHardwareStateRelHWheel)) { in ParseHardwareState()
261 hs.rel_hwheel = entry[ActivityLog::kKeyHardwareStateRelHWheel].asDouble(); in ParseHardwareState()
267 bool ActivityReplay::ParseFingerState(const Json::Value& entry, in ParseFingerState() argument
269 if (!entry.isMember(ActivityLog::kKeyFingerStateTouchMajor)) { in ParseFingerState()
274 entry[ActivityLog::kKeyFingerStateTouchMajor].asDouble(); in ParseFingerState()
275 if (!entry.isMember(ActivityLog::kKeyFingerStateTouchMinor)) { in ParseFingerState()
280 entry[ActivityLog::kKeyFingerStateTouchMinor].asDouble(); in ParseFingerState()
281 if (!entry.isMember(ActivityLog::kKeyFingerStateWidthMajor)) { in ParseFingerState()
286 entry[ActivityLog::kKeyFingerStateWidthMajor].asDouble(); in ParseFingerState()
287 if (!entry.isMember(ActivityLog::kKeyFingerStateWidthMinor)) { in ParseFingerState()
292 entry[ActivityLog::kKeyFingerStateWidthMinor].asDouble(); in ParseFingerState()
293 if (!entry.isMember(ActivityLog::kKeyFingerStatePressure)) { in ParseFingerState()
297 out_fs->pressure = entry[ActivityLog::kKeyFingerStatePressure].asDouble(); in ParseFingerState()
298 if (!entry.isMember(ActivityLog::kKeyFingerStateOrientation)) { in ParseFingerState()
303 entry[ActivityLog::kKeyFingerStateOrientation].asDouble(); in ParseFingerState()
304 if (!entry.isMember(ActivityLog::kKeyFingerStatePositionX)) { in ParseFingerState()
308 out_fs->position_x = entry[ActivityLog::kKeyFingerStatePositionX].asDouble(); in ParseFingerState()
309 if (!entry.isMember(ActivityLog::kKeyFingerStatePositionY)) { in ParseFingerState()
313 out_fs->position_y = entry[ActivityLog::kKeyFingerStatePositionY].asDouble(); in ParseFingerState()
314 if (!entry.isMember(ActivityLog::kKeyFingerStateTrackingId)) { in ParseFingerState()
318 out_fs->tracking_id = entry[ActivityLog::kKeyFingerStateTrackingId].asInt(); in ParseFingerState()
319 if (!entry.isMember(ActivityLog::kKeyFingerStateFlags)) in ParseFingerState()
321 out_fs->flags = entry[ActivityLog::kKeyFingerStateFlags].asUInt(); in ParseFingerState()
325 bool ActivityReplay::ParseTimerCallback(const Json::Value& entry) { in ParseTimerCallback() argument
326 if (!entry.isMember(ActivityLog::kKeyTimerCallbackNow)) { in ParseTimerCallback()
330 log_.LogTimerCallback(entry[ActivityLog::kKeyTimerCallbackNow].asDouble()); in ParseTimerCallback()
334 bool ActivityReplay::ParseCallbackRequest(const Json::Value& entry) { in ParseCallbackRequest() argument
335 if (!entry.isMember(ActivityLog::kKeyCallbackRequestWhen)) { in ParseCallbackRequest()
340 entry[ActivityLog::kKeyCallbackRequestWhen].asDouble()); in ParseCallbackRequest()
344 bool ActivityReplay::ParseGesture(const Json::Value& entry) { in ParseGesture() argument
345 if (!entry.isMember(ActivityLog::kKeyGestureType)) { in ParseGesture()
349 string gesture_type = entry[ActivityLog::kKeyGestureType].asString(); in ParseGesture()
352 if (!entry.isMember(ActivityLog::kKeyGestureStartTime)) { in ParseGesture()
356 gs.start_time = entry[ActivityLog::kKeyGestureStartTime].asDouble(); in ParseGesture()
357 if (!entry.isMember(ActivityLog::kKeyGestureEndTime)) { in ParseGesture()
361 gs.end_time = entry[ActivityLog::kKeyGestureEndTime].asDouble(); in ParseGesture()
366 if (!ParseGestureMove(entry, &gs)) in ParseGesture()
369 if (!ParseGestureScroll(entry, &gs)) in ParseGesture()
372 if (!ParseGestureSwipe(entry, &gs)) in ParseGesture()
375 if (!ParseGestureSwipeLift(entry, &gs)) in ParseGesture()
378 if (!ParseGesturePinch(entry, &gs)) in ParseGesture()
381 if (!ParseGestureButtonsChange(entry, &gs)) in ParseGesture()
384 if (!ParseGestureFling(entry, &gs)) in ParseGesture()
387 if (!ParseGestureMetrics(entry, &gs)) in ParseGesture()
396 bool ActivityReplay::ParseGestureMove(const Json::Value& entry, in ParseGestureMove() argument
399 if (!entry.isMember(ActivityLog::kKeyGestureMoveDX)) { in ParseGestureMove()
403 out_gs->details.move.dx = entry[ActivityLog::kKeyGestureMoveDX].asDouble(); in ParseGestureMove()
404 if (!entry.isMember(ActivityLog::kKeyGestureMoveDY)) { in ParseGestureMove()
408 out_gs->details.move.dy = entry[ActivityLog::kKeyGestureMoveDY].asDouble(); in ParseGestureMove()
409 if (!entry.isMember(ActivityLog::kKeyGestureMoveOrdinalDX)) { in ParseGestureMove()
414 entry[ActivityLog::kKeyGestureMoveOrdinalDX].asDouble(); in ParseGestureMove()
415 if (!entry.isMember(ActivityLog::kKeyGestureMoveOrdinalDY)) { in ParseGestureMove()
420 entry[ActivityLog::kKeyGestureMoveOrdinalDY].asDouble(); in ParseGestureMove()
424 bool ActivityReplay::ParseGestureScroll(const Json::Value& entry, in ParseGestureScroll() argument
427 if (!entry.isMember(ActivityLog::kKeyGestureScrollDX)) { in ParseGestureScroll()
432 entry[ActivityLog::kKeyGestureScrollDX].asDouble(); in ParseGestureScroll()
433 if (!entry.isMember(ActivityLog::kKeyGestureScrollDY)) { in ParseGestureScroll()
438 entry[ActivityLog::kKeyGestureScrollDY].asDouble(); in ParseGestureScroll()
439 if (!entry.isMember(ActivityLog::kKeyGestureScrollOrdinalDX)) { in ParseGestureScroll()
444 entry[ActivityLog::kKeyGestureScrollOrdinalDX].asDouble(); in ParseGestureScroll()
445 if (!entry.isMember(ActivityLog::kKeyGestureScrollOrdinalDY)) { in ParseGestureScroll()
450 entry[ActivityLog::kKeyGestureScrollOrdinalDY].asDouble(); in ParseGestureScroll()
454 bool ActivityReplay::ParseGestureSwipe(const Json::Value& entry, in ParseGestureSwipe() argument
457 if (!entry.isMember(ActivityLog::kKeyGestureSwipeDX)) { in ParseGestureSwipe()
461 out_gs->details.swipe.dx = entry[ActivityLog::kKeyGestureSwipeDX].asDouble(); in ParseGestureSwipe()
462 if (!entry.isMember(ActivityLog::kKeyGestureSwipeDY)) { in ParseGestureSwipe()
466 out_gs->details.swipe.dy = entry[ActivityLog::kKeyGestureSwipeDY].asDouble(); in ParseGestureSwipe()
467 if (!entry.isMember(ActivityLog::kKeyGestureSwipeOrdinalDX)) { in ParseGestureSwipe()
472 entry[ActivityLog::kKeyGestureSwipeOrdinalDX].asDouble(); in ParseGestureSwipe()
473 if (!entry.isMember(ActivityLog::kKeyGestureSwipeOrdinalDY)) { in ParseGestureSwipe()
478 entry[ActivityLog::kKeyGestureSwipeOrdinalDY].asDouble(); in ParseGestureSwipe()
482 bool ActivityReplay::ParseGestureSwipeLift(const Json::Value& entry, in ParseGestureSwipeLift() argument
488 bool ActivityReplay::ParseGesturePinch(const Json::Value& entry, in ParseGesturePinch() argument
491 if (!entry.isMember(ActivityLog::kKeyGesturePinchDZ)) { in ParseGesturePinch()
495 out_gs->details.pinch.dz = entry[ActivityLog::kKeyGesturePinchDZ].asDouble(); in ParseGesturePinch()
496 if (!entry.isMember(ActivityLog::kKeyGesturePinchOrdinalDZ)) { in ParseGesturePinch()
501 entry[ActivityLog::kKeyGesturePinchOrdinalDZ].asDouble(); in ParseGesturePinch()
502 if (!entry.isMember(ActivityLog::kKeyGesturePinchZoomState)) { in ParseGesturePinch()
507 entry[ActivityLog::kKeyGesturePinchZoomState].asInt(); in ParseGesturePinch()
511 bool ActivityReplay::ParseGestureButtonsChange(const Json::Value& entry, in ParseGestureButtonsChange() argument
514 if (!entry.isMember(ActivityLog::kKeyGestureButtonsChangeDown)) { in ParseGestureButtonsChange()
519 entry[ActivityLog::kKeyGestureButtonsChangeDown].asUInt(); in ParseGestureButtonsChange()
520 if (!entry.isMember(ActivityLog::kKeyGestureButtonsChangeUp)) { in ParseGestureButtonsChange()
525 entry[ActivityLog::kKeyGestureButtonsChangeUp].asUInt(); in ParseGestureButtonsChange()
529 bool ActivityReplay::ParseGestureFling(const Json::Value& entry, in ParseGestureFling() argument
532 if (!entry.isMember(ActivityLog::kKeyGestureFlingVX)) { in ParseGestureFling()
536 out_gs->details.fling.vx = entry[ActivityLog::kKeyGestureFlingVX].asDouble(); in ParseGestureFling()
537 if (!entry.isMember(ActivityLog::kKeyGestureFlingVY)) { in ParseGestureFling()
541 out_gs->details.fling.vy = entry[ActivityLog::kKeyGestureFlingVY].asDouble(); in ParseGestureFling()
542 if (!entry.isMember(ActivityLog::kKeyGestureFlingOrdinalVX)) { in ParseGestureFling()
547 entry[ActivityLog::kKeyGestureFlingOrdinalVX].asDouble(); in ParseGestureFling()
548 if (!entry.isMember(ActivityLog::kKeyGestureFlingOrdinalVY)) { in ParseGestureFling()
553 entry[ActivityLog::kKeyGestureFlingOrdinalVY].asDouble(); in ParseGestureFling()
554 if (!entry.isMember(ActivityLog::kKeyGestureFlingState)) { in ParseGestureFling()
559 entry[ActivityLog::kKeyGestureFlingState].asInt(); in ParseGestureFling()
563 bool ActivityReplay::ParseGestureMetrics(const Json::Value& entry, in ParseGestureMetrics() argument
566 if (!entry.isMember(ActivityLog::kKeyGestureMetricsData1)) { in ParseGestureMetrics()
571 entry[ActivityLog::kKeyGestureMetricsData1].asDouble(); in ParseGestureMetrics()
572 if (!entry.isMember(ActivityLog::kKeyGestureMetricsData2)) { in ParseGestureMetrics()
577 entry[ActivityLog::kKeyGestureMetricsData2].asDouble(); in ParseGestureMetrics()
578 if (!entry.isMember(ActivityLog::kKeyGestureMetricsType)) { in ParseGestureMetrics()
582 int type = entry[ActivityLog::kKeyGestureMetricsType].asInt(); in ParseGestureMetrics()
591 bool ActivityReplay::ParsePropChange(const Json::Value& entry) { in ParsePropChange() argument
593 if (!entry.isMember(ActivityLog::kKeyPropChangeType)) { in ParsePropChange()
597 string type = entry[ActivityLog::kKeyPropChangeType].asString(); in ParsePropChange()
601 if (!entry.isMember(ActivityLog::kKeyPropChangeValue)) { in ParsePropChange()
606 entry[ActivityLog::kKeyPropChangeValue].asBool(); in ParsePropChange()
609 if (!entry.isMember(ActivityLog::kKeyPropChangeValue)) { in ParsePropChange()
614 entry[ActivityLog::kKeyPropChangeValue].asDouble(); in ParsePropChange()
617 if (!entry.isMember(ActivityLog::kKeyPropChangeValue)) { in ParsePropChange()
622 entry[ActivityLog::kKeyPropChangeValue].asInt(); in ParsePropChange()
625 if (!entry.isMember(ActivityLog::kKeyPropChangeValue)) { in ParsePropChange()
630 entry[ActivityLog::kKeyPropChangeValue].asInt(); in ParsePropChange()
635 if (!entry.isMember(ActivityLog::kKeyPropChangeName)) { in ParsePropChange()
640 new string(entry[ActivityLog::kKeyPropChangeName].asString()); // alloc in ParsePropChange()
657 ActivityLog::Entry* entry = log_.GetEntry(i); in Replay() local
658 switch (entry->type) { in Replay()
661 HardwareState hs = entry->details.hwstate; in Replay()
669 interpreter->HandleTimer(entry->details.timestamp, &last_timeout_req); in Replay()
673 if (!DoubleEq(last_timeout_req, entry->details.timestamp)) { in Replay()
675 last_timeout_req, entry->details.timestamp, i); in Replay()
681 if (consumed_gestures_.front() == entry->details.gesture) { in Replay()
685 entry->details.gesture.String().c_str()); in Replay()
696 entry->details.gesture.String().c_str()); in Replay()
702 ReplayPropChange(entry->details.prop_change); in Replay()
719 const ActivityLog::PropChangeEntry& entry) { in ReplayPropChange() argument
729 if (strcmp(prop->name(), entry.name) == 0) in ReplayPropChange()
734 Err("Unable to find prop %s to set.", entry.name); in ReplayPropChange()
738 switch (entry.type) { in ReplayPropChange()
740 value = Json::Value(entry.value.bool_val); in ReplayPropChange()
743 value = Json::Value(entry.value.double_val); in ReplayPropChange()
746 value = Json::Value(entry.value.int_val); in ReplayPropChange()
749 value = Json::Value(entry.value.short_val); in ReplayPropChange()