syntax = "proto2";

import "steammessages_base.proto";
import "steammessages_unified_base.steamclient.proto";

option cc_generic_services = true;

message CSiteManagerClient_IncomingClient_Request {
  optional fixed64 site_instanceid = 1;
  optional fixed64 client_steamid = 2;
  optional fixed32 client_local_ip = 3;
  optional bytes connection_key = 4;
}

message CSiteManagerClient_IncomingClient_Response {
}

message CSiteLicense_ClientSeatCheckout_Notification {
  optional uint32 appid = 1;
  optional uint32 eresult = 2;
}

message CSiteManagerClient_TrackedPayments_Notification {
  message Payment {
    optional uint64 transid = 1;
    optional uint64 steamid = 2;
    optional int64 amount = 3;
    optional uint32 ecurrency = 4;
    optional int32 time_created = 5;
    optional int32 purchase_status = 6;
    optional string machine_name = 7;
    optional string persona_name = 8;
    optional string profile_url = 9;
    optional string avatar_url = 10;
  }
  optional fixed64 site_id = 1;
  repeated CSiteManagerClient_TrackedPayments_Notification.Payment payments = 2;
}

message CSiteLicense_InitiateAssociation_Request {
  optional fixed64 site_steamid = 1;
  optional fixed64 site_instanceid = 2;
  optional fixed32 client_local_ip = 3;
}

message CSiteLicense_InitiateAssociation_Response {
  optional bytes connection_key = 1;
}

message CSiteLicense_LCSAuthenticate_Request {
  optional fixed64 instanceid = 1;
}

message CSiteLicense_LCSAuthenticate_Response {
  optional uint64 site_id = 1;
  optional string site_name = 2;
  optional bool new_session = 3;
  optional bool no_site_licenses = 4;
}

message CSiteLicense_LCSAssociateUser_Request {
  optional fixed64 steamid = 1;
  optional fixed32 local_ip = 2;
  optional fixed64 instanceid = 3;
  optional string machine_name = 4;
}

message CSiteLicense_LCSAssociateUser_Response {
}

message CSiteLicense_ClientSeatCheckout_Request {
  optional fixed64 steamid = 1;
  optional fixed64 instanceid = 2;
  optional uint32 appid = 3;
}

message CSiteLicense_ClientSeatCheckout_Response {
}

message CSiteLicense_ClientGetAvailableSeats_Request {
  optional fixed64 steamid = 1;
  optional fixed64 instanceid = 2;
  optional uint32 appid = 3;
}

message CSiteLicense_ClientGetAvailableSeats_Response {
  optional uint32 available_seats = 1;
}

service SiteManagerClient {
  rpc IncomingClient (.CSiteManagerClient_IncomingClient_Request) returns (.CSiteManagerClient_IncomingClient_Response);
  rpc ClientSeatCheckoutNotification (.CSiteLicense_ClientSeatCheckout_Notification) returns (.NoResponse);
  rpc TrackedPaymentsNotification (.CSiteManagerClient_TrackedPayments_Notification) returns (.NoResponse);
}

service SiteLicense {
  rpc InitiateAssociation (.CSiteLicense_InitiateAssociation_Request) returns (.CSiteLicense_InitiateAssociation_Response) {
  }
  rpc LCSAuthenticate (.CSiteLicense_LCSAuthenticate_Request) returns (.CSiteLicense_LCSAuthenticate_Response) {
  }
  rpc LCSAssociateUser (.CSiteLicense_LCSAssociateUser_Request) returns (.CSiteLicense_LCSAssociateUser_Response) {
  }
  rpc ClientSeatCheckout (.CSiteLicense_ClientSeatCheckout_Request) returns (.CSiteLicense_ClientSeatCheckout_Response) {
  }
  rpc ClientGetAvailableSeats (.CSiteLicense_ClientGetAvailableSeats_Request) returns (.CSiteLicense_ClientGetAvailableSeats_Response) {
  }
}

