enum CpuFamily { CPU_UNKNOWN = 0x0; CPU_X86 = 0x1; CPU_X86_64 = 0x2; CPU_PPC = 0x3; CPU_PPC_64 = 0x4; CPU_ARM = 0x5; CPU_IA64 = 0x6; CPU_SH = 0x7; CPU_MIPS = 0x8; CPU_BLACKFIN = 0x9; } enum Os { OS_UNKNOWN = 0x0; OS_WINDOWS = 0x1; OS_OSX = 0x2; OS_IPHONE = 0x3; OS_S60 = 0x4; OS_LINUX = 0x5; OS_WINDOWS_CE = 0x6; OS_ANDROID = 0x7; OS_PALM = 0x8; OS_FREEBSD = 0x9; OS_BLACKBERRY = 0xa; OS_SONOS = 0xb; OS_LOGITECH = 0xc; OS_WP7 = 0xd; OS_ONKYO = 0xe; OS_PHILIPS = 0xf; OS_WD = 0x10; OS_VOLVO = 0x11; OS_TIVO = 0x12; OS_AWOX = 0x13; OS_MEEGO = 0x14; OS_QNXNTO = 0x15; OS_BCO = 0x16; } enum AccountType { Spotify = 0x0; Facebook = 0x1; } enum AuthenticationType { AUTHENTICATION_USER_PASS = 0x0; AUTHENTICATION_STORED_SPOTIFY_CREDENTIALS = 0x1; AUTHENTICATION_STORED_FACEBOOK_CREDENTIALS = 0x2; AUTHENTICATION_SPOTIFY_TOKEN = 0x3; AUTHENTICATION_FACEBOOK_TOKEN = 0x4; } message SystemInfo { required CpuFamily cpu_family = 0xa; required Os os = 0x3c; required string system_information_string = 0x5a; required string device_id = 0x64; } message LoginCredentials { required string username = 0xa; required AuthenticationType typ = 0x14; required bytes auth_data = 0x1e; } message ClientResponseEncrypted { required LoginCredentials login_credentials = 0xa; required SystemInfo system_info = 0x32; optional string version_string = 0x46; } message APWelcome { required string canonical_username = 0xa; required AccountType account_type_logged_in = 0x14; required AccountType credentials_type_logged_in = 0x19; required AuthenticationType reusable_auth_credentials_type = 0x1e; required bytes reusable_auth_credentials = 0x28; optional bytes lfs_secret = 0x32; optional AccountInfo account_info = 0x3c; optional AccountInfoFacebook fb = 0x46; } message AccountInfo { optional AccountInfoSpotify spotify = 0x1; optional AccountInfoFacebook facebook = 0x2; } message AccountInfoSpotify { } message AccountInfoFacebook { optional string access_token = 0x1; optional string machine_id = 0x2; }