Example usage for com.google.common.io.protocol ProtoBuf setLong

List of usage examples for com.google.common.io.protocol ProtoBuf setLong

Introduction

In this page you can find the example usage for com.google.common.io.protocol ProtoBuf setLong.

Prototype

public void setLong(int tag, long value) 

Source Link

Document

Sets the given tag to the given long value.

Usage

From source file:com.codetastrophe.cellfinder.LocationFetcher.java

private ProtoBuf getCellularProfile(int lac, int cid, int mcc, int mnc) {
    Date now = new Date();

    ProtoBuf cellularProfile = new ProtoBuf(GcellularMessageTypes.GCELLULAR_PROFILE);
    cellularProfile.setLong(GCellularProfile.TIMESTAMP, now.getTime());
    cellularProfile.setInt(GCellularProfile.PREFETCH_MODE, GPrefetchMode.PREFETCH_MODE_MORE_NEIGHBORS);

    ProtoBuf primaryCell = new ProtoBuf(GcellularMessageTypes.GCELL);
    primaryCell.setInt(GCell.LAC, lac);//from   w w  w.  j a  va 2s .c o  m
    primaryCell.setInt(GCell.CELLID, cid);
    primaryCell.setInt(GCell.MCC, mcc);
    primaryCell.setInt(GCell.MNC, mnc);

    cellularProfile.setProtoBuf(GCellularProfile.PRIMARY_CELL, primaryCell);

    return cellularProfile;
}