Permalink
Browse files

Initial commit

  • Loading branch information...
0 parents commit 3fd17b46257579332fa1fb393c6bec24c4429f56 @hasanein committed Jun 4, 2012
Showing 450 changed files with 23,053 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+X-COMMENT: Main-Class will be added automatically by build
+
@@ -0,0 +1,37 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package com.opencloud.testing;
+
+import java.io.IOException;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.impl.client.DefaultHttpClient;
+
+/**
+ *
+ * @author Hasanein.Khafaji
+ */
+public class HttpTester
+{
+ public static void main (String args[])
+ {
+ /**
+ * Sending a POST message and displaying the received response back.
+ */
+ HttpClient httpClient = new DefaultHttpClient();
+ HttpPost httpPost = new HttpPost();
+ ResponseHandler<String> responseHandler = new ResponseHandler<String>() {
+ public String handleResponse(HttpResponse hr) throws ClientProtocolException, IOException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ }
+
+ }
+}
@@ -0,0 +1,16 @@
+Call Management Configurations:
+-------------------------------
+@ Location-based routing: The service manager sbb will handle the routing of the incoming calls basing on the rules set by the called user and the location of the called user at the moment the call is received.
+
+@ The user can set various call management rules, these rules serves as the input to the service manager sbb that parse them in order to build its own routing table.
+
+@ There is no need to have multiple types of call management rules, but we need to define the parameters that comprise a CMR --> Call Management Rule.
+
+1- Time-Based call management rules.
+2- Location-Based call management rules.
+3- Proximity: this value is to be expressed in meters which specify how far the user location at the moment the call is received from the configured location point (longitude & latitude) for the CMR to be considered a match.
+4- Incoming caller number or number segment - based rules.
+5- call handling type - reject/accept (this means that if the rule matches with the incoming call, then this action will be taken).(This will enable us to create a call blocking software)
+6- List of the devices to ring.
+7- the order of ringing, either parrallel or sequential (hunting) (or a combination of both, but not necessarily required to have an implementation for that)
+6- at the end of the page, we need to have a couple of buttons to edit and delete the whole CMR.
Binary file not shown.
@@ -0,0 +1,2 @@
+Show my current location: This menu item will simply display the current location of the user on Google maps.
+
@@ -0,0 +1,29 @@
+Dev plan
+
+19-jan-2011 (DONE)
+------------------
+
+- GUI structure and layout design and development, this just includes the menu structure and the registration of the intents, services, etc... The development and the inclusion of the service feature will be included later on.
+
+Progress note: The development of the main GUI structure has been completed, but we need to finalize the click event listeners development. It is more convenient to have the config client constructing a message object and sending that message object over the http protocol when the user clicks a config submission and update button, this is in contrast to the location update procedure which is basically consists of a background service that is not visibile to the user.
+
+TASK COMPLETED
+
+21-jan-2011 (DONE)
+------------------
+
+- background service for location update and all the needed structural changes and development for the location server sbb and the profile specification. This is an end to end location gathering and update process.
+
+25-jan-2011 (DONE)
+------------------
+
+- plan the GUI design and what call preferences aspects to include and that shall have the effect of deciding what call management features will be included when developing the service manager sbb.
+
+26-jan-2011
+-----------
+
+- develop the menu as per the plan
+
+- develop the config update client
+
+- develop the service manager sbb for call routing: this sbb shall intercept the INVITE messages sent by the SIP clients and manage the call accordingly as per the config set in the location database.
@@ -0,0 +1,10 @@
+- http://sipdroid.org/
+
+This is a free application for a SIP client on android, it should be simple and could do the job as required.
+
+- http://www.3cx.com/blog/3cxphone/android/
+
+3CX have ported their nice looking SIP phone software to run on modern android operating systems. however this is still in beta version but it might be easy to use and sufficient for our needs, besides that it is available via the android market for free.
+
+
++ as a conclusion, we can use any of these SIP clients for the android and also for the simple sake of testing, we could simply use the desktop version of x-lite or 3CX to test our application.
@@ -0,0 +1,46 @@
+Action List:
+
+- The SIP registrar must be able to branch processing of the incoming REGISTER requests basing on the type of the request being received, that is: either an add, remove or query request. This entails the development of the abiltiy to distinguish what type of request is implied within the received register message after a carefull and proper inspection of it.
+
+* Adding/Update Bindings:
+
+there is a normal REGISTER request with AOR and contact header field values.
+
+Note: Processing guidelines should be followed as per indicated after point 6 of the SIP RFC 3261 (10 registrations)
+
+* Remove Bindings:
+
+the remove bindings contact if there is an expire field/parameter set to zero
+
+Note: Processing guidelines should be followed as per indicated after point 6 of the SIP RFC 3261 (Chap. 10 registrations)
+
+* Query Bindings:
+
+the registrar should know that the given REGISTER request is a query if there are no contact header field or it exist without any field values
+
+Note: Processing guidelines should be followed as per indicated after point 6 of the SIP RFC 3261 (10 registrations)
+
+Note: in all cases, the registrar should respond back with an OK response that contains all of the bindings of the indicated AOR queried from the database.
+
+- The SIP registrar need to make sure and check for the existance of the mandatory header fields in the received REGISTER request and reject and stop the processing of that request (with generating an appropriate response back to the requestor) if one of these mandatory header fields is missing.
+
+Mandatory header fields are:
+1- Request-Uri
+2- To
+3- From
+4- Call-ID
+5- CSeq
+6- Contact (optional)
+
+After conducting the format and validity checks on the received header field and their values, we need to grap some inputs from these fields in order to populate the location database. And these are:
+
+* AOR
+* Contact(s) (each contact need to be saved along with the expire parameter/field value for that specific contact in a certain format to prevent adding an extra complexity to the database structure that is going to be implemented inside the JAIN-SLEE profile specification)
+* Call-ID
+* CSeq
+* 3rd Part Registeration?
+
+- The SIP registrar must compare the request-uri with the AOR, the domains for both URIs must be matching for the processing to continue, otherwise the SIP registrar must respond back with a 404 error message back to the sender.
+
+Note: The location database that we are going to use in here will basically comprise an in-memory database made up of java collection framework and later on that is going to be migrated into a profile specification.
+
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="LocationDatabaseProfile/src/profile-spec"/>
+ <classpathentry kind="src" path="LocationDatabaseProfile/src/sbb"/>
+ <classpathentry kind="src" path="LocationServerSbb/src/sbb"/>
+ <classpathentry kind="src" path="mLocationizer_Sample_Code/mLocationizer/mLocationizer/gen"/>
+ <classpathentry kind="src" path="mLocationizer_Sample_Code/mLocationizer/mLocationizer/src"/>
+ <classpathentry kind="src" path="ServiceManagerSbb/src/sbb"/>
+ <classpathentry kind="src" path="SipRegistrarSbb/src/sbb"/>
+ <classpathentry kind="lib" path="lib/jsip_api_v1.2.jar"/>
+ <classpathentry kind="lib" path="LocationDatabaseProfile/jars/location-database-profile-spec-du.jar"/>
+ <classpathentry kind="lib" path="LocationDatabaseProfile/lib/jsip_api_v1.2.jar"/>
+ <classpathentry kind="lib" path="LocationDatabaseProfile/lib/jsip-ratype-classes-1.2.jar"/>
+ <classpathentry kind="lib" path="LocationDatabaseProfile/lib/slee-1.1.jar"/>
+ <classpathentry kind="lib" path="LocationDatabaseProfileLibrary/jars/library-deployable-unit.jar"/>
+ <classpathentry kind="lib" path="LocationDatabaseProfileLibrary/lib/profile-spec-deployable-jar.jar"/>
+ <classpathentry kind="lib" path="LocationServerSbb/jars/location-service-du.jar"/>
+ <classpathentry kind="lib" path="LocationServerSbb/lib/http-events-2.1.jar"/>
+ <classpathentry kind="lib" path="LocationServerSbb/lib/http-ratype-2.1.jar"/>
+ <classpathentry kind="lib" path="LocationServerSbb/lib/slee-1.1.jar"/>
+ <classpathentry kind="lib" path="NIST_SIP_Parsers_API_Libraray/jars/NIST_JAIN_SIP_Parser_API_DU.jar"/>
+ <classpathentry kind="lib" path="NIST_SIP_Parsers_API_Libraray/lib/jain-sip-ri-1.2.159.jar"/>
+ <classpathentry kind="lib" path="NIST_SIP_Parsers_API_Libraray/lib/jsip_api_v1.2.jar"/>
+ <classpathentry kind="lib" path="ServiceManagerSbb/jars/service-manager-du.jar"/>
+ <classpathentry kind="lib" path="ServiceManagerSbb/lib/http-events-2.1.jar"/>
+ <classpathentry kind="lib" path="ServiceManagerSbb/lib/http-ratype-2.1.jar"/>
+ <classpathentry kind="lib" path="ServiceManagerSbb/lib/profile-spec-deployable-jar.jar"/>
+ <classpathentry kind="lib" path="ServiceManagerSbb/lib/slee-1.1.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/jars/sip_registration_service_du.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/http-events-2.1.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/http-ratype-2.1.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/jain-sip-ri-1.2.159.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/jsip_api_v1.2.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/jsip-ratype-classes-1.2.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/location-database-profile-spec-jar.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/oc-javax-sip-2.1.jar"/>
+ <classpathentry kind="lib" path="SipRegistrarSbb/lib/slee-1.1.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="mLocationizer_Sample_Code/mLocationizer/mLocationizer/bin"/>
+</classpath>
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>OC_MWC_Demo</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>mLocationizer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="uk.ac.ucl.ee.snsAssignment.mLocationizer"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <application android:icon="@drawable/icon" android:label="@string/app_name">
+
+ <!-- The Main activity that the applications runs in -->
+ <activity android:name=".MainActivity"
+ android:label="@string/app_name"
+ android:process=":mainActivityProcess">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+
+ <!-- Sub Activities that are called from the main activity -->
+ <activity android:name=".ShowMyLocationSubActivity" android:process=":showMyLocationSubActivityProcess"/>
+ <activity android:name=".AboutMenuSubActivity"/>
+ <activity android:name=".AddFriendSubActivity" />
+ <activity android:name=".ShowSettingsSubActivity" />
+ <activity android:name=".ShowFriendRequestNotificationSubActivity"/>
+ <activity android:name=".RemoveFriendSubActivity"/>
+ <activity android:name=".ShowChangeOwnershipMenuSubActivity" />
+
+ <!-- Indicating what external libraries are to be used in the application -->
+ <uses-library android:name="com.google.android.maps"/>
+
+ <!-- This broadcast receiver will listen for certain kinds of events and will
+ update the server with the location of the device basing on the occurance
+ of those events -->
+ <receiver android:name=".LocationUpdateBroadcastReceiver" android:enabled="true">
+ <intent-filter>
+ <action android:name="android.intent.action.BOOT_COMPLETED" />
+ <action android:name="android.intent.action.PACKAGE_REPLACED" />
+ <action android:name="android.intent.action.REBOOT" />
+ <action android:name="android.intent.action.ACTION_SHUTDOWN" />
+ <action android:name="android.intent.action.ACTION_POWER_CONNECTED" />
+ <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" />
+ </intent-filter>
+ </receiver>
+ </application>
+
+ <uses-sdk android:minSdkVersion="7" />
+
+ <!-- The types of the permissions that are required for this application -->
+ <uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
+ <uses-permission android:name="android.permission.WRITE_CONTACTS"></uses-permission>
+ <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
+ <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
+ <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
+ <uses-permission android:name="android.permission.READ_PHONE_STATE"></uses-permission>
+ <uses-permission android:name="android.permission.DELETE_PACKAGES"></uses-permission>
+</manifest>
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,13 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Indicates whether an apk should be generated for each density.
+split.density=false
+# Project target.
+target=Google Inc.:Google APIs:7
Oops, something went wrong.

0 comments on commit 3fd17b4

Please sign in to comment.