Skip to content

Commit c3bd23e

Browse files
Cleaned up content.
Cleaned up content. Cleaned up spelling.
1 parent d131eaa commit c3bd23e

141 files changed

Lines changed: 575 additions & 582 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DC/Csharp/app1/Default.aspx.cs

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
//Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
2-
//TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
3-
//Copyright 2011 AT&T Intellectual Property. All rights reserved. http://developer.att.com
4-
//For more information contact [email protected]
1+
// Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
2+
// TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
3+
// Copyright 2011 AT&T Intellectual Property. All rights reserved. http://developer.att.com
4+
// For more information contact [email protected]
55

66
using System;
77
using System.Collections.Generic;
@@ -59,7 +59,7 @@ public void resetTokenSessionVariables()
5959
Session["dc_session_lastTokenTakenTime"] = null;
6060
Session["dc_session_refreshTokenExpiryTime"] = null;
6161
}
62-
/* This function resets access token related variable to null */
62+
/* This function resets access token related variable to null */
6363
public void resetTokenVariables()
6464
{
6565
access_token = null;
@@ -69,9 +69,9 @@ public void resetTokenVariables()
6969
refreshTokenExpiryTime = null;
7070
}
7171

72-
/* This function validates access token related variables and returns VALID_ACCESS_TOKEN if its valid
72+
/* This function validates access token related variables and returns VALID_ACCESS_TOKEN if it is valid
7373
* otherwise, returns INVALID_ACCESS_TOKEN if refresh token expired or not able to read session variables
74-
* return REFRESH_TOKEN, if access token in expired and refresh token is valid
74+
* return REFRESH_TOKEN, if access token is expired and refresh token is valid
7575
*/
7676
public string isTokenValid()
7777
{
@@ -128,7 +128,7 @@ public void getAuthCode()
128128

129129
/* This function get the access token based on the type parameter type values.
130130
* If type value is 0, access token is fetch for authorization code flow
131-
* If type value is 2, access token is fetch for authorization code floww based on the exisiting refresh token
131+
* If type value is 2, access token is fetch for authorization code flow based on the exisiting refresh token
132132
*/
133133
public bool getAccessToken(int type)
134134
{
@@ -141,7 +141,7 @@ public bool getAccessToken(int type)
141141
accessTokenRequest.Method = "POST";
142142
string oauthParameters = "client_id=" + api_key.ToString() + "&client_secret=" + secret_key.ToString() + "&code=" + auth_code.ToString() + "&grant_type=authorization_code";
143143
accessTokenRequest.ContentType = "application/x-www-form-urlencoded";
144-
//sendSmsRequestObject.Accept = "application/json";
144+
// sendSmsRequestObject.Accept = "application/json";
145145
UTF8Encoding encoding = new UTF8Encoding();
146146
byte[] postBytes = encoding.GetBytes(oauthParameters);
147147
accessTokenRequest.ContentLength = postBytes.Length;
@@ -194,7 +194,7 @@ public bool getAccessToken(int type)
194194
accessTokenRequest.Method = "POST";
195195
string oauthParameters = "grant_type=refresh_token&client_id=" + api_key.ToString() + "&client_secret=" + secret_key.ToString() + "&refresh_token=" + refresh_token.ToString();
196196
accessTokenRequest.ContentType = "application/x-www-form-urlencoded";
197-
//sendSmsRequestObject.Accept = "application/json";
197+
// sendSmsRequestObject.Accept = "application/json";
198198

199199
UTF8Encoding encoding = new UTF8Encoding();
200200
byte[] postBytes = encoding.GetBytes(oauthParameters);
@@ -241,7 +241,7 @@ public bool getAccessToken(int type)
241241
return false;
242242
}
243243

244-
/* This funciton draws table for error response */
244+
/* This function draws table for error response */
245245
private void drawPanelForFailure(Panel panelParam, string message)
246246
{
247247
Table table = new Table();
@@ -254,11 +254,11 @@ private void drawPanelForFailure(Panel panelParam, string message)
254254
rowOneCellOne.Font.Bold = true;
255255
rowOneCellOne.Text = "ERROR:";
256256
rowOne.Controls.Add(rowOneCellOne);
257-
//rowOneCellOne.BorderWidth = 1;
257+
// rowOneCellOne.BorderWidth = 1;
258258
table.Controls.Add(rowOne);
259259
TableRow rowTwo = new TableRow();
260260
TableCell rowTwoCellOne = new TableCell();
261-
//rowTwoCellOne.BorderWidth = 1;
261+
// rowTwoCellOne.BorderWidth = 1;
262262
rowTwoCellOne.Text = message.ToString();
263263
rowTwo.Controls.Add(rowTwoCellOne);
264264
table.Controls.Add(rowTwo);
@@ -268,8 +268,8 @@ private void drawPanelForFailure(Panel panelParam, string message)
268268
panelParam.Controls.Add(table);
269269
}
270270
/*
271-
* This function is called when the applicaiton page is loaded into the browser.
272-
* This fucntion reads the web.config and gets the values of the attributes
271+
* This function is called when the application page is loaded into the web browser.
272+
* This function reads the web.config file and gets the values of the attributes.
273273
*
274274
*/
275275
protected void Page_Load(object sender, EventArgs e)
@@ -346,7 +346,7 @@ protected void Page_Load(object sender, EventArgs e)
346346
}
347347

348348
}
349-
/*This funciton checks the validity of string as msisdn */
349+
/*This function checks the validity of string as msisdn */
350350

351351
private Boolean isValidMISDN(string number)
352352
{
@@ -421,23 +421,23 @@ private void drawPanelForGetStatusResult(string attribute, string value, bool he
421421
getStatusTable.Font.Size = 9;
422422
getStatusTable.Font.Name = "Sans-serif";
423423
getStatusTable.Font.Italic = true;
424-
//getStatusTable.HorizontalAlign = HorizontalAlign.Center;
424+
// getStatusTable.HorizontalAlign = HorizontalAlign.Center;
425425
TableRow rowOne = new TableRow();
426426
TableCell rowOneCellOne = new TableCell();
427427
rowOneCellOne.Font.Bold = true;
428-
//rowOneCellOne.BorderWidth = 1;
428+
// rowOneCellOne.BorderWidth = 1;
429429
rowOneCellOne.Text = "Parameter";
430430
rowOneCellOne.HorizontalAlign = HorizontalAlign.Center;
431431
rowOne.Controls.Add(rowOneCellOne);
432432
TableCell rowOneCellTwo = new TableCell();
433433
rowOneCellTwo.Font.Bold = true;
434-
//rowOneCellTwo.BorderWidth = 1;
434+
// rowOneCellTwo.BorderWidth = 1;
435435
rowOneCellTwo.Text = "Value";
436436
rowOneCellTwo.HorizontalAlign = HorizontalAlign.Center;
437437
rowOne.Controls.Add(rowOneCellTwo);
438-
//getStatusTable.BorderWidth = 2;
439-
//getStatusTable.BorderColor = Color.DarkGreen;
440-
//getStatusTable.BackColor = System.Drawing.ColorTranslator.FromHtml("#cfc");
438+
// getStatusTable.BorderWidth = 2;
439+
// getStatusTable.BorderColor = Color.DarkGreen;
440+
// getStatusTable.BackColor = System.Drawing.ColorTranslator.FromHtml("#cfc");
441441
getStatusTable.Controls.Add(rowOne);
442442
dcPanel.Controls.Add(getStatusTable);
443443
}
@@ -447,11 +447,11 @@ private void drawPanelForGetStatusResult(string attribute, string value, bool he
447447
TableCell cell1 = new TableCell();
448448
TableCell cell2 = new TableCell();
449449
cell1.Text = attribute.ToString();
450-
//cell1.BorderWidth = 1;
450+
// cell1.BorderWidth = 1;
451451
cell1.HorizontalAlign = HorizontalAlign.Center;
452452
row.Controls.Add(cell1);
453453
cell2.Text = value.ToString();
454-
//cell2.BorderWidth = 1;
454+
// cell2.BorderWidth = 1;
455455
cell2.HorizontalAlign = HorizontalAlign.Center;
456456
row.Controls.Add(cell2);
457457
getStatusTable.Controls.Add(row);
@@ -516,8 +516,8 @@ protected void getDCCapabilities_Click(object sender, EventArgs e)
516516
Session["dc_session_GdeviceID"] = deviceId.ToString();
517517
getAuthCode();
518518
}
519-
//readCheckVerifyAccessToken();
520-
// Form Http Web Request
519+
// readCheckVerifyAccessToken();
520+
// Form Http Web Request
521521
HttpWebRequest deviceInfoRequestObject = (HttpWebRequest)System.Net.WebRequest.Create("" + FQDN + "/1/devices/tel:" + deviceId.ToString() + "/info?access_token=" + access_token.ToString());
522522
deviceInfoRequestObject.Method = "GET";
523523

@@ -536,7 +536,7 @@ protected void getDCCapabilities_Click(object sender, EventArgs e)
536536
drawPanelForGetStatusResult("acwav", deserializedJsonObj.capabilities.acwav.ToString(), false);
537537
drawPanelForGetStatusResult("acwcf", deserializedJsonObj.capabilities.acwcf.ToString(), false);
538538
drawPanelForGetStatusResult("acwtermtype", deserializedJsonObj.capabilities.acwtermtype.ToString(), false);
539-
//Session["DeviceIdForWhichTokenAcquired"] = deviceId.ToString();
539+
// Session["DeviceIdForWhichTokenAcquired"] = deviceId.ToString();
540540
deviceInfoResponseStream.Close();
541541
}
542542
}

DC/Csharp/app1/Web.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0"?>
1+
<?xml version="1.0"?>
22
<!--
33
For more information on how to configure your ASP.NET application, please visit
44
http://go.microsoft.com/fwlink/?LinkId=169433
@@ -11,27 +11,27 @@
1111
<appSettings>
1212

1313
<!-- This is mandatory key and value should be equal
14-
to DC Service registered application 'API key'
14+
to DC Service registered application 'API key'
1515
example: value="2726942c798aaaaa4bd3625d95cc7355"-->
1616
<add key="api_key" value=""/>
1717

1818
<!-- This is mandatory key and value should be equal
19-
to DC Service registered application 'Secret key'
19+
to DC Service registered application 'Secret key'
2020
example: value="5fb012657aaa6c7d"-->
2121
<add key="secret_key" value=""/>
2222

2323
<!-- This is mandatory key and value should be equal
24-
to DC Service registered application 'OAuth Redirect URL'
24+
to DC Service registered application 'OAuth Redirect URL'
2525
example: value="https://IIS-Server/webroot/dc/app1/Default.aspx"-->
2626
<add key="authorize_redirect_uri" value=""/>
2727

2828
<!-- This is mandatory key and value should be equal
29-
to https://api.att.com for production environment
29+
to https://api.att.com for production environment
3030
example: value="https://api.att.com"-->
3131
<add key="FQDN" value=""></add>
3232

3333
<!-- This is optional key and value should be equal
34-
to "DC"
34+
to "DC"
3535
example: value="DC"-->
3636
<add key="scope" value=""/>
3737

DC/PHP/app1/README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ PHP 5.2+
4848
Apache and php configured , on most Linux systems if installed using packages this will be done automatically
4949

5050
Installation:
51-
Copy the sample application folder to apache web root folder, for example /var/www/html
51+
Copy the sample application folder to apache web root folder, for example /var/www/html
5252

5353

5454
3. Parameters

DC/Ruby/app1/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ create and run one's own full-fledged sample applications.
5555

5656
- also make sure you have rest-client and json gems installed
5757

58-
To install these gems open up a terminal window and invoke:
58+
To install these gems open up a command-line interface window and invoke:
5959

6060
gem install sinatra sinatra-contrib rest-client json
6161

@@ -97,7 +97,7 @@ create and run one's own full-fledged sample applications.
9797

9898
4. Running the application
9999

100-
To run the application, open up a terminal window and type:
100+
To run the application, open up a command-line interface window and type:
101101

102102
ruby ./dc.rb
103103

DC/Ruby/app1/dc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def get_device_capabilities
7373
else
7474
session[:dc_address] = a
7575
session[:dc_entered_address] = params[:address]
76-
authorize # after a successful authorization browser will be redirected to /auth/callback and then /get-device-capabilities
76+
authorize # after a successful authorization the web browser will be redirected to /auth/callback and then /get-device-capabilities
7777
end
7878

7979
end

DC/Vb/app1/Default.aspx.vb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
'Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
1+
'Licensed by AT&T under 'Software Development Kit Tools Agreement.' September 2011
22
'TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
33
'Copyright 2011 AT&T Intellectual Property. All rights reserved. http://developer.att.com
44
'For more information contact [email protected]
@@ -65,7 +65,7 @@ Partial Public Class [Default]
6565
Session("vb_dc_session_lastTokenTakenTime") = Nothing
6666
Session("vb_dc_session_refreshTokenExpiryTime") = Nothing
6767
End Sub
68-
' This function resets access token related variable to null
68+
' This function resets access token related variable to null
6969

7070
Public Sub resetTokenVariables()
7171
access_token = Nothing
@@ -75,7 +75,7 @@ Partial Public Class [Default]
7575
refreshTokenExpiryTime = Nothing
7676
End Sub
7777

78-
' This function validates access token related variables and returns VALID_ACCESS_TOKEN if its valid
78+
' This function validates access token related variables and returns VALID_ACCESS_TOKEN if it is valid
7979
' * otherwise, returns INVALID_ACCESS_TOKEN if refresh token expired or not able to read session variables
8080
' * return REFRESH_TOKEN, if access token in expired and refresh token is valid
8181
'
@@ -121,7 +121,7 @@ Partial Public Class [Default]
121121

122122
' This function get the access token based on the type parameter type values.
123123
' * If type value is 0, access token is fetch for authorization code flow
124-
' * If type value is 2, access token is fetch for authorization code floww based on the exisiting refresh token
124+
' * If type value is 2, access token is fetch for authorization code flow based on the exisiting refresh token
125125
'
126126

127127
Public Function getAccessToken(ByVal type As Integer) As Boolean
@@ -214,7 +214,7 @@ Partial Public Class [Default]
214214
Return False
215215
End Function
216216

217-
' This funciton draws table for error response
217+
' This function draws table for error response
218218

219219
Private Sub drawPanelForFailure(ByVal panelParam As Panel, ByVal message As String)
220220
Dim table As New Table()
@@ -241,8 +241,8 @@ Partial Public Class [Default]
241241
panelParam.Controls.Add(table)
242242
End Sub
243243
'
244-
' * This function is called when the applicaiton page is loaded into the browser.
245-
' * This fucntion reads the web.config and gets the values of the attributes
244+
' * This function is called when the application page is loaded into the web browser.
245+
' * This function reads the web.config file and gets the values of the attributes
246246
' *
247247
'
248248

@@ -303,7 +303,7 @@ Partial Public Class [Default]
303303
End Try
304304

305305
End Sub
306-
'This funciton checks the validity of string as msisdn
306+
'This function checks the validity of string as msisdn
307307

308308

309309
Private Function isValidMISDN(ByVal number As String) As [Boolean]

DC/Vb/app1/Web.config

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0"?>
1+
<?xml version="1.0"?>
22
<!--
33
For more information on how to configure your ASP.NET application, please visit
44
http://go.microsoft.com/fwlink/?LinkId=169433
@@ -11,27 +11,27 @@
1111
<appSettings>
1212

1313
<!-- This is mandatory key and value should be equal
14-
to DC Service registered application 'API key'
14+
to DC Service registered application 'API key'
1515
example: value="2726942c798aaaaa4bd3625d95cc7355"-->
1616
<add key="api_key" value=""/>
1717

1818
<!-- This is mandatory key and value should be equal
19-
to DC Service registered application 'Secret key'
19+
to DC Service registered application 'Secret key'
2020
example: value="5fb012657aaa6c7d"-->
2121
<add key="secret_key" value=""/>
2222

2323
<!-- This is mandatory key and value should be equal
24-
to DC Service registered application 'OAuth Redirect URL'
24+
to DC Service registered application 'OAuth Redirect URL'
2525
example: value="https://IIS-Server/webroot/dc/app1/Default.aspx"-->
2626
<add key="authorize_redirect_uri" value=""/>
2727

2828
<!-- This is mandatory key and value should be equal
29-
to https://api.att.com for production environment
29+
to https://api.att.com for production environment
3030
example: value="https://api.att.com "-->
3131
<add key="FQDN" value=""></add>
3232

3333
<!-- This is optional key and value should be equal
34-
to "DC"
34+
to "DC"
3535
example: value="DC"-->
3636
<add key="scope" value=""/>
3737

MIM/Csharp/app1/Default.aspx.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// <copyright file="Default.aspx.cs" company="AT&amp;T">
1+
// <copyright file="Default.aspx.cs" company="AT&amp;T">
22
// Licensed by AT&amp;T under 'Software Development Kit Tools Agreement.' 2012
33
// TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION: http://developer.att.com/sdk_agreement/
44
// Copyright 2012 AT&amp;T Intellectual Property. All rights reserved. http://developer.att.com
@@ -67,7 +67,7 @@ public partial class MIM_App1 : System.Web.UI.Page
6767
#region Application Events
6868

6969
/// <summary>
70-
/// This function is called when the application page is loaded into the browser.
70+
/// This function is called when the application page is loaded into the web browser.
7171
/// </summary>
7272
/// <param name="sender">object, that caused this event</param>
7373
/// <param name="e">Event that invoked this function</param>
@@ -486,7 +486,7 @@ private void ResetTokenSessionVariables()
486486
}
487487

488488
/// <summary>
489-
/// This function resets access token related variable to null
489+
/// This function resets access token related variable to null
490490
/// </summary>
491491
private void ResetTokenVariables()
492492
{
@@ -605,7 +605,7 @@ private bool ReadTokenSessionVariables()
605605
/// <summary>
606606
/// Validates access token related variables
607607
/// </summary>
608-
/// <returns>string, returns VALID_ACCESS_TOKEN if its valid
608+
/// <returns>string, returns VALID_ACCESS_TOKEN if it is valid
609609
/// otherwise, returns INVALID_ACCESS_TOKEN if refresh token expired or not able to read session variables
610610
/// return REFRESH_TOKEN, if access token in expired and refresh token is valid</returns>
611611
private string IsTokenValid()
@@ -656,7 +656,7 @@ private void BypassCertificateError()
656656
/// Get access token based on the type parameter type values.
657657
/// </summary>
658658
/// <param name="type">If type value is Authorization_code, access token is fetch for authorization code flow
659-
/// If type value isRefresh_Token, access token is fetch for authorization code floww based on the exisiting refresh token</param>
659+
/// If type value isRefresh_Token, access token is fetch for authorization code flow based on the exisiting refresh token</param>
660660
/// <returns>true/false; true if success, else false</returns>
661661
private bool GetAccessToken(AccessTokenType type)
662662
{

MIM/Csharp/app1/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ order to use this sample application code.
6969

7070
Each sample application contains a web.config file. It holds configurable parameters
7171
described in an easy to read format. Please populate the following parameters in
72-
web.config as specified below:
72+
web.config file as specified below:
7373

7474
1) api_key : This is mandatory parameter, set the value as per your
7575
registered application 'API key' field value.
@@ -99,4 +99,4 @@ environment to 'Production' environment.
9999
Suppose you copied the sample app files in your IIS server webroot/mim/app1/ folder.
100100
In order to run the sample application, type in'http://IIS_HOSTNAME:8080/mim/app1/Default.aspx'
101101
(assuming you're using a HOSTNAME machine with IIS Server and have not changed the
102-
default port number, otherwise adjust accordingly) on your browser.
102+
default port number, otherwise adjust accordingly) on your web browser.

0 commit comments

Comments
 (0)