Demo entry 6356609

Common thrift

   

Submitted by anonymous on Apr 19, 2017 at 10:30
Language: C++. Code size: 757 Bytes.

/**  
 * Common thrift
 *
 * This file define the common data types
*/

typedef string DevId_t
typedef list<DevId_t> DevIdList  

/**
 * 终端集合
*/
struct DevsSet {
  /**
   * 本级终端ID列表
  */
  1: DevIdList directDevs,
  
  /**
   * 网关对应的下级终端ID列表
  */
  2: optional map<DevId_t, DevsSet> subSystemDevs,
}

enum SessionType {  
  RealPlay = 1,  
  Listen = 2,  
  TaskPlay = 3
} 

enum SessionStateCode {
  StartOrJoin = 1,
  StopOrLeave = 2,
  Pause = 3,
  Exception = 4
}

struct Session {
  1: string sessionId,  
  2: i32 priority,  
  3: string url, 
}

struct Task {
  1: string taskId,
  2: i32 priority,
  3: string url,
  4: i32 version,
}

struct BindData {
  1: string appId,
  2: string appKey,
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).