Skip to content

Commit

Permalink
- Fixed indentation to 3 spaces.
Browse files Browse the repository at this point in the history
- Reverted typo fix to only have the correct spelling of "state".

--HG--
branch : nn-ac-extras
  • Loading branch information
Daniel K. O. (dkosmari) committed Oct 1, 2024
1 parent 3f56a42 commit fd480fb
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 44 deletions.
80 changes: 40 additions & 40 deletions include/nn/ac/ac_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,43 +36,43 @@ using Config = NetConfCfg;
using ErrorCode = uint32_t;

enum Status {
STATUS_FAILED = -1,
STATUS_OK = 0,
STATUS_PROCESSING = 1,
STATUS_FAILED = -1,
STATUS_OK = 0,
STATUS_PROCESSING = 1,
};


nn::Result
BeginLocalConnection(bool unknown)
asm("BeginLocalConnection__Q2_2nn2acFb");
asm("BeginLocalConnection__Q2_2nn2acFb");

void
ClearConfig(Config *cfg)
asm("ClearConfig__Q2_2nn2acFP16netconf_profile_");
asm("ClearConfig__Q2_2nn2acFP16netconf_profile_");

nn::Result
Close()
asm("Close__Q2_2nn2acFv");
asm("Close__Q2_2nn2acFv");

nn::Result
CloseAll()
asm("CloseAll__Q2_2nn2acFv");
asm("CloseAll__Q2_2nn2acFv");

nn::Result
Connect(const Config *cfg)
asm("Connect__Q2_2nn2acFPC16netconf_profile_");
asm("Connect__Q2_2nn2acFPC16netconf_profile_");

nn::Result
Connect(ConfigIdNum id)
asm("Connect__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
asm("Connect__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");

nn::Result
Connect()
asm("Connect__Q2_2nn2acFv");
asm("Connect__Q2_2nn2acFv");

nn::Result
ConnectAsync(const Config *cfg)
asm("ConnectAsync__Q2_2nn2acFPC16netconf_profile_");
asm("ConnectAsync__Q2_2nn2acFPC16netconf_profile_");

/**
* Connects to a network, using the configuration represented by the given
Expand All @@ -87,23 +87,23 @@ ConnectAsync(const Config *cfg)
*/
nn::Result
ConnectAsync(ConfigIdNum id)
asm("ConnectAsync__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
asm("ConnectAsync__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");

nn::Result
ConnectAsync()
asm("ConnectAsync__Q2_2nn2acFv");
asm("ConnectAsync__Q2_2nn2acFv");

nn::Result
ConnectWithRetry()
asm("ConnectWithRetry__Q2_2nn2acFv");
asm("ConnectWithRetry__Q2_2nn2acFv");

nn::Result
DeleteConfig(ConfigIdNum id)
asm("DeleteConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
asm("DeleteConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");

nn::Result
EndLocalConnection()
asm("EndLocalConnection__Q2_2nn2acFv");
asm("EndLocalConnection__Q2_2nn2acFv");

/**
* Cleans up the Auto Connect library. Do not call any nn::ac functions (other
Expand All @@ -114,7 +114,7 @@ EndLocalConnection()
*/
void
Finalize()
asm("Finalize__Q2_2nn2acFv");
asm("Finalize__Q2_2nn2acFv");

/**
* Gets the IP address assosciated with the currently active connection.
Expand All @@ -130,47 +130,47 @@ Finalize()
*/
nn::Result
GetAssignedAddress(uint32_t *ip)
asm("GetAssignedAddress__Q2_2nn2acFPUl");
asm("GetAssignedAddress__Q2_2nn2acFPUl");

nn::Result
GetAssignedAlternativeDns(uint32_t *ip)
asm("GetAssignedAlternativeDns__Q2_2nn2acFPUl");
asm("GetAssignedAlternativeDns__Q2_2nn2acFPUl");

nn::Result
GetAssignedGateway(uint32_t *ip)
asm("GetAssignedGateway__Q2_2nn2acFPUl");
asm("GetAssignedGateway__Q2_2nn2acFPUl");

nn::Result
GetAssignedPreferedDns(uint32_t *ip)
asm("GetAssignedPreferedDns__Q2_2nn2acFPUl");
asm("GetAssignedPreferedDns__Q2_2nn2acFPUl");

nn::Result
GetAssignedSubnet(uint32_t *ip)
asm("GetAssignedSubnet__Q2_2nn2acFPUl");
asm("GetAssignedSubnet__Q2_2nn2acFPUl");

nn::Result
GetCloseStatus(Status *status)
asm("GetCloseStatus__Q2_2nn2acFPQ3_2nn2ac6Status");
asm("GetCloseStatus__Q2_2nn2acFPQ3_2nn2ac6Status");

nn::Result
GetCompatId(ConfigIdNum *id)
asm("GetCompatId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum");
asm("GetCompatId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum");

nn::Result
GetConnectResult(nn::Result *result)
asm("GetConnectResult__Q2_2nn2acFPQ2_2nn6Result");
asm("GetConnectResult__Q2_2nn2acFPQ2_2nn6Result");

nn::Result
GetConnectStatus(Status *status)
asm("GetConnectStatus__Q2_2nn2acFPQ3_2nn2ac6Status");
asm("GetConnectStatus__Q2_2nn2acFPQ3_2nn2ac6Status");

nn::Result
GetLastErrorCode(ErrorCode *error)
asm("GetLastErrorCode__Q2_2nn2acFPUi");
asm("GetLastErrorCode__Q2_2nn2acFPUi");

nn::Result
GetRunningConfig(Config *cfg)
asm("GetRunningConfig__Q2_2nn2acFP16netconf_profile_");
asm("GetRunningConfig__Q2_2nn2acFP16netconf_profile_");

/**
* Gets the default connection configuration id. This is the default as marked
Expand All @@ -186,7 +186,7 @@ GetRunningConfig(Config *cfg)
*/
nn::Result
GetStartupId(ConfigIdNum *id)
asm("GetStartupId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum");
asm("GetStartupId__Q2_2nn2acFPQ3_2nn2ac11ConfigIdNum");

/**
* Initializes the Auto Connect library. Call this function before any other nn::ac
Expand All @@ -201,47 +201,47 @@ GetStartupId(ConfigIdNum *id)
*/
nn::Result
Initialize()
asm("Initialize__Q2_2nn2acFv");
asm("Initialize__Q2_2nn2acFv");

nn::Result
IsAnyKeepingConnect(bool keeping)
asm("IsAnyKeepingConnect__Q2_2nn2acFPb");
asm("IsAnyKeepingConnect__Q2_2nn2acFPb");

nn::Result
IsApplicationConnected(bool *connected)
asm("IsApplicationConnected__Q2_2nn2acFPb");
asm("IsApplicationConnected__Q2_2nn2acFPb");

nn::Result
IsAutoConnectionFatallyFailed(nn::Result *failed)
asm("IsAutoConnectionFatallyFailed__Q2_2nn2acFQ2_2nn6Result");
asm("IsAutoConnectionFatallyFailed__Q2_2nn2acFQ2_2nn6Result");

nn::Result
IsConfigExisting(ConfigIdNum id, bool *existing)
asm("IsConfigExisting__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumPb");
asm("IsConfigExisting__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumPb");

nn::Result
IsKeepingConnect(bool *keeping)
asm("IsKeepingConnect__Q2_2nn2acFPb");
asm("IsKeepingConnect__Q2_2nn2acFPb");

nn::Result
IsReadyToConnect(bool *ready)
asm("IsReadyToConnect__Q2_2nn2acFPb");
asm("IsReadyToConnect__Q2_2nn2acFPb");

nn::Result
ReadConfig(ConfigIdNum id, Config *cfg)
asm("ReadConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumP16netconf_profile_");
asm("ReadConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumP16netconf_profile_");

nn::Result
SetCompatId(ConfigIdNum id)
asm("SetCompatId__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
asm("SetCompatId__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");

nn::Result
SetStartupId(ConfigIdNum id)
asm("SetStartupId__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");
asm("SetStartupId__Q2_2nn2acFQ3_2nn2ac11ConfigIdNum");

nn::Result
WriteConfig(ConfigIdNum id, const Config *cfg)
asm("WriteConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumPC16netconf_profile_");
asm("WriteConfig__Q2_2nn2acFQ3_2nn2ac11ConfigIdNumPC16netconf_profile_");

} // namespace ac
} // namespace nn
Expand Down
5 changes: 1 addition & 4 deletions include/nsysnet/netconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,7 @@ WUT_CHECK_SIZE(NetConfOpt, 0x2c1);

struct WUT_PACKED NetConfInterface {
uint16_t if_index;
union {
uint16_t if_state;
uint16_t if_sate;
};
uint16_t if_state;
uint32_t if_mtu;
NetConfIPv4Info ipv4Info;
};
Expand Down

0 comments on commit fd480fb

Please sign in to comment.