# GCKCommon.h File

[Macros](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#define-members) \| [Enumerations](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#enum-members) \| [Functions](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#func-members) \| [Variables](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#var-members) GCKCommon.h File Reference GCKCastState, GCKConnectionState, GCKConnectionSuspendReason, GCKActiveInputStatus, and GCKStandbyStatus enums.
[More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#details)

|---|---|
| ## Macros ||
| #define | [GCK_ASSERT_MAIN_THREAD](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a85688c4065842d692c674a62dcd5ccff)() [GCKAssertMainThread](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a8d6958f8854f1e6b4cd63102902f2167)(__PRETTY_FUNCTION__) |
|   | Asserts if the calling thread is not the main thread. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a85688c4065842d692c674a62dcd5ccff) |
|   ||

|---|---|
| ## Enumerations ||
| enum | [GCKConnectionState](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426c) { [GCKConnectionStateDisconnected](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426cad8411f8d8424b6db71969c960e5bd803) = 0, [GCKConnectionStateConnecting](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426ca3f1901d840069ac00f304c452d04e7a9) = 1, [GCKConnectionStateConnected](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426caba2e53f0e5cb065225b5b4a574b86ec2) = 2, [GCKConnectionStateDisconnecting](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426caadf35e7545c25a5553454f0acc83f93a) = 3 } |
|   | Enum defining Cast connection states. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426c) |
|   ||
| enum | [GCKConnectionSuspendReason](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37) { [GCKConnectionSuspendReasonAppBackgrounded](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37a3beae0a74cb6e012ea141e4de0b6f236) = 1, [GCKConnectionSuspendReasonNetworkError](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37af6a10736daef7dec6b223762c5e9ba32) = 2, [GCKConnectionSuspendReasonNetworkNotReachable](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37a31ee22db9cb40a6b6e8720569601997c) = 3 } |
|   | Enum defining the reasons for a connection becoming suspended. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37) |
|   ||
| enum | [GCKActiveInputStatus](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322fa) { [GCKActiveInputStatusUnknown](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322faa7456fff25cb8d561ae67234a7382a2e0) = -1, [GCKActiveInputStatusInactive](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322faafb273a1b8a789785f214d01fa51b93b0) = 0, [GCKActiveInputStatusActive](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322faa9707c594eeffeddbd36e94db99abef43) = 1 } |
|   | An enum describing the active input status states. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322fa) |
|   ||
| enum | [GCKStandbyStatus](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932) { [GCKStandbyStatusUnknown](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932ab726374d3d9a8b82e6c6f022242a818b) = -1, [GCKStandbyStatusInactive](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932a460c96b49b6e9caca1a391a6d3b0ca4d) = 0, [GCKStandbyStatusActive](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932abc92c08c7cf5b24e6ee92adf0ad6ba01) = 1 } |
|   | An enum describing the standby status states. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932) |
|   ||
| enum | [GCKCastState](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5) { [GCKCastStateNoDevicesAvailable](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5a64f6feafd7b4804e50e46c1c2d76f56c) = 0, [GCKCastStateNotConnected](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5a8678550704a821d4922ccaec1f44d251) = 1, [GCKCastStateConnecting](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5a19d013c4d35871d93fd8102e7bb22a46) = 2, [GCKCastStateConnected](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5ac5fe142c30a78d5b4d10bc78ffcfea57) = 3 } |
|   | An enum describing the possible casting states for the sender application. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5) |
|   ||

|---|---|
| ## Functions ||
| void | [GCKAssertMainThread](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a8d6958f8854f1e6b4cd63102902f2167) (const char \*function) |
|   | Asserts if the calling thread is not the main thread. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a8d6958f8854f1e6b4cd63102902f2167) |
|   ||

|---|---|
| ## Variables ||
| NSString \*const | [kGCKFrameworkVersion](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a7b9ba3834f883cf1a100a8da0fdc42b3) |
|   | A string constant containing the version number of the GoogleCast framework. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a7b9ba3834f883cf1a100a8da0fdc42b3) |
|   ||
| const NSInteger | [kGCKInvalidRequestID](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aad76567f243bc1b4fb113abd97bf3327) |
|   | An invalid request ID; if a method returns this request ID, it means that the request could not be made. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aad76567f243bc1b4fb113abd97bf3327) |
|   ||
| NSString \*const | [kGCKThreadException](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a2b77feb60f085716a32a446407799c5c) |
|   | An exception type indicating that an API was called from an invalid thread. [More...](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a2b77feb60f085716a32a446407799c5c) |
|   ||

## Detailed Description

GCKCastState, GCKConnectionState, GCKConnectionSuspendReason, GCKActiveInputStatus, and GCKStandbyStatus enums.

## Macro Definition Documentation

|---|---|---|---|---|
| #define GCK_ASSERT_MAIN_THREAD | ( |   | ) | [GCKAssertMainThread](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a8d6958f8854f1e6b4cd63102902f2167)(__PRETTY_FUNCTION__) |

Asserts if the calling thread is not the main thread.

## Enumeration Type Documentation

|---|
| enum [GCKConnectionState](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#aeb91bcb8e8dc2ae918494213cb33426c) |

Enum defining Cast connection states.

| Enumerator ||
|---|---|
| GCKConnectionStateDisconnected | Disconnected from the device or application. |
| GCKConnectionStateConnecting | Connecting to the device or application. |
| GCKConnectionStateConnected | Connected to the device or application. |
| GCKConnectionStateDisconnecting | Disconnecting from the device. |

|---|
| enum [GCKConnectionSuspendReason](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a9ac76146a1ad598bb34070e314876a37) |

Enum defining the reasons for a connection becoming suspended.

| Enumerator ||
|---|---|
| GCKConnectionSuspendReasonAppBackgrounded | The connection was suspended because the application is going into the background. |
| GCKConnectionSuspendReasonNetworkError | The connection was suspended because of a network I/O or protocol error. |
| GCKConnectionSuspendReasonNetworkNotReachable | The connection was suspended because the network is not reachable. |

|---|
| enum [GCKActiveInputStatus](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a4e1d6d2f711f543c3bb3ea38807322fa) |

An enum describing the active input status states.

This status indicates whether a receiver device is currently the active input on its connected TV or AVR.

| Enumerator ||
|---|---|
| GCKActiveInputStatusUnknown | The active input status is unknown. |
| GCKActiveInputStatusInactive | The input is inactive. |
| GCKActiveInputStatusActive | The input is active. |

|---|
| enum [GCKStandbyStatus](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#a0b2d49eee120006431d7701487917932) |

An enum describing the standby status states.

This status indicates whether a receiver device's connected TV or AVR is currently in "standby" mode.

| Enumerator ||
|---|---|
| GCKStandbyStatusUnknown | The standby status is unknown. |
| GCKStandbyStatusInactive | The device is not in standby mode. |
| GCKStandbyStatusActive | The device is in standby mode. |

|---|
| enum [GCKCastState](https://developers.google.com/cast/v3/reference/ios/g_c_k_common_8h#af0c098ac6b7bff89f13f0bad7b88a5b5) |

An enum describing the possible casting states for the sender application.

| Enumerator ||
|---|---|
| GCKCastStateNoDevicesAvailable | No Cast session is established, and no Cast devices are available. |
| GCKCastStateNotConnected | No Cast session is establishd, and Cast devices are available. |
| GCKCastStateConnecting | A Cast session is being established. |
| GCKCastStateConnected | A Cast session is established. |

## Function Documentation

|---|---|---|---|---|---|
| void GCKAssertMainThread | ( | const char \* | *function* | ) |   |

Asserts if the calling thread is not the main thread.

## Variable Documentation

|---|
| kGCKFrameworkVersion |

A string constant containing the version number of the GoogleCast framework.

|---|
| kGCKInvalidRequestID |

An invalid request ID; if a method returns this request ID, it means that the request could not be made.

|---|
| kGCKThreadException |

An exception type indicating that an API was called from an invalid thread.