Symbian platform (C++)
SDK native APIs, runtime and tooling
Loading...
Searching...
No Matches
symbian::agent Namespace Reference

Classes

struct  AgentLogPage
 One bounded read result, including a lost-record signal. More...
 
struct  AgentLogRecord
 One retained event in the agent's own process. More...
 
class  AgentLogRing
 Fixed 32-record service log with a monotonic sequence cursor. More...
 
struct  ControlMessage
 Typed control envelope carried as MessagePack inside a wire frame. More...
 
struct  Frame
 One length-prefixed MessagePack payload, without a parsed schema. More...
 
class  FrameDecoder
 Incrementally reads one network-order, 32-bit length-prefixed frame. More...
 
struct  GuestControlRequest
 One authenticated, read-only control request for the phone profile. More...
 
struct  GuestDisplaySnapshot
 Primary HAL display dimensions, if the platform reports them. More...
 
struct  GuestFileEntry
 One name in the agent-owned workspace, encoded as UTF-8. More...
 
struct  GuestFilePage
 A bounded listing of the agent-owned workspace root. More...
 
struct  GuestStatusSnapshot
 Optional, point-in-time native observations in a status response. More...
 
struct  GuestTickSnapshot
 Native tick reading exposed only after peer authentication. More...
 
class  InboundQueue
 Completed inbound frames awaiting schema dispatch. More...
 

Enumerations

enum class  ControlKind : std::uint8_t {
  kHello = 1 , kStatus = 2 , kCancel = 3 , kResult = 4 ,
  kError = 5 , kLogs = 6 , kWorkspaceList = 7
}
 Version-one control operations; none grants write or device access. More...
 
enum class  AgentLogCode : std::uint8_t { kAuthenticated = 1 , kStatusRead = 2 , kRejectedFrame = 3 , kSessionClosed = 4 }
 Small, stable agent event codes; unknown future values are allowed. More...
 
enum class  AgentLogSeverity : std::uint8_t { kDebug = 1 , kInfo = 2 , kWarning = 3 }
 Severity of one service-local event; future values may be added. More...
 

Functions

absl::StatusOr< ControlMessage > ParseControl (std::string_view encoded)
 Parse one bounded MessagePack control payload.
 
absl::StatusOr< std::string > PackControl (const ControlMessage &message)
 Validate and serialize a control envelope as MessagePack.
 
absl::StatusOr< std::size_t > DecodeFrameLength (std::span< const std::uint8_t > prefix, std::size_t maximum_frame_bytes=kMaximumFrameBytes)
 Validate a complete four-byte network-order prefix before allocation.
 
absl::StatusOr< std::string > EncodeFrame (std::span< const std::uint8_t > payload, std::size_t maximum_frame_bytes=kMaximumFrameBytes)
 Encode one already validated MessagePack payload for an authenticated transport.
 
absl::StatusOr< GuestControlRequest > ParseGuestControl (std::string_view payload)
 Parse a bounded MessagePack control map after TLS authentication.
 
absl::StatusOr< std::string > PackGuestLogResult (const GuestControlRequest &request, const AgentLogPage &page)
 Pack one bounded log page into a version-one result envelope.
 
absl::StatusOr< std::string > PackGuestWorkspaceResult (const GuestControlRequest &request, const GuestFilePage &page)
 Pack a bounded agent-private workspace directory page.
 
absl::StatusOr< std::string > PackGuestResult (const GuestControlRequest &request)
 Pack a status result compatible with the host ControlMessage.
 
absl::StatusOr< std::string > PackGuestHelloResult (const GuestControlRequest &request, bool logs_available, std::uint8_t maximum_requests, bool workspace_available=false)
 Advertise the bounded version-one read-only service profile.
 
absl::StatusOr< std::string > PackGuestResult (const GuestControlRequest &request, const GuestStatusSnapshot &snapshot)
 Pack status with only the native observations actually available.
 
absl::StatusOr< GuestFilePage > ReadWorkspacePage (std::uint16_t after, std::uint8_t limit)
 Read one page from the agent's private workspace root.
 

Variables

constexpr std::size_t kMaximumControlBytes = 4096
 Control messages have a smaller budget than data frames.
 
constexpr std::size_t kMaximumFrameBytes = 64 * 1024
 Maximum encoded MessagePack payload accepted by the phone profile.
 
constexpr std::size_t kMaximumQueuedBytes = 256 * 1024
 Maximum encoded bytes queued across inbound phone messages.
 
constexpr std::size_t kMaximumQueuedFrames = 4
 Maximum number of completed inbound phone messages.
 

Enumeration Type Documentation

◆ AgentLogCode

enum class symbian::agent::AgentLogCode : std::uint8_t
strong

Small, stable agent event codes; unknown future values are allowed.

Enumerator
kAuthenticated 
kStatusRead 
kRejectedFrame 
kSessionClosed 

◆ AgentLogSeverity

enum class symbian::agent::AgentLogSeverity : std::uint8_t
strong

Severity of one service-local event; future values may be added.

Enumerator
kDebug 
kInfo 
kWarning 

◆ ControlKind

enum class symbian::agent::ControlKind : std::uint8_t
strong

Version-one control operations; none grants write or device access.

Enumerator
kHello 
kStatus 
kCancel 
kResult 
kError 
kLogs 
kWorkspaceList 

Function Documentation

◆ DecodeFrameLength()

absl::StatusOr< std::size_t > symbian::agent::DecodeFrameLength ( std::span< const std::uint8_t >  prefix,
std::size_t  maximum_frame_bytes 
)

Validate a complete four-byte network-order prefix before allocation.

◆ EncodeFrame()

absl::StatusOr< std::string > symbian::agent::EncodeFrame ( std::span< const std::uint8_t >  payload,
std::size_t  maximum_frame_bytes = kMaximumFrameBytes 
)

Encode one already validated MessagePack payload for an authenticated transport.

A zero-size or oversized payload returns InvalidArgument.

◆ PackControl()

absl::StatusOr< std::string > symbian::agent::PackControl ( const ControlMessage &  message)

Validate and serialize a control envelope as MessagePack.

◆ PackGuestHelloResult()

absl::StatusOr< std::string > symbian::agent::PackGuestHelloResult ( const GuestControlRequest &  request,
bool  logs_available,
std::uint8_t  maximum_requests,
bool  workspace_available 
)

Advertise the bounded version-one read-only service profile.

◆ PackGuestLogResult()

absl::StatusOr< std::string > symbian::agent::PackGuestLogResult ( const GuestControlRequest &  request,
const AgentLogPage &  page 
)

Pack one bounded log page into a version-one result envelope.

◆ PackGuestResult() [1/2]

absl::StatusOr< std::string > symbian::agent::PackGuestResult ( const GuestControlRequest &  request)

Pack a status result compatible with the host ControlMessage.

The body advertises only the status capability. This routine does not grant permission; the caller must have authenticated the TLS peer first.

◆ PackGuestResult() [2/2]

absl::StatusOr< std::string > symbian::agent::PackGuestResult ( const GuestControlRequest &  request,
const GuestStatusSnapshot &  snapshot 
)

Pack status with only the native observations actually available.

◆ PackGuestWorkspaceResult()

absl::StatusOr< std::string > symbian::agent::PackGuestWorkspaceResult ( const GuestControlRequest &  request,
const GuestFilePage &  page 
)

Pack a bounded agent-private workspace directory page.

◆ ParseControl()

absl::StatusOr< ControlMessage > symbian::agent::ParseControl ( std::string_view  encoded)

Parse one bounded MessagePack control payload.

Returns
InvalidArgument for malformed fields or unknown operations, and ResourceExhausted when the encoded control budget is exceeded.

◆ ParseGuestControl()

absl::StatusOr< GuestControlRequest > symbian::agent::ParseGuestControl ( std::string_view  payload)

Parse a bounded MessagePack control map after TLS authentication.

Accepts version 1 hello/status with an empty body map, or logs with a bounded after/limit body, and up to eight top-level fields. Unknown fields are retained byte-for-byte so a result can echo them without silently discarding a future field. Invalid, nested beyond four levels, duplicate and oversized inputs fail closed.

◆ ReadWorkspacePage()

absl::StatusOr< GuestFilePage > symbian::agent::ReadWorkspacePage ( std::uint16_t  after,
std::uint8_t  limit 
)

Read one page from the agent's private workspace root.

The root is fixed to this agent's Symbian data cage. An absent root is an empty listing. Offset pagination is bounded to 256 entries and is not a snapshot: concurrent directory changes can shift later pages. Call from a worker thread because File Server iteration may block.

Variable Documentation

◆ kMaximumControlBytes

constexpr std::size_t symbian::agent::kMaximumControlBytes = 4096
inlineconstexpr

Control messages have a smaller budget than data frames.

◆ kMaximumFrameBytes

constexpr std::size_t symbian::agent::kMaximumFrameBytes = 64 * 1024
inlineconstexpr

Maximum encoded MessagePack payload accepted by the phone profile.

◆ kMaximumQueuedBytes

constexpr std::size_t symbian::agent::kMaximumQueuedBytes = 256 * 1024
inlineconstexpr

Maximum encoded bytes queued across inbound phone messages.

◆ kMaximumQueuedFrames

constexpr std::size_t symbian::agent::kMaximumQueuedFrames = 4
inlineconstexpr

Maximum number of completed inbound phone messages.