Skip to content

Commit

Permalink
regenerate protobufs, remove has_ usage
Browse files Browse the repository at this point in the history
  • Loading branch information
emily33901 committed Jul 21, 2020
1 parent 75ee5b6 commit 2c27efc
Show file tree
Hide file tree
Showing 67 changed files with 72,133 additions and 23,372 deletions.
459 changes: 322 additions & 137 deletions proto/content_manifest_pb.v

Large diffs are not rendered by default.

2,909 changes: 2,909 additions & 0 deletions proto/descriptor_pb.v

Large diffs are not rendered by default.

69 changes: 47 additions & 22 deletions proto/encrypted_app_ticket_pb.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,37 @@ import emily33901.vproto

pub struct EncryptedAppTicket {
mut:
unknown_fields []vproto.UnknownField
unknown_fields []vproto.UnknownField
pub mut:
ticket_version_no u32
has_ticket_version_no bool
crc_encryptedticket u32
has_crc_encryptedticket bool
cb_encrypteduserdata u32
has_cb_encrypteduserdata bool
cb_encrypted_appownershipticket u32
has_cb_encrypted_appownershipticket bool
encrypted_ticket []byte
has_encrypted_ticket bool
ticket_version_no u32
crc_encryptedticket u32
cb_encrypteduserdata u32
cb_encrypted_appownershipticket u32
encrypted_ticket []byte
}

pub fn (o &EncryptedAppTicket) pack() []byte {
mut res := []byte{}
if o.has_ticket_version_no {
if o.ticket_version_no != u32(0) {
res << vproto.pack_uint32_field(o.ticket_version_no, 1)
}
if o.has_crc_encryptedticket {
if o.crc_encryptedticket != u32(0) {
res << vproto.pack_uint32_field(o.crc_encryptedticket, 2)
}
if o.has_cb_encrypteduserdata {
if o.cb_encrypteduserdata != u32(0) {
res << vproto.pack_uint32_field(o.cb_encrypteduserdata, 3)
}
if o.has_cb_encrypted_appownershipticket {
if o.cb_encrypted_appownershipticket != u32(0) {
res << vproto.pack_uint32_field(o.cb_encrypted_appownershipticket, 4)
}
if o.has_encrypted_ticket {
if o.encrypted_ticket != []byte{} {
res << vproto.pack_bytes_field(o.encrypted_ticket, 5)
}
return res
}

pub fn encryptedappticket_unpack(buf []byte) ?EncryptedAppTicket {
mut res := EncryptedAppTicket{}
mut res := zzz_vproto_internal_new_encryptedappticket()
mut total := 0
for total < buf.len {
mut i := 0
Expand All @@ -51,31 +46,26 @@ pub fn encryptedappticket_unpack(buf []byte) ?EncryptedAppTicket {
cur_buf := buf_before_wire_type[tag_wiretype.consumed..]
match tag_wiretype.tag {
1 {
res.has_ticket_version_no = true
ii, v := vproto.unpack_uint32_field(cur_buf, tag_wiretype.wire_type)?
res.ticket_version_no = v
i = ii
}
2 {
res.has_crc_encryptedticket = true
ii, v := vproto.unpack_uint32_field(cur_buf, tag_wiretype.wire_type)?
res.crc_encryptedticket = v
i = ii
}
3 {
res.has_cb_encrypteduserdata = true
ii, v := vproto.unpack_uint32_field(cur_buf, tag_wiretype.wire_type)?
res.cb_encrypteduserdata = v
i = ii
}
4 {
res.has_cb_encrypted_appownershipticket = true
ii, v := vproto.unpack_uint32_field(cur_buf, tag_wiretype.wire_type)?
res.cb_encrypted_appownershipticket = v
i = ii
}
5 {
res.has_encrypted_ticket = true
ii, v := vproto.unpack_bytes_field(cur_buf, tag_wiretype.wire_type)?
res.encrypted_ticket = v
i = ii
Expand All @@ -95,17 +85,52 @@ pub fn encryptedappticket_unpack(buf []byte) ?EncryptedAppTicket {
return res
}

[inline]
pub fn (a EncryptedAppTicket) eq(b EncryptedAppTicket) bool {
return true && a.ticket_version_no == b.ticket_version_no &&
a.crc_encryptedticket == b.crc_encryptedticket &&
a.cb_encrypteduserdata == b.cb_encrypteduserdata &&
a.cb_encrypted_appownershipticket == b.cb_encrypted_appownershipticket &&
a.encrypted_ticket == b.encrypted_ticket
}

[inline]
pub fn (a EncryptedAppTicket) ne(b EncryptedAppTicket) bool {
return !a.eq(b)
}

[inline]
pub fn (a []EncryptedAppTicket) eq(b []EncryptedAppTicket) bool {
if a.len != b.len {
return false
}
for i, _ in a {
if a[i].ne(b[i]) {
return false
}
}
return true
}

[inline]
pub fn (a []EncryptedAppTicket) ne(b []EncryptedAppTicket) bool {
return !a.eq(b)
}

// FOR INTERNAL USE ONLY
[inline]
pub fn zzz_vproto_internal_new_encryptedappticket() EncryptedAppTicket {
return EncryptedAppTicket{}
}

// FOR INTERNAL USE ONLY
[inline]
pub fn zzz_vproto_internal_pack_encryptedappticket(o EncryptedAppTicket, num u32) []byte {
return vproto.pack_message_field(o.pack(), num)
}

// FOR INTERNAL USE ONLY
[inline]
pub fn zzz_vproto_internal_unpack_encryptedappticket(buf []byte, tag_wiretype vproto.WireType) ?(int, EncryptedAppTicket) {
i, v := vproto.unpack_message_field(buf, tag_wiretype)?
mut unpacked := encryptedappticket_unpack(v)?
Expand Down
40 changes: 40 additions & 0 deletions proto/enums_clientserver_pb.v
Original file line number Diff line number Diff line change
Expand Up @@ -1506,11 +1506,19 @@ enum EMsg {
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_new_emsg() EMsg {
return .k_emsginvalid
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_emsg(e EMsg, num u32) []byte {
return vproto.pack_int32_field(int(e), num)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_emsg_packed(e []EMsg, num u32) []byte {
x := array{
data: e.data
Expand All @@ -1522,12 +1530,14 @@ fn zzz_vproto_internal_pack_emsg_packed(e []EMsg, num u32) []byte {
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_emsg(buf []byte, tag_wiretype vproto.WireType) ?(int, EMsg) {
i, v := vproto.unpack_int32_field(buf, tag_wiretype)?
return i, EMsg(v)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_emsg_packed(buf []byte, tag_wiretype vproto.WireType) ?(int, []EMsg) {
i, v := vproto.unpack_int32_field_packed(buf, tag_wiretype)?
return i, array{
Expand Down Expand Up @@ -1557,11 +1567,19 @@ enum EClientPersonaStateFlag {
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_new_eclientpersonastateflag() EClientPersonaStateFlag {
return .k_eclientpersonastateflagstatus
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_eclientpersonastateflag(e EClientPersonaStateFlag, num u32) []byte {
return vproto.pack_int32_field(int(e), num)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_eclientpersonastateflag_packed(e []EClientPersonaStateFlag, num u32) []byte {
x := array{
data: e.data
Expand All @@ -1573,12 +1591,14 @@ fn zzz_vproto_internal_pack_eclientpersonastateflag_packed(e []EClientPersonaSta
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_eclientpersonastateflag(buf []byte, tag_wiretype vproto.WireType) ?(int, EClientPersonaStateFlag) {
i, v := vproto.unpack_int32_field(buf, tag_wiretype)?
return i, EClientPersonaStateFlag(v)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_eclientpersonastateflag_packed(buf []byte, tag_wiretype vproto.WireType) ?(int, []EClientPersonaStateFlag) {
i, v := vproto.unpack_int32_field_packed(buf, tag_wiretype)?
return i, array{
Expand All @@ -1599,11 +1619,19 @@ enum EMsgClanAccountFlags {
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_new_emsgclanaccountflags() EMsgClanAccountFlags {
return .k_emsgclanaccountflagpublic
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_emsgclanaccountflags(e EMsgClanAccountFlags, num u32) []byte {
return vproto.pack_int32_field(int(e), num)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_emsgclanaccountflags_packed(e []EMsgClanAccountFlags, num u32) []byte {
x := array{
data: e.data
Expand All @@ -1615,12 +1643,14 @@ fn zzz_vproto_internal_pack_emsgclanaccountflags_packed(e []EMsgClanAccountFlags
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_emsgclanaccountflags(buf []byte, tag_wiretype vproto.WireType) ?(int, EMsgClanAccountFlags) {
i, v := vproto.unpack_int32_field(buf, tag_wiretype)?
return i, EMsgClanAccountFlags(v)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_emsgclanaccountflags_packed(buf []byte, tag_wiretype vproto.WireType) ?(int, []EMsgClanAccountFlags) {
i, v := vproto.unpack_int32_field_packed(buf, tag_wiretype)?
return i, array{
Expand All @@ -1646,11 +1676,19 @@ enum ESteamReviewScore {
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_new_esteamreviewscore() ESteamReviewScore {
return .k_esteamreviewscore_overwhelminglypositive
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_esteamreviewscore(e ESteamReviewScore, num u32) []byte {
return vproto.pack_int32_field(int(e), num)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_pack_esteamreviewscore_packed(e []ESteamReviewScore, num u32) []byte {
x := array{
data: e.data
Expand All @@ -1662,12 +1700,14 @@ fn zzz_vproto_internal_pack_esteamreviewscore_packed(e []ESteamReviewScore, num
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_esteamreviewscore(buf []byte, tag_wiretype vproto.WireType) ?(int, ESteamReviewScore) {
i, v := vproto.unpack_int32_field(buf, tag_wiretype)?
return i, ESteamReviewScore(v)
}

// FOR INTERNAL USE ONLY
[inline]
fn zzz_vproto_internal_unpack_esteamreviewscore_packed(buf []byte, tag_wiretype vproto.WireType) ?(int, []ESteamReviewScore) {
i, v := vproto.unpack_int32_field_packed(buf, tag_wiretype)?
return i, array{
Expand Down
Loading

0 comments on commit 2c27efc

Please sign in to comment.