示例#1
0
 UserMessage(const int          version        = -1,
             const UUID&        source         = UUID::nil(),
             const ViewId&      source_view_id = ViewId(),
             const seqno_t      seq            = -1,
             const seqno_t      aru_seq        = -1,
             const seqno_t      seq_range      = 0,
             const Order        order          = O_SAFE,
             const int64_t      fifo_seq       = -1,
             const uint8_t      user_type      = 0xff,
             const uint8_t      flags          = 0) :
     Message(version,
             Message::T_USER,
             source,
             source_view_id,
             ViewId(),
             user_type,
             order,
             fifo_seq,
             seq,
             seq_range,
             aru_seq,
             flags,
             UUID(),
             Range())
 { }
示例#2
0
 /*! Default constructor */
 Message(const uint8_t          version         = 0,
         const Type             type            = T_NONE,
         const UUID&            source          = UUID::nil(),
         const ViewId&          source_view_id  = ViewId(),
         const ViewId&          install_view_id = ViewId(),
         const uint8_t          user_type       = 0xff,
         const Order            order           = O_DROP,
         const int64_t          fifo_seq        = -1,
         const seqno_t          seq             = -1,
         const seqno_t          seq_range       = -1,
         const seqno_t          aru_seq         = -1,
         const uint8_t          flags           = 0,
         const UUID&            range_uuid      = UUID(),
         const Range            range           = Range(),
         const MessageNodeList& node_list       = MessageNodeList()) :
     version_         (version),
     type_            (type),
     user_type_       (user_type),
     order_           (order),
     seq_             (seq),
     seq_range_       (seq_range),
     aru_seq_         (aru_seq),
     fifo_seq_        (fifo_seq),
     flags_           (flags),
     source_          (source),
     source_view_id_  (source_view_id),
     install_view_id_ (install_view_id),
     range_uuid_      (range_uuid),
     range_           (range),
     tstamp_          (gu::datetime::Date::now()),
     node_list_       (node_list)
 { }
示例#3
0
 DelegateMessage(const int     version   = -1,
                 const UUID&   source         = UUID::nil(),
                 const ViewId& source_view_id = ViewId(),
                 const int64_t fifo_seq       = -1) :
     Message(version,
             T_DELEGATE,
             source,
             source_view_id,
             ViewId(),
             0xff,
             O_UNRELIABLE,
             fifo_seq)
 { }
示例#4
0
void CTestView::ConstructL() 
	{
	iControl=new(ELeave) CTestViewControl;
    iControl->ConstructL(ViewId());
	iControl->SetRect(ClientRect());
	AddToStackL(iControl);
	}
 void set_restored_view(View* rst_view) {
     gcomm_assert(state_ == S_CLOSED);
     rst_view_ = rst_view;
     NodeMap::value(self_i_).set_last_prim(
         // set last prim just for exchanging uuid and seq.
         // but actually restored view is not actual prim view.
         ViewId(V_NON_PRIM,
                rst_view -> id().uuid(),
                rst_view -> id().seq()));
 }
示例#6
0
 LeaveMessage(const int     version   = -1,
              const UUID&   source         = UUID::nil(),
              const ViewId& source_view_id = ViewId(),
              const seqno_t   seq            = -1,
              const seqno_t   aru_seq        = -1,
              const int64_t fifo_seq       = -1,
              const uint8_t flags          = 0) :
     Message(version,
             T_LEAVE,
             source,
             source_view_id,
             ViewId(),
             0xff,
             O_UNRELIABLE,
             fifo_seq,
             seq,
             -1,
             aru_seq,
             flags)
 { }
示例#7
0
static Table<Campaign::SiteInfo> getTerrain(RandomGen& random, Vec2 size, int numBlocked) {
  Table<Campaign::SiteInfo> ret(size, {});
  for (Vec2 v : ret.getBounds())
    ret[v].viewId.push_back(ViewId("grass"));
  vector<Vec2> freePos = ret.getBounds().getAllSquares();
  for (int i : Range(numBlocked)) {
    Vec2 pos = random.choose(freePos);
    freePos.removeElement(pos);
    ret[pos].setBlocked();
  }
  return ret;
}
示例#8
0
 MessageNode(const bool    operational  = false,
             const bool    suspected    = false,
             const seqno_t leave_seq    = -1,
             const ViewId& view_id      = ViewId(V_REG),
             const seqno_t safe_seq     = -1,
             const Range   im_range     = Range()) :
     operational_(operational),
     suspected_  (suspected  ),
     leave_seq_  (leave_seq  ),
     view_id_    (view_id    ),
     safe_seq_   (safe_seq   ),
     im_range_   (im_range   )
 { }
示例#9
0
void CTestView::DoDeactivate()
	{
	if (!iActivated)
		{
		RDebug::Print(_L("%x,%x deactivated when not active"),ViewId().iAppUid.iUid,ViewId().iViewUid.iUid);
		ASSERT(iActivated);
		}
	if (iDeactivationPanic)
		{
		RDebug::Print(_L("TVIEW1 : Deactivation Panic"));
		User::Panic(APP_TEXT,1);
		}
	else if (iSlowDeactivation)
		{
		RDebug::Print(_L("TVIEW1 : Slow Deactivation"));
		User::After(5000000);	// 5 sec
		iSlowDeactivation=EFalse;
		}
	else if (iSluggishDeactivation)
		{
		RDebug::Print(_L("TVIEW1 : Sluggish Deactivation"));
		User::After(500000);	// 0.5 sec
		iSluggishDeactivation=EFalse;
		}
	else if (iExitDeactivation)
		{
		RDebug::Print(_L("TVIEW1 : Exit During Deactivation"));
		TApaTaskList taskList(CEikonEnv::Static()->WsSession());
		TApaTask task=taskList.FindApp(KUidViewAppTwo);
		if (task.Exists())
			{
			RDebug::Print(_L("TVIEW1 : ********************* KILLING TVIEW2 ********************* "));
			task.KillTask();
			User::After(10000);	// 0.1 sec
			}
		iExitDeactivation=EFalse;
		}
	iActivated=EFalse;
	}
示例#10
0
    void operator()(const MessageNodeList::value_type& vt) const
    {
        const MessageNode& node(MessageNodeList::value(vt));
        if ((view_id_                  == ViewId() ||
             node.view_id()        == view_id_    ) &&
            ((operational_             == true          &&
              leaving_                 == true   ) ||
             (node.operational() == operational_ &&
              node.leaving()     == leaving_ ) ) )

        {
            nl_.insert_unique(vt);
        }
    }
示例#11
0
 JoinMessage(const int     version   = -1,
             const UUID&            source         = UUID::nil(),
             const ViewId&          source_view_id = ViewId(),
             const seqno_t            seq            = -1,
             const seqno_t            aru_seq        = -1,
             const int64_t          fifo_seq       = -1,
             const MessageNodeList& node_list      = MessageNodeList()) :
     Message(version,
             Message::T_JOIN,
             source,
             source_view_id,
             ViewId(),
             0xff,
             O_UNRELIABLE,
             fifo_seq,
             seq,
             -1,
             aru_seq,
             0,
             UUID(),
             Range(),
             node_list)
 { }
示例#12
0
 ProtoUpMeta(const UUID    source         = UUID::nil(),
             const ViewId  source_view_id = ViewId(),
             const View*   view           = 0,
             const uint8_t user_type      = 0xff,
             const Order   order          = O_DROP,
             const int64_t to_seq         = -1,
             const int err_no = 0) :
     source_         (source         ),
     source_view_id_ (source_view_id ),
     user_type_      (user_type      ),
     order_          (order          ),
     to_seq_         (to_seq         ),
     err_no_         (err_no         ),
     view_           (view != 0 ? new View(*view) : 0)
 { }
示例#13
0
 GapMessage(const int     version   = -1,
            const UUID&   source         = UUID::nil(),
            const ViewId& source_view_id = ViewId(),
            const seqno_t   seq            = -1,
            const seqno_t   aru_seq        = -1,
            const int64_t fifo_seq       = -1,
            const UUID&   range_uuid     = UUID::nil(),
            const Range   range          = Range(),
            const uint8_t flags          = 0) :
     Message(version,
             T_GAP,
             source,
             source_view_id,
             ViewId(),
             0xff,
             O_UNRELIABLE,
             fifo_seq,
             seq,
             -1,
             aru_seq,
             flags,
             range_uuid,
             range)
 { }