Requests to mobile platform server are exchanged using the HHive main class. When a class instance is created, initialization project parameters are specified.
To execute requests to server API, use the HHive(HyperHiveState) constructor:
public HHive(HyperHiveState hhState)
Arguments:
hhState. The object with settings for created class instance that is created using the HyperHiveState auxiliary class. To set connection parameters, use the properties:
Host. Mobile platform server host.
ApiVersion. API version for connection to mobile platform server.
Environment. Name of the environment, with which connection is established.
Project. Name of the project, with which connection is established.
DeviceId. Device identifier.
The HHive class contains the IsAuthorized property that returns status of connection with mobile platform server.
public bool IsAuthorized
Property value:
bool. Connection status flag.
For details about WinCE framework methods see the Calling WinCE Framework Methods, Describing WinCE Framework Methods sections.
Initialization of HyperHive in the Program class:
using System;
using HyperHive;
using HyperHive.Models;
namespace SmartDeviceProject
{
static class Program
{
// static property to get HyperHive
public static HHive HyperHive { get; private set;
}
/// <summary>
/// The main entry point for the application
/// </summary>
[MTAThread]
static void Main()
{
// Set parameters to work with HyperHive
var hhState = new HyperHiveState
{
Host = "test.sp.fsight.com",
Environment = "test",
Project = "project",
Application = "app"
};
// Create an object of the HHive class based on specified parameters
HyperHive = new HHive(hhState);
}
}
}
For details about WinCE framework methods see the Describing WinCE Framework Methods, Calling WinCE Framework Methods sections.
To view examples of WinCE framework use, see the Examples of WinCE Framework Use section.
See also:
WinCE Framework | Calling WinCE Framework Methods | Describing WinCE Framework Methods | Examples of WinCE Framework Use