diff --git a/gui/src/daemon/schema/daemon_grpc_pb.d.ts b/gui/src/daemon/schema/daemon_grpc_pb.d.ts index 10fa9bf1..c69512b1 100644 --- a/gui/src/daemon/schema/daemon_grpc_pb.d.ts +++ b/gui/src/daemon/schema/daemon_grpc_pb.d.ts @@ -11,9 +11,9 @@ import * as grpc from "@grpc/grpc-js"; interface IDaemonService extends grpc.ServiceDefinition { registerUser: grpc.MethodDefinition; getFriendList: grpc.MethodDefinition; - getPublicID: grpc.MethodDefinition; + getMyPublicID: grpc.MethodDefinition; addSyncFriend: grpc.MethodDefinition; - sendAsyncFriendRequest: grpc.MethodDefinition; + addAsyncFriend: grpc.MethodDefinition; getOutgoingFriendRequests: grpc.MethodDefinition; getIncomingAsyncFriendRequests: grpc.MethodDefinition; decideAsyncFriendRequest: grpc.MethodDefinition; @@ -35,9 +35,9 @@ export const DaemonService: IDaemonService; export interface IDaemonServer extends grpc.UntypedServiceImplementation { registerUser: grpc.handleUnaryCall; getFriendList: grpc.handleUnaryCall; - getPublicID: grpc.handleUnaryCall; + getMyPublicID: grpc.handleUnaryCall; addSyncFriend: grpc.handleUnaryCall; - sendAsyncFriendRequest: grpc.handleUnaryCall; + addAsyncFriend: grpc.handleUnaryCall; getOutgoingFriendRequests: grpc.handleUnaryCall; getIncomingAsyncFriendRequests: grpc.handleUnaryCall; decideAsyncFriendRequest: grpc.handleUnaryCall; @@ -62,15 +62,15 @@ export class DaemonClient extends grpc.Client { getFriendList(argument: schema_daemon_pb.GetFriendListRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; getFriendList(argument: schema_daemon_pb.GetFriendListRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; getFriendList(argument: schema_daemon_pb.GetFriendListRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getPublicID(argument: schema_daemon_pb.GetPublicIDRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getPublicID(argument: schema_daemon_pb.GetPublicIDRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - getPublicID(argument: schema_daemon_pb.GetPublicIDRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getMyPublicID(argument: schema_daemon_pb.GetMyPublicIDRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getMyPublicID(argument: schema_daemon_pb.GetMyPublicIDRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + getMyPublicID(argument: schema_daemon_pb.GetMyPublicIDRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; addSyncFriend(argument: schema_daemon_pb.AddSyncFriendRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; addSyncFriend(argument: schema_daemon_pb.AddSyncFriendRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; addSyncFriend(argument: schema_daemon_pb.AddSyncFriendRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendAsyncFriendRequest(argument: schema_daemon_pb.SendAsyncFriendRequestRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendAsyncFriendRequest(argument: schema_daemon_pb.SendAsyncFriendRequestRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; - sendAsyncFriendRequest(argument: schema_daemon_pb.SendAsyncFriendRequestRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + addAsyncFriend(argument: schema_daemon_pb.AddAsyncFriendRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; + addAsyncFriend(argument: schema_daemon_pb.AddAsyncFriendRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + addAsyncFriend(argument: schema_daemon_pb.AddAsyncFriendRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; getOutgoingFriendRequests(argument: schema_daemon_pb.GetOutgoingFriendRequestsRequest, callback: grpc.requestCallback): grpc.ClientUnaryCall; getOutgoingFriendRequests(argument: schema_daemon_pb.GetOutgoingFriendRequestsRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; getOutgoingFriendRequests(argument: schema_daemon_pb.GetOutgoingFriendRequestsRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; diff --git a/gui/src/daemon/schema/daemon_grpc_pb.js b/gui/src/daemon/schema/daemon_grpc_pb.js index bbe115e3..aaeb1bc5 100644 --- a/gui/src/daemon/schema/daemon_grpc_pb.js +++ b/gui/src/daemon/schema/daemon_grpc_pb.js @@ -7,6 +7,28 @@ var grpc = require('@grpc/grpc-js'); var schema_daemon_pb = require('../schema/daemon_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); +function serialize_asphrdaemon_AddAsyncFriendRequest(arg) { + if (!(arg instanceof schema_daemon_pb.AddAsyncFriendRequest)) { + throw new Error('Expected argument of type asphrdaemon.AddAsyncFriendRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_asphrdaemon_AddAsyncFriendRequest(buffer_arg) { + return schema_daemon_pb.AddAsyncFriendRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_asphrdaemon_AddAsyncFriendResponse(arg) { + if (!(arg instanceof schema_daemon_pb.AddAsyncFriendResponse)) { + throw new Error('Expected argument of type asphrdaemon.AddAsyncFriendResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_asphrdaemon_AddAsyncFriendResponse(buffer_arg) { + return schema_daemon_pb.AddAsyncFriendResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_asphrdaemon_AddSyncFriendRequest(arg) { if (!(arg instanceof schema_daemon_pb.AddSyncFriendRequest)) { throw new Error('Expected argument of type asphrdaemon.AddSyncFriendRequest'); @@ -161,6 +183,28 @@ function deserialize_asphrdaemon_GetMessagesResponse(buffer_arg) { return schema_daemon_pb.GetMessagesResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_asphrdaemon_GetMyPublicIDRequest(arg) { + if (!(arg instanceof schema_daemon_pb.GetMyPublicIDRequest)) { + throw new Error('Expected argument of type asphrdaemon.GetMyPublicIDRequest'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_asphrdaemon_GetMyPublicIDRequest(buffer_arg) { + return schema_daemon_pb.GetMyPublicIDRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_asphrdaemon_GetMyPublicIDResponse(arg) { + if (!(arg instanceof schema_daemon_pb.GetMyPublicIDResponse)) { + throw new Error('Expected argument of type asphrdaemon.GetMyPublicIDResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_asphrdaemon_GetMyPublicIDResponse(buffer_arg) { + return schema_daemon_pb.GetMyPublicIDResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_asphrdaemon_GetOutboxMessagesRequest(arg) { if (!(arg instanceof schema_daemon_pb.GetOutboxMessagesRequest)) { throw new Error('Expected argument of type asphrdaemon.GetOutboxMessagesRequest'); @@ -205,28 +249,6 @@ function deserialize_asphrdaemon_GetOutgoingFriendRequestsResponse(buffer_arg) { return schema_daemon_pb.GetOutgoingFriendRequestsResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_asphrdaemon_GetPublicIDRequest(arg) { - if (!(arg instanceof schema_daemon_pb.GetPublicIDRequest)) { - throw new Error('Expected argument of type asphrdaemon.GetPublicIDRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_asphrdaemon_GetPublicIDRequest(buffer_arg) { - return schema_daemon_pb.GetPublicIDRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_asphrdaemon_GetPublicIDResponse(arg) { - if (!(arg instanceof schema_daemon_pb.GetPublicIDResponse)) { - throw new Error('Expected argument of type asphrdaemon.GetPublicIDResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_asphrdaemon_GetPublicIDResponse(buffer_arg) { - return schema_daemon_pb.GetPublicIDResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_asphrdaemon_GetSentMessagesRequest(arg) { if (!(arg instanceof schema_daemon_pb.GetSentMessagesRequest)) { throw new Error('Expected argument of type asphrdaemon.GetSentMessagesRequest'); @@ -359,28 +381,6 @@ function deserialize_asphrdaemon_RemoveFriendResponse(buffer_arg) { return schema_daemon_pb.RemoveFriendResponse.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_asphrdaemon_SendAsyncFriendRequestRequest(arg) { - if (!(arg instanceof schema_daemon_pb.SendAsyncFriendRequestRequest)) { - throw new Error('Expected argument of type asphrdaemon.SendAsyncFriendRequestRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_asphrdaemon_SendAsyncFriendRequestRequest(buffer_arg) { - return schema_daemon_pb.SendAsyncFriendRequestRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_asphrdaemon_SendAsyncFriendRequestResponse(arg) { - if (!(arg instanceof schema_daemon_pb.SendAsyncFriendRequestResponse)) { - throw new Error('Expected argument of type asphrdaemon.SendAsyncFriendRequestResponse'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_asphrdaemon_SendAsyncFriendRequestResponse(buffer_arg) { - return schema_daemon_pb.SendAsyncFriendRequestResponse.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_asphrdaemon_SendMessageRequest(arg) { if (!(arg instanceof schema_daemon_pb.SendMessageRequest)) { throw new Error('Expected argument of type asphrdaemon.SendMessageRequest'); @@ -427,16 +427,16 @@ var DaemonService = exports.DaemonService = { responseSerialize: serialize_asphrdaemon_GetFriendListResponse, responseDeserialize: deserialize_asphrdaemon_GetFriendListResponse, }, - getPublicID: { - path: '/asphrdaemon.Daemon/GetPublicID', + getMyPublicID: { + path: '/asphrdaemon.Daemon/GetMyPublicID', requestStream: false, responseStream: false, - requestType: schema_daemon_pb.GetPublicIDRequest, - responseType: schema_daemon_pb.GetPublicIDResponse, - requestSerialize: serialize_asphrdaemon_GetPublicIDRequest, - requestDeserialize: deserialize_asphrdaemon_GetPublicIDRequest, - responseSerialize: serialize_asphrdaemon_GetPublicIDResponse, - responseDeserialize: deserialize_asphrdaemon_GetPublicIDResponse, + requestType: schema_daemon_pb.GetMyPublicIDRequest, + responseType: schema_daemon_pb.GetMyPublicIDResponse, + requestSerialize: serialize_asphrdaemon_GetMyPublicIDRequest, + requestDeserialize: deserialize_asphrdaemon_GetMyPublicIDRequest, + responseSerialize: serialize_asphrdaemon_GetMyPublicIDResponse, + responseDeserialize: deserialize_asphrdaemon_GetMyPublicIDResponse, }, addSyncFriend: { path: '/asphrdaemon.Daemon/AddSyncFriend', @@ -449,16 +449,16 @@ var DaemonService = exports.DaemonService = { responseSerialize: serialize_asphrdaemon_AddSyncFriendResponse, responseDeserialize: deserialize_asphrdaemon_AddSyncFriendResponse, }, - sendAsyncFriendRequest: { - path: '/asphrdaemon.Daemon/SendAsyncFriendRequest', + addAsyncFriend: { + path: '/asphrdaemon.Daemon/AddAsyncFriend', requestStream: false, responseStream: false, - requestType: schema_daemon_pb.SendAsyncFriendRequestRequest, - responseType: schema_daemon_pb.SendAsyncFriendRequestResponse, - requestSerialize: serialize_asphrdaemon_SendAsyncFriendRequestRequest, - requestDeserialize: deserialize_asphrdaemon_SendAsyncFriendRequestRequest, - responseSerialize: serialize_asphrdaemon_SendAsyncFriendRequestResponse, - responseDeserialize: deserialize_asphrdaemon_SendAsyncFriendRequestResponse, + requestType: schema_daemon_pb.AddAsyncFriendRequest, + responseType: schema_daemon_pb.AddAsyncFriendResponse, + requestSerialize: serialize_asphrdaemon_AddAsyncFriendRequest, + requestDeserialize: deserialize_asphrdaemon_AddAsyncFriendRequest, + responseSerialize: serialize_asphrdaemon_AddAsyncFriendResponse, + responseDeserialize: deserialize_asphrdaemon_AddAsyncFriendResponse, }, getOutgoingFriendRequests: { path: '/asphrdaemon.Daemon/GetOutgoingFriendRequests', diff --git a/gui/src/daemon/schema/daemon_pb.d.ts b/gui/src/daemon/schema/daemon_pb.d.ts index e95459dc..b81271f8 100644 --- a/gui/src/daemon/schema/daemon_pb.d.ts +++ b/gui/src/daemon/schema/daemon_pb.d.ts @@ -72,8 +72,8 @@ export class FriendInfo extends jspb.Message { getPublicId(): string; setPublicId(value: string): void; - getProgress(): number; - setProgress(value: number): void; + getRequestProgress(): FriendRequestProgressMap[keyof FriendRequestProgressMap]; + setRequestProgress(value: FriendRequestProgressMap[keyof FriendRequestProgressMap]): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): FriendInfo.AsObject; @@ -90,7 +90,7 @@ export namespace FriendInfo { uniqueName: string, displayName: string, publicId: string, - progress: number, + requestProgress: FriendRequestProgressMap[keyof FriendRequestProgressMap], } } @@ -116,23 +116,23 @@ export namespace GetFriendListResponse { } } -export class GetPublicIDRequest extends jspb.Message { +export class GetMyPublicIDRequest extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetPublicIDRequest.AsObject; - static toObject(includeInstance: boolean, msg: GetPublicIDRequest): GetPublicIDRequest.AsObject; + toObject(includeInstance?: boolean): GetMyPublicIDRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetMyPublicIDRequest): GetMyPublicIDRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetPublicIDRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetPublicIDRequest; - static deserializeBinaryFromReader(message: GetPublicIDRequest, reader: jspb.BinaryReader): GetPublicIDRequest; + static serializeBinaryToWriter(message: GetMyPublicIDRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetMyPublicIDRequest; + static deserializeBinaryFromReader(message: GetMyPublicIDRequest, reader: jspb.BinaryReader): GetMyPublicIDRequest; } -export namespace GetPublicIDRequest { +export namespace GetMyPublicIDRequest { export type AsObject = { } } -export class GetPublicIDResponse extends jspb.Message { +export class GetMyPublicIDResponse extends jspb.Message { getPublicId(): string; setPublicId(value: string): void; @@ -140,16 +140,16 @@ export class GetPublicIDResponse extends jspb.Message { setStory(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetPublicIDResponse.AsObject; - static toObject(includeInstance: boolean, msg: GetPublicIDResponse): GetPublicIDResponse.AsObject; + toObject(includeInstance?: boolean): GetMyPublicIDResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetMyPublicIDResponse): GetMyPublicIDResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetPublicIDResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetPublicIDResponse; - static deserializeBinaryFromReader(message: GetPublicIDResponse, reader: jspb.BinaryReader): GetPublicIDResponse; + static serializeBinaryToWriter(message: GetMyPublicIDResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetMyPublicIDResponse; + static deserializeBinaryFromReader(message: GetMyPublicIDResponse, reader: jspb.BinaryReader): GetMyPublicIDResponse; } -export namespace GetPublicIDResponse { +export namespace GetMyPublicIDResponse { export type AsObject = { publicId: string, story: string, @@ -200,44 +200,50 @@ export namespace AddSyncFriendResponse { } } -export class SendAsyncFriendRequestRequest extends jspb.Message { - hasFriendInfo(): boolean; - clearFriendInfo(): void; - getFriendInfo(): FriendInfo | undefined; - setFriendInfo(value?: FriendInfo): void; +export class AddAsyncFriendRequest extends jspb.Message { + getUniqueName(): string; + setUniqueName(value: string): void; + + getDisplayName(): string; + setDisplayName(value: string): void; + + getPublicId(): string; + setPublicId(value: string): void; getMessage(): string; setMessage(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendAsyncFriendRequestRequest.AsObject; - static toObject(includeInstance: boolean, msg: SendAsyncFriendRequestRequest): SendAsyncFriendRequestRequest.AsObject; + toObject(includeInstance?: boolean): AddAsyncFriendRequest.AsObject; + static toObject(includeInstance: boolean, msg: AddAsyncFriendRequest): AddAsyncFriendRequest.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendAsyncFriendRequestRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendAsyncFriendRequestRequest; - static deserializeBinaryFromReader(message: SendAsyncFriendRequestRequest, reader: jspb.BinaryReader): SendAsyncFriendRequestRequest; + static serializeBinaryToWriter(message: AddAsyncFriendRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddAsyncFriendRequest; + static deserializeBinaryFromReader(message: AddAsyncFriendRequest, reader: jspb.BinaryReader): AddAsyncFriendRequest; } -export namespace SendAsyncFriendRequestRequest { +export namespace AddAsyncFriendRequest { export type AsObject = { - friendInfo?: FriendInfo.AsObject, + uniqueName: string, + displayName: string, + publicId: string, message: string, } } -export class SendAsyncFriendRequestResponse extends jspb.Message { +export class AddAsyncFriendResponse extends jspb.Message { serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SendAsyncFriendRequestResponse.AsObject; - static toObject(includeInstance: boolean, msg: SendAsyncFriendRequestResponse): SendAsyncFriendRequestResponse.AsObject; + toObject(includeInstance?: boolean): AddAsyncFriendResponse.AsObject; + static toObject(includeInstance: boolean, msg: AddAsyncFriendResponse): AddAsyncFriendResponse.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SendAsyncFriendRequestResponse, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SendAsyncFriendRequestResponse; - static deserializeBinaryFromReader(message: SendAsyncFriendRequestResponse, reader: jspb.BinaryReader): SendAsyncFriendRequestResponse; + static serializeBinaryToWriter(message: AddAsyncFriendResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddAsyncFriendResponse; + static deserializeBinaryFromReader(message: AddAsyncFriendResponse, reader: jspb.BinaryReader): AddAsyncFriendResponse; } -export namespace SendAsyncFriendRequestResponse { +export namespace AddAsyncFriendResponse { export type AsObject = { } } @@ -258,21 +264,37 @@ export namespace GetOutgoingFriendRequestsRequest { } } -export class GetOutgoingFriendRequestsResponse extends jspb.Message { - clearFriendInfosList(): void; - getFriendInfosList(): Array; - setFriendInfosList(value: Array): void; - addFriendInfos(value?: FriendInfo, index?: number): FriendInfo; +export class FriendRequest extends jspb.Message { + hasFriendInfo(): boolean; + clearFriendInfo(): void; + getFriendInfo(): FriendInfo | undefined; + setFriendInfo(value?: FriendInfo): void; - clearMessagesList(): void; - getMessagesList(): Array; - setMessagesList(value: Array): void; - addMessages(value: string, index?: number): string; + getMessage(): string; + setMessage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FriendRequest.AsObject; + static toObject(includeInstance: boolean, msg: FriendRequest): FriendRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FriendRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FriendRequest; + static deserializeBinaryFromReader(message: FriendRequest, reader: jspb.BinaryReader): FriendRequest; +} + +export namespace FriendRequest { + export type AsObject = { + friendInfo?: FriendInfo.AsObject, + message: string, + } +} - clearFriendRequestTypesList(): void; - getFriendRequestTypesList(): Array; - setFriendRequestTypesList(value: Array): void; - addFriendRequestTypes(value: GetOutgoingFriendRequestsResponse.FriendRequestTypeMap[keyof GetOutgoingFriendRequestsResponse.FriendRequestTypeMap], index?: number): GetOutgoingFriendRequestsResponse.FriendRequestTypeMap[keyof GetOutgoingFriendRequestsResponse.FriendRequestTypeMap]; +export class GetOutgoingFriendRequestsResponse extends jspb.Message { + clearFriendRequestsList(): void; + getFriendRequestsList(): Array; + setFriendRequestsList(value: Array): void; + addFriendRequests(value?: FriendRequest, index?: number): FriendRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetOutgoingFriendRequestsResponse.AsObject; @@ -286,17 +308,8 @@ export class GetOutgoingFriendRequestsResponse extends jspb.Message { export namespace GetOutgoingFriendRequestsResponse { export type AsObject = { - friendInfosList: Array, - messagesList: Array, - friendRequestTypesList: Array, + friendRequestsList: Array, } - - export interface FriendRequestTypeMap { - ASYNC: 0; - SYNC: 1; - } - - export const FriendRequestType: FriendRequestTypeMap; } export class GetIncomingAsyncFriendRequestsRequest extends jspb.Message { @@ -316,15 +329,10 @@ export namespace GetIncomingAsyncFriendRequestsRequest { } export class GetIncomingAsyncFriendRequestsResponse extends jspb.Message { - clearFriendInfosList(): void; - getFriendInfosList(): Array; - setFriendInfosList(value: Array): void; - addFriendInfos(value?: FriendInfo, index?: number): FriendInfo; - - clearMessagesList(): void; - getMessagesList(): Array; - setMessagesList(value: Array): void; - addMessages(value: string, index?: number): string; + clearFriendRequestsList(): void; + getFriendRequestsList(): Array; + setFriendRequestsList(value: Array): void; + addFriendRequests(value?: FriendRequest, index?: number): FriendRequest; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetIncomingAsyncFriendRequestsResponse.AsObject; @@ -338,8 +346,7 @@ export class GetIncomingAsyncFriendRequestsResponse extends jspb.Message { export namespace GetIncomingAsyncFriendRequestsResponse { export type AsObject = { - friendInfosList: Array, - messagesList: Array, + friendRequestsList: Array, } } @@ -877,3 +884,12 @@ export namespace KillResponse { export type AsObject = { } } + +export interface FriendRequestProgressMap { + INCOMING: 0; + OUTGOINGASYNC: 1; + OUTGOINGSYNC: 2; + COMPLETE: 3; +} + +export const FriendRequestProgress: FriendRequestProgressMap; diff --git a/gui/src/daemon/schema/daemon_pb.js b/gui/src/daemon/schema/daemon_pb.js index 00fc0aa5..0bdadecf 100644 --- a/gui/src/daemon/schema/daemon_pb.js +++ b/gui/src/daemon/schema/daemon_pb.js @@ -19,6 +19,8 @@ var global = Function('return this')(); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.asphrdaemon.AddAsyncFriendRequest', null, global); +goog.exportSymbol('proto.asphrdaemon.AddAsyncFriendResponse', null, global); goog.exportSymbol('proto.asphrdaemon.AddSyncFriendRequest', null, global); goog.exportSymbol('proto.asphrdaemon.AddSyncFriendResponse', null, global); goog.exportSymbol('proto.asphrdaemon.BaseMessage', null, global); @@ -27,6 +29,8 @@ goog.exportSymbol('proto.asphrdaemon.ChangeLatencyResponse', null, global); goog.exportSymbol('proto.asphrdaemon.DecideAsyncFriendRequestRequest', null, global); goog.exportSymbol('proto.asphrdaemon.DecideAsyncFriendRequestResponse', null, global); goog.exportSymbol('proto.asphrdaemon.FriendInfo', null, global); +goog.exportSymbol('proto.asphrdaemon.FriendRequest', null, global); +goog.exportSymbol('proto.asphrdaemon.FriendRequestProgress', null, global); goog.exportSymbol('proto.asphrdaemon.GetFriendListRequest', null, global); goog.exportSymbol('proto.asphrdaemon.GetFriendListResponse', null, global); goog.exportSymbol('proto.asphrdaemon.GetIncomingAsyncFriendRequestsRequest', null, global); @@ -36,13 +40,12 @@ goog.exportSymbol('proto.asphrdaemon.GetLatencyResponse', null, global); goog.exportSymbol('proto.asphrdaemon.GetMessagesRequest', null, global); goog.exportSymbol('proto.asphrdaemon.GetMessagesRequest.Filter', null, global); goog.exportSymbol('proto.asphrdaemon.GetMessagesResponse', null, global); +goog.exportSymbol('proto.asphrdaemon.GetMyPublicIDRequest', null, global); +goog.exportSymbol('proto.asphrdaemon.GetMyPublicIDResponse', null, global); goog.exportSymbol('proto.asphrdaemon.GetOutboxMessagesRequest', null, global); goog.exportSymbol('proto.asphrdaemon.GetOutboxMessagesResponse', null, global); goog.exportSymbol('proto.asphrdaemon.GetOutgoingFriendRequestsRequest', null, global); goog.exportSymbol('proto.asphrdaemon.GetOutgoingFriendRequestsResponse', null, global); -goog.exportSymbol('proto.asphrdaemon.GetOutgoingFriendRequestsResponse.FriendRequestType', null, global); -goog.exportSymbol('proto.asphrdaemon.GetPublicIDRequest', null, global); -goog.exportSymbol('proto.asphrdaemon.GetPublicIDResponse', null, global); goog.exportSymbol('proto.asphrdaemon.GetSentMessagesRequest', null, global); goog.exportSymbol('proto.asphrdaemon.GetSentMessagesResponse', null, global); goog.exportSymbol('proto.asphrdaemon.GetStatusRequest', null, global); @@ -57,8 +60,6 @@ goog.exportSymbol('proto.asphrdaemon.RegisterUserRequest', null, global); goog.exportSymbol('proto.asphrdaemon.RegisterUserResponse', null, global); goog.exportSymbol('proto.asphrdaemon.RemoveFriendRequest', null, global); goog.exportSymbol('proto.asphrdaemon.RemoveFriendResponse', null, global); -goog.exportSymbol('proto.asphrdaemon.SendAsyncFriendRequestRequest', null, global); -goog.exportSymbol('proto.asphrdaemon.SendAsyncFriendRequestResponse', null, global); goog.exportSymbol('proto.asphrdaemon.SendMessageRequest', null, global); goog.exportSymbol('proto.asphrdaemon.SendMessageResponse', null, global); /** @@ -176,16 +177,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.asphrdaemon.GetPublicIDRequest = function(opt_data) { +proto.asphrdaemon.GetMyPublicIDRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.asphrdaemon.GetPublicIDRequest, jspb.Message); +goog.inherits(proto.asphrdaemon.GetMyPublicIDRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.asphrdaemon.GetPublicIDRequest.displayName = 'proto.asphrdaemon.GetPublicIDRequest'; + proto.asphrdaemon.GetMyPublicIDRequest.displayName = 'proto.asphrdaemon.GetMyPublicIDRequest'; } /** * Generated by JsPbCodeGenerator. @@ -197,16 +198,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.asphrdaemon.GetPublicIDResponse = function(opt_data) { +proto.asphrdaemon.GetMyPublicIDResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.asphrdaemon.GetPublicIDResponse, jspb.Message); +goog.inherits(proto.asphrdaemon.GetMyPublicIDResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.asphrdaemon.GetPublicIDResponse.displayName = 'proto.asphrdaemon.GetPublicIDResponse'; + proto.asphrdaemon.GetMyPublicIDResponse.displayName = 'proto.asphrdaemon.GetMyPublicIDResponse'; } /** * Generated by JsPbCodeGenerator. @@ -260,16 +261,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.asphrdaemon.SendAsyncFriendRequestRequest = function(opt_data) { +proto.asphrdaemon.AddAsyncFriendRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.asphrdaemon.SendAsyncFriendRequestRequest, jspb.Message); +goog.inherits(proto.asphrdaemon.AddAsyncFriendRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.asphrdaemon.SendAsyncFriendRequestRequest.displayName = 'proto.asphrdaemon.SendAsyncFriendRequestRequest'; + proto.asphrdaemon.AddAsyncFriendRequest.displayName = 'proto.asphrdaemon.AddAsyncFriendRequest'; } /** * Generated by JsPbCodeGenerator. @@ -281,16 +282,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.asphrdaemon.SendAsyncFriendRequestResponse = function(opt_data) { +proto.asphrdaemon.AddAsyncFriendResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.asphrdaemon.SendAsyncFriendRequestResponse, jspb.Message); +goog.inherits(proto.asphrdaemon.AddAsyncFriendResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.asphrdaemon.SendAsyncFriendRequestResponse.displayName = 'proto.asphrdaemon.SendAsyncFriendRequestResponse'; + proto.asphrdaemon.AddAsyncFriendResponse.displayName = 'proto.asphrdaemon.AddAsyncFriendResponse'; } /** * Generated by JsPbCodeGenerator. @@ -313,6 +314,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.asphrdaemon.GetOutgoingFriendRequestsRequest.displayName = 'proto.asphrdaemon.GetOutgoingFriendRequestsRequest'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.asphrdaemon.FriendRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.asphrdaemon.FriendRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.asphrdaemon.FriendRequest.displayName = 'proto.asphrdaemon.FriendRequest'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -1298,7 +1320,7 @@ proto.asphrdaemon.FriendInfo.toObject = function(includeInstance, msg) { uniqueName: jspb.Message.getFieldWithDefault(msg, 1, ""), displayName: jspb.Message.getFieldWithDefault(msg, 2, ""), publicId: jspb.Message.getFieldWithDefault(msg, 3, ""), - progress: jspb.Message.getFieldWithDefault(msg, 4, 0) + requestProgress: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { @@ -1348,8 +1370,8 @@ proto.asphrdaemon.FriendInfo.deserializeBinaryFromReader = function(msg, reader) msg.setPublicId(value); break; case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setProgress(value); + var value = /** @type {!proto.asphrdaemon.FriendRequestProgress} */ (reader.readEnum()); + msg.setRequestProgress(value); break; default: reader.skipField(); @@ -1401,9 +1423,9 @@ proto.asphrdaemon.FriendInfo.serializeBinaryToWriter = function(message, writer) f ); } - f = message.getProgress(); - if (f !== 0) { - writer.writeInt32( + f = message.getRequestProgress(); + if (f !== 0.0) { + writer.writeEnum( 4, f ); @@ -1466,20 +1488,20 @@ proto.asphrdaemon.FriendInfo.prototype.setPublicId = function(value) { /** - * optional int32 progress = 4; - * @return {number} + * optional FriendRequestProgress request_progress = 4; + * @return {!proto.asphrdaemon.FriendRequestProgress} */ -proto.asphrdaemon.FriendInfo.prototype.getProgress = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.asphrdaemon.FriendInfo.prototype.getRequestProgress = function() { + return /** @type {!proto.asphrdaemon.FriendRequestProgress} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {number} value + * @param {!proto.asphrdaemon.FriendRequestProgress} value * @return {!proto.asphrdaemon.FriendInfo} returns this */ -proto.asphrdaemon.FriendInfo.prototype.setProgress = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.asphrdaemon.FriendInfo.prototype.setRequestProgress = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); }; @@ -1659,8 +1681,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.asphrdaemon.GetPublicIDRequest.prototype.toObject = function(opt_includeInstance) { - return proto.asphrdaemon.GetPublicIDRequest.toObject(opt_includeInstance, this); +proto.asphrdaemon.GetMyPublicIDRequest.prototype.toObject = function(opt_includeInstance) { + return proto.asphrdaemon.GetMyPublicIDRequest.toObject(opt_includeInstance, this); }; @@ -1669,11 +1691,11 @@ proto.asphrdaemon.GetPublicIDRequest.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.asphrdaemon.GetPublicIDRequest} msg The msg instance to transform. + * @param {!proto.asphrdaemon.GetMyPublicIDRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetPublicIDRequest.toObject = function(includeInstance, msg) { +proto.asphrdaemon.GetMyPublicIDRequest.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -1689,23 +1711,23 @@ proto.asphrdaemon.GetPublicIDRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.asphrdaemon.GetPublicIDRequest} + * @return {!proto.asphrdaemon.GetMyPublicIDRequest} */ -proto.asphrdaemon.GetPublicIDRequest.deserializeBinary = function(bytes) { +proto.asphrdaemon.GetMyPublicIDRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.asphrdaemon.GetPublicIDRequest; - return proto.asphrdaemon.GetPublicIDRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.asphrdaemon.GetMyPublicIDRequest; + return proto.asphrdaemon.GetMyPublicIDRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.asphrdaemon.GetPublicIDRequest} msg The message object to deserialize into. + * @param {!proto.asphrdaemon.GetMyPublicIDRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.asphrdaemon.GetPublicIDRequest} + * @return {!proto.asphrdaemon.GetMyPublicIDRequest} */ -proto.asphrdaemon.GetPublicIDRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.asphrdaemon.GetMyPublicIDRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1725,9 +1747,9 @@ proto.asphrdaemon.GetPublicIDRequest.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.asphrdaemon.GetPublicIDRequest.prototype.serializeBinary = function() { +proto.asphrdaemon.GetMyPublicIDRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.asphrdaemon.GetPublicIDRequest.serializeBinaryToWriter(this, writer); + proto.asphrdaemon.GetMyPublicIDRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1735,11 +1757,11 @@ proto.asphrdaemon.GetPublicIDRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.asphrdaemon.GetPublicIDRequest} message + * @param {!proto.asphrdaemon.GetMyPublicIDRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetPublicIDRequest.serializeBinaryToWriter = function(message, writer) { +proto.asphrdaemon.GetMyPublicIDRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -1760,8 +1782,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.asphrdaemon.GetPublicIDResponse.prototype.toObject = function(opt_includeInstance) { - return proto.asphrdaemon.GetPublicIDResponse.toObject(opt_includeInstance, this); +proto.asphrdaemon.GetMyPublicIDResponse.prototype.toObject = function(opt_includeInstance) { + return proto.asphrdaemon.GetMyPublicIDResponse.toObject(opt_includeInstance, this); }; @@ -1770,11 +1792,11 @@ proto.asphrdaemon.GetPublicIDResponse.prototype.toObject = function(opt_includeI * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.asphrdaemon.GetPublicIDResponse} msg The msg instance to transform. + * @param {!proto.asphrdaemon.GetMyPublicIDResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetPublicIDResponse.toObject = function(includeInstance, msg) { +proto.asphrdaemon.GetMyPublicIDResponse.toObject = function(includeInstance, msg) { var f, obj = { publicId: jspb.Message.getFieldWithDefault(msg, 1, ""), story: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1791,23 +1813,23 @@ proto.asphrdaemon.GetPublicIDResponse.toObject = function(includeInstance, msg) /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.asphrdaemon.GetPublicIDResponse} + * @return {!proto.asphrdaemon.GetMyPublicIDResponse} */ -proto.asphrdaemon.GetPublicIDResponse.deserializeBinary = function(bytes) { +proto.asphrdaemon.GetMyPublicIDResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.asphrdaemon.GetPublicIDResponse; - return proto.asphrdaemon.GetPublicIDResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.asphrdaemon.GetMyPublicIDResponse; + return proto.asphrdaemon.GetMyPublicIDResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.asphrdaemon.GetPublicIDResponse} msg The message object to deserialize into. + * @param {!proto.asphrdaemon.GetMyPublicIDResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.asphrdaemon.GetPublicIDResponse} + * @return {!proto.asphrdaemon.GetMyPublicIDResponse} */ -proto.asphrdaemon.GetPublicIDResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.asphrdaemon.GetMyPublicIDResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1835,9 +1857,9 @@ proto.asphrdaemon.GetPublicIDResponse.deserializeBinaryFromReader = function(msg * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.asphrdaemon.GetPublicIDResponse.prototype.serializeBinary = function() { +proto.asphrdaemon.GetMyPublicIDResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.asphrdaemon.GetPublicIDResponse.serializeBinaryToWriter(this, writer); + proto.asphrdaemon.GetMyPublicIDResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1845,11 +1867,11 @@ proto.asphrdaemon.GetPublicIDResponse.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.asphrdaemon.GetPublicIDResponse} message + * @param {!proto.asphrdaemon.GetMyPublicIDResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetPublicIDResponse.serializeBinaryToWriter = function(message, writer) { +proto.asphrdaemon.GetMyPublicIDResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPublicId(); if (f.length > 0) { @@ -1872,16 +1894,16 @@ proto.asphrdaemon.GetPublicIDResponse.serializeBinaryToWriter = function(message * optional string public_id = 1; * @return {string} */ -proto.asphrdaemon.GetPublicIDResponse.prototype.getPublicId = function() { +proto.asphrdaemon.GetMyPublicIDResponse.prototype.getPublicId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.asphrdaemon.GetPublicIDResponse} returns this + * @return {!proto.asphrdaemon.GetMyPublicIDResponse} returns this */ -proto.asphrdaemon.GetPublicIDResponse.prototype.setPublicId = function(value) { +proto.asphrdaemon.GetMyPublicIDResponse.prototype.setPublicId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1890,16 +1912,16 @@ proto.asphrdaemon.GetPublicIDResponse.prototype.setPublicId = function(value) { * optional string story = 2; * @return {string} */ -proto.asphrdaemon.GetPublicIDResponse.prototype.getStory = function() { +proto.asphrdaemon.GetMyPublicIDResponse.prototype.getStory = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.asphrdaemon.GetPublicIDResponse} returns this + * @return {!proto.asphrdaemon.GetMyPublicIDResponse} returns this */ -proto.asphrdaemon.GetPublicIDResponse.prototype.setStory = function(value) { +proto.asphrdaemon.GetMyPublicIDResponse.prototype.setStory = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2211,8 +2233,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.toObject = function(opt_includeInstance) { - return proto.asphrdaemon.SendAsyncFriendRequestRequest.toObject(opt_includeInstance, this); +proto.asphrdaemon.AddAsyncFriendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.asphrdaemon.AddAsyncFriendRequest.toObject(opt_includeInstance, this); }; @@ -2221,14 +2243,16 @@ proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.toObject = function(op * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.asphrdaemon.SendAsyncFriendRequestRequest} msg The msg instance to transform. + * @param {!proto.asphrdaemon.AddAsyncFriendRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.toObject = function(includeInstance, msg) { +proto.asphrdaemon.AddAsyncFriendRequest.toObject = function(includeInstance, msg) { var f, obj = { - friendInfo: (f = msg.getFriendInfo()) && proto.asphrdaemon.FriendInfo.toObject(includeInstance, f), - message: jspb.Message.getFieldWithDefault(msg, 2, "") + uniqueName: jspb.Message.getFieldWithDefault(msg, 1, ""), + displayName: jspb.Message.getFieldWithDefault(msg, 2, ""), + publicId: jspb.Message.getFieldWithDefault(msg, 3, ""), + message: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -2242,23 +2266,23 @@ proto.asphrdaemon.SendAsyncFriendRequestRequest.toObject = function(includeInsta /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.asphrdaemon.SendAsyncFriendRequestRequest} + * @return {!proto.asphrdaemon.AddAsyncFriendRequest} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.deserializeBinary = function(bytes) { +proto.asphrdaemon.AddAsyncFriendRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.asphrdaemon.SendAsyncFriendRequestRequest; - return proto.asphrdaemon.SendAsyncFriendRequestRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.asphrdaemon.AddAsyncFriendRequest; + return proto.asphrdaemon.AddAsyncFriendRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.asphrdaemon.SendAsyncFriendRequestRequest} msg The message object to deserialize into. + * @param {!proto.asphrdaemon.AddAsyncFriendRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.asphrdaemon.SendAsyncFriendRequestRequest} + * @return {!proto.asphrdaemon.AddAsyncFriendRequest} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.asphrdaemon.AddAsyncFriendRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2266,11 +2290,18 @@ proto.asphrdaemon.SendAsyncFriendRequestRequest.deserializeBinaryFromReader = fu var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.asphrdaemon.FriendInfo; - reader.readMessage(value,proto.asphrdaemon.FriendInfo.deserializeBinaryFromReader); - msg.setFriendInfo(value); + var value = /** @type {string} */ (reader.readString()); + msg.setUniqueName(value); break; case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDisplayName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPublicId(value); + break; + case 4: var value = /** @type {string} */ (reader.readString()); msg.setMessage(value); break; @@ -2287,9 +2318,9 @@ proto.asphrdaemon.SendAsyncFriendRequestRequest.deserializeBinaryFromReader = fu * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.serializeBinary = function() { +proto.asphrdaemon.AddAsyncFriendRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.asphrdaemon.SendAsyncFriendRequestRequest.serializeBinaryToWriter(this, writer); + proto.asphrdaemon.AddAsyncFriendRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2297,82 +2328,112 @@ proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.serializeBinary = func /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.asphrdaemon.SendAsyncFriendRequestRequest} message + * @param {!proto.asphrdaemon.AddAsyncFriendRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.serializeBinaryToWriter = function(message, writer) { +proto.asphrdaemon.AddAsyncFriendRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFriendInfo(); - if (f != null) { - writer.writeMessage( + f = message.getUniqueName(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.asphrdaemon.FriendInfo.serializeBinaryToWriter + f ); } - f = message.getMessage(); + f = message.getDisplayName(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getPublicId(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; /** - * optional FriendInfo friend_info = 1; - * @return {?proto.asphrdaemon.FriendInfo} + * optional string unique_name = 1; + * @return {string} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.getFriendInfo = function() { - return /** @type{?proto.asphrdaemon.FriendInfo} */ ( - jspb.Message.getWrapperField(this, proto.asphrdaemon.FriendInfo, 1)); +proto.asphrdaemon.AddAsyncFriendRequest.prototype.getUniqueName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.asphrdaemon.FriendInfo|undefined} value - * @return {!proto.asphrdaemon.SendAsyncFriendRequestRequest} returns this -*/ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.setFriendInfo = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.asphrdaemon.AddAsyncFriendRequest} returns this + */ +proto.asphrdaemon.AddAsyncFriendRequest.prototype.setUniqueName = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.asphrdaemon.SendAsyncFriendRequestRequest} returns this + * optional string display_name = 2; + * @return {string} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.clearFriendInfo = function() { - return this.setFriendInfo(undefined); +proto.asphrdaemon.AddAsyncFriendRequest.prototype.getDisplayName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.asphrdaemon.AddAsyncFriendRequest} returns this */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.hasFriendInfo = function() { - return jspb.Message.getField(this, 1) != null; +proto.asphrdaemon.AddAsyncFriendRequest.prototype.setDisplayName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string message = 2; + * optional string public_id = 3; * @return {string} */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.asphrdaemon.AddAsyncFriendRequest.prototype.getPublicId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.asphrdaemon.SendAsyncFriendRequestRequest} returns this + * @return {!proto.asphrdaemon.AddAsyncFriendRequest} returns this */ -proto.asphrdaemon.SendAsyncFriendRequestRequest.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.asphrdaemon.AddAsyncFriendRequest.prototype.setPublicId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string message = 4; + * @return {string} + */ +proto.asphrdaemon.AddAsyncFriendRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.asphrdaemon.AddAsyncFriendRequest} returns this + */ +proto.asphrdaemon.AddAsyncFriendRequest.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -2392,8 +2453,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.asphrdaemon.SendAsyncFriendRequestResponse.prototype.toObject = function(opt_includeInstance) { - return proto.asphrdaemon.SendAsyncFriendRequestResponse.toObject(opt_includeInstance, this); +proto.asphrdaemon.AddAsyncFriendResponse.prototype.toObject = function(opt_includeInstance) { + return proto.asphrdaemon.AddAsyncFriendResponse.toObject(opt_includeInstance, this); }; @@ -2402,11 +2463,11 @@ proto.asphrdaemon.SendAsyncFriendRequestResponse.prototype.toObject = function(o * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.asphrdaemon.SendAsyncFriendRequestResponse} msg The msg instance to transform. + * @param {!proto.asphrdaemon.AddAsyncFriendResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.SendAsyncFriendRequestResponse.toObject = function(includeInstance, msg) { +proto.asphrdaemon.AddAsyncFriendResponse.toObject = function(includeInstance, msg) { var f, obj = { }; @@ -2422,23 +2483,23 @@ proto.asphrdaemon.SendAsyncFriendRequestResponse.toObject = function(includeInst /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.asphrdaemon.SendAsyncFriendRequestResponse} + * @return {!proto.asphrdaemon.AddAsyncFriendResponse} */ -proto.asphrdaemon.SendAsyncFriendRequestResponse.deserializeBinary = function(bytes) { +proto.asphrdaemon.AddAsyncFriendResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.asphrdaemon.SendAsyncFriendRequestResponse; - return proto.asphrdaemon.SendAsyncFriendRequestResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.asphrdaemon.AddAsyncFriendResponse; + return proto.asphrdaemon.AddAsyncFriendResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.asphrdaemon.SendAsyncFriendRequestResponse} msg The message object to deserialize into. + * @param {!proto.asphrdaemon.AddAsyncFriendResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.asphrdaemon.SendAsyncFriendRequestResponse} + * @return {!proto.asphrdaemon.AddAsyncFriendResponse} */ -proto.asphrdaemon.SendAsyncFriendRequestResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.asphrdaemon.AddAsyncFriendResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2458,9 +2519,9 @@ proto.asphrdaemon.SendAsyncFriendRequestResponse.deserializeBinaryFromReader = f * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.asphrdaemon.SendAsyncFriendRequestResponse.prototype.serializeBinary = function() { +proto.asphrdaemon.AddAsyncFriendResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.asphrdaemon.SendAsyncFriendRequestResponse.serializeBinaryToWriter(this, writer); + proto.asphrdaemon.AddAsyncFriendResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2468,11 +2529,11 @@ proto.asphrdaemon.SendAsyncFriendRequestResponse.prototype.serializeBinary = fun /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.asphrdaemon.SendAsyncFriendRequestResponse} message + * @param {!proto.asphrdaemon.AddAsyncFriendResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.SendAsyncFriendRequestResponse.serializeBinaryToWriter = function(message, writer) { +proto.asphrdaemon.AddAsyncFriendResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; @@ -2579,13 +2640,6 @@ proto.asphrdaemon.GetOutgoingFriendRequestsRequest.serializeBinaryToWriter = fun -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.repeatedFields_ = [1,2,3]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2601,8 +2655,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.toObject = function(opt_includeInstance) { - return proto.asphrdaemon.GetOutgoingFriendRequestsResponse.toObject(opt_includeInstance, this); +proto.asphrdaemon.FriendRequest.prototype.toObject = function(opt_includeInstance) { + return proto.asphrdaemon.FriendRequest.toObject(opt_includeInstance, this); }; @@ -2611,16 +2665,14 @@ proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.toObject = functio * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} msg The msg instance to transform. + * @param {!proto.asphrdaemon.FriendRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.toObject = function(includeInstance, msg) { +proto.asphrdaemon.FriendRequest.toObject = function(includeInstance, msg) { var f, obj = { - friendInfosList: jspb.Message.toObjectList(msg.getFriendInfosList(), - proto.asphrdaemon.FriendInfo.toObject, includeInstance), - messagesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - friendRequestTypesList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + friendInfo: (f = msg.getFriendInfo()) && proto.asphrdaemon.FriendInfo.toObject(includeInstance, f), + message: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2634,23 +2686,23 @@ proto.asphrdaemon.GetOutgoingFriendRequestsResponse.toObject = function(includeI /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} + * @return {!proto.asphrdaemon.FriendRequest} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinary = function(bytes) { +proto.asphrdaemon.FriendRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.asphrdaemon.GetOutgoingFriendRequestsResponse; - return proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.asphrdaemon.FriendRequest; + return proto.asphrdaemon.FriendRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} msg The message object to deserialize into. + * @param {!proto.asphrdaemon.FriendRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} + * @return {!proto.asphrdaemon.FriendRequest} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.asphrdaemon.FriendRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2660,17 +2712,11 @@ proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinaryFromReader case 1: var value = new proto.asphrdaemon.FriendInfo; reader.readMessage(value,proto.asphrdaemon.FriendInfo.deserializeBinaryFromReader); - msg.addFriendInfos(value); + msg.setFriendInfo(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.addMessages(value); - break; - case 3: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); - for (var i = 0; i < values.length; i++) { - msg.addFriendRequestTypes(values[i]); - } + msg.setMessage(value); break; default: reader.skipField(); @@ -2685,9 +2731,9 @@ proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinaryFromReader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.serializeBinary = function() { +proto.asphrdaemon.FriendRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.asphrdaemon.GetOutgoingFriendRequestsResponse.serializeBinaryToWriter(this, writer); + proto.asphrdaemon.FriendRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2695,145 +2741,233 @@ proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.serializeBinary = /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} message + * @param {!proto.asphrdaemon.FriendRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.serializeBinaryToWriter = function(message, writer) { +proto.asphrdaemon.FriendRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFriendInfosList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getFriendInfo(); + if (f != null) { + writer.writeMessage( 1, f, proto.asphrdaemon.FriendInfo.serializeBinaryToWriter ); } - f = message.getMessagesList(); + f = message.getMessage(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 2, f ); } - f = message.getFriendRequestTypesList(); - if (f.length > 0) { - writer.writePackedEnum( - 3, - f - ); - } }; /** - * @enum {number} + * optional FriendInfo friend_info = 1; + * @return {?proto.asphrdaemon.FriendInfo} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.FriendRequestType = { - ASYNC: 0, - SYNC: 1 +proto.asphrdaemon.FriendRequest.prototype.getFriendInfo = function() { + return /** @type{?proto.asphrdaemon.FriendInfo} */ ( + jspb.Message.getWrapperField(this, proto.asphrdaemon.FriendInfo, 1)); }; + /** - * repeated FriendInfo friend_infos = 1; - * @return {!Array} + * @param {?proto.asphrdaemon.FriendInfo|undefined} value + * @return {!proto.asphrdaemon.FriendRequest} returns this +*/ +proto.asphrdaemon.FriendRequest.prototype.setFriendInfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.asphrdaemon.FriendRequest} returns this */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.getFriendInfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.asphrdaemon.FriendInfo, 1)); +proto.asphrdaemon.FriendRequest.prototype.clearFriendInfo = function() { + return this.setFriendInfo(undefined); }; /** - * @param {!Array} value - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this -*/ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.setFriendInfosList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * Returns whether this field is set. + * @return {boolean} + */ +proto.asphrdaemon.FriendRequest.prototype.hasFriendInfo = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!proto.asphrdaemon.FriendInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.asphrdaemon.FriendInfo} + * optional string message = 2; + * @return {string} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.addFriendInfos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.asphrdaemon.FriendInfo, opt_index); +proto.asphrdaemon.FriendRequest.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this + * @param {string} value + * @return {!proto.asphrdaemon.FriendRequest} returns this */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.clearFriendInfosList = function() { - return this.setFriendInfosList([]); +proto.asphrdaemon.FriendRequest.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * repeated string messages = 2; - * @return {!Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.getMessagesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.asphrdaemon.GetOutgoingFriendRequestsResponse.toObject(opt_includeInstance, this); }; /** - * @param {!Array} value - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.setMessagesList = function(value) { - return jspb.Message.setField(this, 2, value || []); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + friendRequestsList: jspb.Message.toObjectList(msg.getFriendRequestsList(), + proto.asphrdaemon.FriendRequest.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.addMessages = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.asphrdaemon.GetOutgoingFriendRequestsResponse; + return proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinaryFromReader(msg, reader); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.clearMessagesList = function() { - return this.setMessagesList([]); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.asphrdaemon.FriendRequest; + reader.readMessage(value,proto.asphrdaemon.FriendRequest.deserializeBinaryFromReader); + msg.addFriendRequests(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.asphrdaemon.GetOutgoingFriendRequestsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * repeated FriendRequestType friend_request_types = 3; - * @return {!Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.getFriendRequestTypesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFriendRequestsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.asphrdaemon.FriendRequest.serializeBinaryToWriter + ); + } }; /** - * @param {!Array} value - * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this + * repeated FriendRequest friend_requests = 1; + * @return {!Array} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.setFriendRequestTypesList = function(value) { - return jspb.Message.setField(this, 3, value || []); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.getFriendRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.asphrdaemon.FriendRequest, 1)); }; /** - * @param {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse.FriendRequestType} value - * @param {number=} opt_index + * @param {!Array} value * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this +*/ +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.setFriendRequestsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.asphrdaemon.FriendRequest=} opt_value + * @param {number=} opt_index + * @return {!proto.asphrdaemon.FriendRequest} */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.addFriendRequestTypes = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.addFriendRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.asphrdaemon.FriendRequest, opt_index); }; @@ -2841,8 +2975,8 @@ proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.addFriendRequestTy * Clears the list making it empty but non-null. * @return {!proto.asphrdaemon.GetOutgoingFriendRequestsResponse} returns this */ -proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.clearFriendRequestTypesList = function() { - return this.setFriendRequestTypesList([]); +proto.asphrdaemon.GetOutgoingFriendRequestsResponse.prototype.clearFriendRequestsList = function() { + return this.setFriendRequestsList([]); }; @@ -2953,7 +3087,7 @@ proto.asphrdaemon.GetIncomingAsyncFriendRequestsRequest.serializeBinaryToWriter * @private {!Array} * @const */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.repeatedFields_ = [1,2]; +proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.repeatedFields_ = [1]; @@ -2986,9 +3120,8 @@ proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.toObject = fu */ proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.toObject = function(includeInstance, msg) { var f, obj = { - friendInfosList: jspb.Message.toObjectList(msg.getFriendInfosList(), - proto.asphrdaemon.FriendInfo.toObject, includeInstance), - messagesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f + friendRequestsList: jspb.Message.toObjectList(msg.getFriendRequestsList(), + proto.asphrdaemon.FriendRequest.toObject, includeInstance) }; if (includeInstance) { @@ -3026,13 +3159,9 @@ proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.deserializeBinaryFromRe var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.asphrdaemon.FriendInfo; - reader.readMessage(value,proto.asphrdaemon.FriendInfo.deserializeBinaryFromReader); - msg.addFriendInfos(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addMessages(value); + var value = new proto.asphrdaemon.FriendRequest; + reader.readMessage(value,proto.asphrdaemon.FriendRequest.deserializeBinaryFromReader); + msg.addFriendRequests(value); break; default: reader.skipField(); @@ -3063,87 +3192,43 @@ proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.serializeBina */ proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFriendInfosList(); + f = message.getFriendRequestsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, - proto.asphrdaemon.FriendInfo.serializeBinaryToWriter - ); - } - f = message.getMessagesList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f + proto.asphrdaemon.FriendRequest.serializeBinaryToWriter ); } }; /** - * repeated FriendInfo friend_infos = 1; - * @return {!Array} + * repeated FriendRequest friend_requests = 1; + * @return {!Array} */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.getFriendInfosList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.asphrdaemon.FriendInfo, 1)); +proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.getFriendRequestsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.asphrdaemon.FriendRequest, 1)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse} returns this */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.setFriendInfosList = function(value) { +proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.setFriendRequestsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * @param {!proto.asphrdaemon.FriendInfo=} opt_value - * @param {number=} opt_index - * @return {!proto.asphrdaemon.FriendInfo} - */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.addFriendInfos = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.asphrdaemon.FriendInfo, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse} returns this - */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.clearFriendInfosList = function() { - return this.setFriendInfosList([]); -}; - - -/** - * repeated string messages = 2; - * @return {!Array} - */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.getMessagesList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse} returns this - */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.setMessagesList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value + * @param {!proto.asphrdaemon.FriendRequest=} opt_value * @param {number=} opt_index - * @return {!proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse} returns this + * @return {!proto.asphrdaemon.FriendRequest} */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.addMessages = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.addFriendRequests = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.asphrdaemon.FriendRequest, opt_index); }; @@ -3151,8 +3236,8 @@ proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.addMessages = * Clears the list making it empty but non-null. * @return {!proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse} returns this */ -proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.clearMessagesList = function() { - return this.setMessagesList([]); +proto.asphrdaemon.GetIncomingAsyncFriendRequestsResponse.prototype.clearFriendRequestsList = function() { + return this.setFriendRequestsList([]); }; @@ -6710,4 +6795,14 @@ proto.asphrdaemon.KillResponse.serializeBinaryToWriter = function(message, write }; +/** + * @enum {number} + */ +proto.asphrdaemon.FriendRequestProgress = { + INCOMING: 0, + OUTGOINGASYNC: 1, + OUTGOINGSYNC: 2, + COMPLETE: 3 +}; + goog.object.extend(exports, proto.asphrdaemon);